'------------------------------------------------------------------------------ ' ' This code was generated by a tool. ' Runtime Version:4.0.30319.18052 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. ' '------------------------------------------------------------------------------ Option Strict Off Option Explicit On ''' '''Represents a strongly typed in-memory cache of data. ''' _ Partial Public Class EpsonDataSet1 Inherits Global.System.Data.DataSet Private tableAOIQ_Temp As AOIQ_TempDataTable Private tablebatch As batchDataTable Private tablecard As cardDataTable Private tablecard_backup As card_backupDataTable Private tablecard_Hist As card_HistDataTable Private tablecardHist As cardHistDataTable Private tablecomponent_parts As component_partsDataTable Private tableCTS As CTSDataTable Private tabledefectCatProd As defectCatProdDataTable Private tabledefectCatProdHist As defectCatProdHistDataTable Private tabledefectCatQC As defectCatQCDataTable Private tabledefectCatQCHist As defectCatQCHistDataTable Private tabledefectProd As defectProdDataTable Private tabledefectProdHist As defectProdHistDataTable Private tabledefectQC As defectQCDataTable Private tabledefectQCHist As defectQCHistDataTable Private tableFA_NewPT As FA_NewPTDataTable Private tablefaNo As faNoDataTable Private tableKITTING As KITTINGDataTable Private tableKMOUNTING As KMOUNTINGDataTable Private tableKSEQUENCE_DETAIL As KSEQUENCE_DETAILDataTable Private tableKSEQUENCE_HEADER As KSEQUENCE_HEADERDataTable Private tableKSETTINGS As KSETTINGSDataTable Private tableLabelDef As LabelDefDataTable Private tableLabelDefHist As LabelDefHistDataTable Private tablelog_action As log_actionDataTable Private tablelog_alvarion_serial As log_alvarion_serialDataTable Private tablelog_ATE_error As log_ATE_errorDataTable Private tablelog_BL_Detail As log_BL_DetailDataTable Private tablelog_BL_Detail_Hist As log_BL_Detail_HistDataTable Private tablelog_BL_Header As log_BL_HeaderDataTable Private tablelog_BL_Header_Hist As log_BL_Header_HistDataTable Private tablelog_CAPA As log_CAPADataTable Private tablelog_card As log_cardDataTable Private tablelog_CT_Detail As log_CT_DetailDataTable Private tablelog_CT_Detail_Hist As log_CT_Detail_HistDataTable Private tablelog_CT_Header As log_CT_HeaderDataTable Private tablelog_CT_Header_Hist As log_CT_Header_HistDataTable Private tablelog_ct_header_temp As log_ct_header_tempDataTable Private tablelog_DA As log_DADataTable Private tablelog_label As log_labelDataTable Private tablelog_labelHist As log_labelHistDataTable Private tablelog_link As log_linkDataTable Private tablelog_linkHist As log_linkHistDataTable Private tablelog_lot As log_lotDataTable Private tablelog_pass As log_passDataTable Private tablelog_pass_serial As log_pass_serialDataTable Private tablelog_PreTest_Detail As log_PreTest_DetailDataTable Private tablelog_repair As log_repairDataTable Private tablelog_repair_fa As log_repair_faDataTable Private tablelog_repair_serial As log_repair_serialDataTable Private tablelog_serial As log_serialDataTable Private tablelog_SH_Detail As log_SH_DetailDataTable Private tablelog_SH_Detail_Hist As log_SH_Detail_HistDataTable Private tablelog_SH_Header As log_SH_HeaderDataTable Private tablelog_SH_Header_Hist As log_SH_Header_HistDataTable Private tablelotNo As lotNoDataTable Private tableLotNumber As LotNumberDataTable Private tablemachine As machineDataTable Private tablemachineHist As machineHistDataTable Private tablemodel As modelDataTable Private tablemodelBackup As modelBackupDataTable Private tablemodelDim As modelDimDataTable Private tablemodelDimHist As modelDimHistDataTable Private tablemodelFamily As modelFamilyDataTable Private tablemodelFamilyHist As modelFamilyHistDataTable Private tablemodelHierarchy As modelHierarchyDataTable Private tablemodelHierarchyHist As modelHierarchyHistDataTable Private tablemodelHist As modelHistDataTable Private tablemodelRoute As modelRouteDataTable Private tablemodelRoute_backup_1 As modelRoute_backup_1DataTable Private tablemodelRouteHist As modelRouteHistDataTable Private tablemodelTemp As modelTempDataTable Private tablemodelType As modelTypeDataTable Private tablemodelTypeHist As modelTypeHistDataTable Private tableParts_List As Parts_ListDataTable Private tablepartsCode As partsCodeDataTable Private tablePartsModel As PartsModelDataTable Private tablePartsPrep As PartsPrepDataTable Private tablePartsRecords As PartsRecordsDataTable Private tablepartsStation As partsStationDataTable Private tablepartsSupplier As partsSupplierDataTable Private tablepo_detail As po_detailDataTable Private tablepo_detail_backup As po_detail_backupDataTable Private tablepo_detail_temp As po_detail_tempDataTable Private tablepo_header As po_headerDataTable Private tablepo_header_backup As po_header_backupDataTable Private tablepo_history_detail As po_history_detailDataTable Private tablepo_orig_detail As po_orig_detailDataTable Private tablepo_orig_header As po_orig_headerDataTable Private tableprinter As printerDataTable Private tablept As ptDataTable Private tablept_Hist As pt_HistDataTable Private tableserialAlvariset As serialAlvarisetDataTable Private tableserialMac As serialMacDataTable Private tableSHIPPER_REPORT_TABLE As SHIPPER_REPORT_TABLEDataTable Private tableSHIPPER_STATUS As SHIPPER_STATUSDataTable Private tableSHIPPER_SUMMARY_TABLE As SHIPPER_SUMMARY_TABLEDataTable Private tablestation As stationDataTable Private tablestation_convert As station_convertDataTable Private tablestationHist As stationHistDataTable Private tableusers As usersDataTable Private tableusersHist As usersHistDataTable Private tableWIP_TEMP As WIP_TEMPDataTable Private _tableCTSB9_00001 As _CTSB9_00001DataTable Private _tableCTSB9_00002 As _CTSB9_00002DataTable Private tablegetMaxDate As getMaxDateDataTable Private tablegetMinDate As getMinDateDataTable Private tableShipper_File As Shipper_FileDataTable Private tableShipper_File_Body As Shipper_File_BodyDataTable Private tableShipper_File_Header As Shipper_File_HeaderDataTable Private tablecontainer As containerDataTable Private tablecreateView As createViewDataTable Private tableitem As itemDataTable Private tablePO As PODataTable Private tablePOLINE As POLINEDataTable Private tableshipAdd1 As shipAdd1DataTable Private tableshipAdd2 As shipAdd2DataTable Private tableshipAdd3 As shipAdd3DataTable Private tablevalidatePOTransfer As validatePOTransferDataTable Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema _ Public Sub New() MyBase.New Me.BeginInit Me.InitClass Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler Me.EndInit End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context, false) If (Me.IsBinarySerialized(info, context) = true) Then Me.InitVars(false) Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1 AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1 Return End If Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String) If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet() ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema))) If (Not (ds.Tables("AOIQ_Temp")) Is Nothing) Then MyBase.Tables.Add(New AOIQ_TempDataTable(ds.Tables("AOIQ_Temp"))) End If If (Not (ds.Tables("batch")) Is Nothing) Then MyBase.Tables.Add(New batchDataTable(ds.Tables("batch"))) End If If (Not (ds.Tables("card")) Is Nothing) Then MyBase.Tables.Add(New cardDataTable(ds.Tables("card"))) End If If (Not (ds.Tables("card_backup")) Is Nothing) Then MyBase.Tables.Add(New card_backupDataTable(ds.Tables("card_backup"))) End If If (Not (ds.Tables("card_Hist")) Is Nothing) Then MyBase.Tables.Add(New card_HistDataTable(ds.Tables("card_Hist"))) End If If (Not (ds.Tables("cardHist")) Is Nothing) Then MyBase.Tables.Add(New cardHistDataTable(ds.Tables("cardHist"))) End If If (Not (ds.Tables("component_parts")) Is Nothing) Then MyBase.Tables.Add(New component_partsDataTable(ds.Tables("component_parts"))) End If If (Not (ds.Tables("CTS")) Is Nothing) Then MyBase.Tables.Add(New CTSDataTable(ds.Tables("CTS"))) End If If (Not (ds.Tables("defectCatProd")) Is Nothing) Then MyBase.Tables.Add(New defectCatProdDataTable(ds.Tables("defectCatProd"))) End If If (Not (ds.Tables("defectCatProdHist")) Is Nothing) Then MyBase.Tables.Add(New defectCatProdHistDataTable(ds.Tables("defectCatProdHist"))) End If If (Not (ds.Tables("defectCatQC")) Is Nothing) Then MyBase.Tables.Add(New defectCatQCDataTable(ds.Tables("defectCatQC"))) End If If (Not (ds.Tables("defectCatQCHist")) Is Nothing) Then MyBase.Tables.Add(New defectCatQCHistDataTable(ds.Tables("defectCatQCHist"))) End If If (Not (ds.Tables("defectProd")) Is Nothing) Then MyBase.Tables.Add(New defectProdDataTable(ds.Tables("defectProd"))) End If If (Not (ds.Tables("defectProdHist")) Is Nothing) Then MyBase.Tables.Add(New defectProdHistDataTable(ds.Tables("defectProdHist"))) End If If (Not (ds.Tables("defectQC")) Is Nothing) Then MyBase.Tables.Add(New defectQCDataTable(ds.Tables("defectQC"))) End If If (Not (ds.Tables("defectQCHist")) Is Nothing) Then MyBase.Tables.Add(New defectQCHistDataTable(ds.Tables("defectQCHist"))) End If If (Not (ds.Tables("FA_NewPT")) Is Nothing) Then MyBase.Tables.Add(New FA_NewPTDataTable(ds.Tables("FA_NewPT"))) End If If (Not (ds.Tables("faNo")) Is Nothing) Then MyBase.Tables.Add(New faNoDataTable(ds.Tables("faNo"))) End If If (Not (ds.Tables("KITTING")) Is Nothing) Then MyBase.Tables.Add(New KITTINGDataTable(ds.Tables("KITTING"))) End If If (Not (ds.Tables("KMOUNTING")) Is Nothing) Then MyBase.Tables.Add(New KMOUNTINGDataTable(ds.Tables("KMOUNTING"))) End If If (Not (ds.Tables("KSEQUENCE_DETAIL")) Is Nothing) Then MyBase.Tables.Add(New KSEQUENCE_DETAILDataTable(ds.Tables("KSEQUENCE_DETAIL"))) End If If (Not (ds.Tables("KSEQUENCE_HEADER")) Is Nothing) Then MyBase.Tables.Add(New KSEQUENCE_HEADERDataTable(ds.Tables("KSEQUENCE_HEADER"))) End If If (Not (ds.Tables("KSETTINGS")) Is Nothing) Then MyBase.Tables.Add(New KSETTINGSDataTable(ds.Tables("KSETTINGS"))) End If If (Not (ds.Tables("LabelDef")) Is Nothing) Then MyBase.Tables.Add(New LabelDefDataTable(ds.Tables("LabelDef"))) End If If (Not (ds.Tables("LabelDefHist")) Is Nothing) Then MyBase.Tables.Add(New LabelDefHistDataTable(ds.Tables("LabelDefHist"))) End If If (Not (ds.Tables("log_action")) Is Nothing) Then MyBase.Tables.Add(New log_actionDataTable(ds.Tables("log_action"))) End If If (Not (ds.Tables("log_alvarion_serial")) Is Nothing) Then MyBase.Tables.Add(New log_alvarion_serialDataTable(ds.Tables("log_alvarion_serial"))) End If If (Not (ds.Tables("log_ATE_error")) Is Nothing) Then MyBase.Tables.Add(New log_ATE_errorDataTable(ds.Tables("log_ATE_error"))) End If If (Not (ds.Tables("log_BL_Detail")) Is Nothing) Then MyBase.Tables.Add(New log_BL_DetailDataTable(ds.Tables("log_BL_Detail"))) End If If (Not (ds.Tables("log_BL_Detail_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_BL_Detail_HistDataTable(ds.Tables("log_BL_Detail_Hist"))) End If If (Not (ds.Tables("log_BL_Header")) Is Nothing) Then MyBase.Tables.Add(New log_BL_HeaderDataTable(ds.Tables("log_BL_Header"))) End If If (Not (ds.Tables("log_BL_Header_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_BL_Header_HistDataTable(ds.Tables("log_BL_Header_Hist"))) End If If (Not (ds.Tables("log_CAPA")) Is Nothing) Then MyBase.Tables.Add(New log_CAPADataTable(ds.Tables("log_CAPA"))) End If If (Not (ds.Tables("log_card")) Is Nothing) Then MyBase.Tables.Add(New log_cardDataTable(ds.Tables("log_card"))) End If If (Not (ds.Tables("log_CT_Detail")) Is Nothing) Then MyBase.Tables.Add(New log_CT_DetailDataTable(ds.Tables("log_CT_Detail"))) End If If (Not (ds.Tables("log_CT_Detail_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_CT_Detail_HistDataTable(ds.Tables("log_CT_Detail_Hist"))) End If If (Not (ds.Tables("log_CT_Header")) Is Nothing) Then MyBase.Tables.Add(New log_CT_HeaderDataTable(ds.Tables("log_CT_Header"))) End If If (Not (ds.Tables("log_CT_Header_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_CT_Header_HistDataTable(ds.Tables("log_CT_Header_Hist"))) End If If (Not (ds.Tables("log_ct_header_temp")) Is Nothing) Then MyBase.Tables.Add(New log_ct_header_tempDataTable(ds.Tables("log_ct_header_temp"))) End If If (Not (ds.Tables("log_DA")) Is Nothing) Then MyBase.Tables.Add(New log_DADataTable(ds.Tables("log_DA"))) End If If (Not (ds.Tables("log_label")) Is Nothing) Then MyBase.Tables.Add(New log_labelDataTable(ds.Tables("log_label"))) End If If (Not (ds.Tables("log_labelHist")) Is Nothing) Then MyBase.Tables.Add(New log_labelHistDataTable(ds.Tables("log_labelHist"))) End If If (Not (ds.Tables("log_link")) Is Nothing) Then MyBase.Tables.Add(New log_linkDataTable(ds.Tables("log_link"))) End If If (Not (ds.Tables("log_linkHist")) Is Nothing) Then MyBase.Tables.Add(New log_linkHistDataTable(ds.Tables("log_linkHist"))) End If If (Not (ds.Tables("log_lot")) Is Nothing) Then MyBase.Tables.Add(New log_lotDataTable(ds.Tables("log_lot"))) End If If (Not (ds.Tables("log_pass")) Is Nothing) Then MyBase.Tables.Add(New log_passDataTable(ds.Tables("log_pass"))) End If If (Not (ds.Tables("log_pass_serial")) Is Nothing) Then MyBase.Tables.Add(New log_pass_serialDataTable(ds.Tables("log_pass_serial"))) End If If (Not (ds.Tables("log_PreTest_Detail")) Is Nothing) Then MyBase.Tables.Add(New log_PreTest_DetailDataTable(ds.Tables("log_PreTest_Detail"))) End If If (Not (ds.Tables("log_repair")) Is Nothing) Then MyBase.Tables.Add(New log_repairDataTable(ds.Tables("log_repair"))) End If If (Not (ds.Tables("log_repair_fa")) Is Nothing) Then MyBase.Tables.Add(New log_repair_faDataTable(ds.Tables("log_repair_fa"))) End If If (Not (ds.Tables("log_repair_serial")) Is Nothing) Then MyBase.Tables.Add(New log_repair_serialDataTable(ds.Tables("log_repair_serial"))) End If If (Not (ds.Tables("log_serial")) Is Nothing) Then MyBase.Tables.Add(New log_serialDataTable(ds.Tables("log_serial"))) End If If (Not (ds.Tables("log_SH_Detail")) Is Nothing) Then MyBase.Tables.Add(New log_SH_DetailDataTable(ds.Tables("log_SH_Detail"))) End If If (Not (ds.Tables("log_SH_Detail_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_SH_Detail_HistDataTable(ds.Tables("log_SH_Detail_Hist"))) End If If (Not (ds.Tables("log_SH_Header")) Is Nothing) Then MyBase.Tables.Add(New log_SH_HeaderDataTable(ds.Tables("log_SH_Header"))) End If If (Not (ds.Tables("log_SH_Header_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_SH_Header_HistDataTable(ds.Tables("log_SH_Header_Hist"))) End If If (Not (ds.Tables("lotNo")) Is Nothing) Then MyBase.Tables.Add(New lotNoDataTable(ds.Tables("lotNo"))) End If If (Not (ds.Tables("LotNumber")) Is Nothing) Then MyBase.Tables.Add(New LotNumberDataTable(ds.Tables("LotNumber"))) End If If (Not (ds.Tables("machine")) Is Nothing) Then MyBase.Tables.Add(New machineDataTable(ds.Tables("machine"))) End If If (Not (ds.Tables("machineHist")) Is Nothing) Then MyBase.Tables.Add(New machineHistDataTable(ds.Tables("machineHist"))) End If If (Not (ds.Tables("model")) Is Nothing) Then MyBase.Tables.Add(New modelDataTable(ds.Tables("model"))) End If If (Not (ds.Tables("modelBackup")) Is Nothing) Then MyBase.Tables.Add(New modelBackupDataTable(ds.Tables("modelBackup"))) End If If (Not (ds.Tables("modelDim")) Is Nothing) Then MyBase.Tables.Add(New modelDimDataTable(ds.Tables("modelDim"))) End If If (Not (ds.Tables("modelDimHist")) Is Nothing) Then MyBase.Tables.Add(New modelDimHistDataTable(ds.Tables("modelDimHist"))) End If If (Not (ds.Tables("modelFamily")) Is Nothing) Then MyBase.Tables.Add(New modelFamilyDataTable(ds.Tables("modelFamily"))) End If If (Not (ds.Tables("modelFamilyHist")) Is Nothing) Then MyBase.Tables.Add(New modelFamilyHistDataTable(ds.Tables("modelFamilyHist"))) End If If (Not (ds.Tables("modelHierarchy")) Is Nothing) Then MyBase.Tables.Add(New modelHierarchyDataTable(ds.Tables("modelHierarchy"))) End If If (Not (ds.Tables("modelHierarchyHist")) Is Nothing) Then MyBase.Tables.Add(New modelHierarchyHistDataTable(ds.Tables("modelHierarchyHist"))) End If If (Not (ds.Tables("modelHist")) Is Nothing) Then MyBase.Tables.Add(New modelHistDataTable(ds.Tables("modelHist"))) End If If (Not (ds.Tables("modelRoute")) Is Nothing) Then MyBase.Tables.Add(New modelRouteDataTable(ds.Tables("modelRoute"))) End If If (Not (ds.Tables("modelRoute_backup_1")) Is Nothing) Then MyBase.Tables.Add(New modelRoute_backup_1DataTable(ds.Tables("modelRoute_backup_1"))) End If If (Not (ds.Tables("modelRouteHist")) Is Nothing) Then MyBase.Tables.Add(New modelRouteHistDataTable(ds.Tables("modelRouteHist"))) End If If (Not (ds.Tables("modelTemp")) Is Nothing) Then MyBase.Tables.Add(New modelTempDataTable(ds.Tables("modelTemp"))) End If If (Not (ds.Tables("modelType")) Is Nothing) Then MyBase.Tables.Add(New modelTypeDataTable(ds.Tables("modelType"))) End If If (Not (ds.Tables("modelTypeHist")) Is Nothing) Then MyBase.Tables.Add(New modelTypeHistDataTable(ds.Tables("modelTypeHist"))) End If If (Not (ds.Tables("Parts_List")) Is Nothing) Then MyBase.Tables.Add(New Parts_ListDataTable(ds.Tables("Parts_List"))) End If If (Not (ds.Tables("partsCode")) Is Nothing) Then MyBase.Tables.Add(New partsCodeDataTable(ds.Tables("partsCode"))) End If If (Not (ds.Tables("PartsModel")) Is Nothing) Then MyBase.Tables.Add(New PartsModelDataTable(ds.Tables("PartsModel"))) End If If (Not (ds.Tables("PartsPrep")) Is Nothing) Then MyBase.Tables.Add(New PartsPrepDataTable(ds.Tables("PartsPrep"))) End If If (Not (ds.Tables("PartsRecords")) Is Nothing) Then MyBase.Tables.Add(New PartsRecordsDataTable(ds.Tables("PartsRecords"))) End If If (Not (ds.Tables("partsStation")) Is Nothing) Then MyBase.Tables.Add(New partsStationDataTable(ds.Tables("partsStation"))) End If If (Not (ds.Tables("partsSupplier")) Is Nothing) Then MyBase.Tables.Add(New partsSupplierDataTable(ds.Tables("partsSupplier"))) End If If (Not (ds.Tables("po_detail")) Is Nothing) Then MyBase.Tables.Add(New po_detailDataTable(ds.Tables("po_detail"))) End If If (Not (ds.Tables("po_detail_backup")) Is Nothing) Then MyBase.Tables.Add(New po_detail_backupDataTable(ds.Tables("po_detail_backup"))) End If If (Not (ds.Tables("po_detail_temp")) Is Nothing) Then MyBase.Tables.Add(New po_detail_tempDataTable(ds.Tables("po_detail_temp"))) End If If (Not (ds.Tables("po_header")) Is Nothing) Then MyBase.Tables.Add(New po_headerDataTable(ds.Tables("po_header"))) End If If (Not (ds.Tables("po_header_backup")) Is Nothing) Then MyBase.Tables.Add(New po_header_backupDataTable(ds.Tables("po_header_backup"))) End If If (Not (ds.Tables("po_history_detail")) Is Nothing) Then MyBase.Tables.Add(New po_history_detailDataTable(ds.Tables("po_history_detail"))) End If If (Not (ds.Tables("po_orig_detail")) Is Nothing) Then MyBase.Tables.Add(New po_orig_detailDataTable(ds.Tables("po_orig_detail"))) End If If (Not (ds.Tables("po_orig_header")) Is Nothing) Then MyBase.Tables.Add(New po_orig_headerDataTable(ds.Tables("po_orig_header"))) End If If (Not (ds.Tables("printer")) Is Nothing) Then MyBase.Tables.Add(New printerDataTable(ds.Tables("printer"))) End If If (Not (ds.Tables("pt")) Is Nothing) Then MyBase.Tables.Add(New ptDataTable(ds.Tables("pt"))) End If If (Not (ds.Tables("pt_Hist")) Is Nothing) Then MyBase.Tables.Add(New pt_HistDataTable(ds.Tables("pt_Hist"))) End If If (Not (ds.Tables("serialAlvariset")) Is Nothing) Then MyBase.Tables.Add(New serialAlvarisetDataTable(ds.Tables("serialAlvariset"))) End If If (Not (ds.Tables("serialMac")) Is Nothing) Then MyBase.Tables.Add(New serialMacDataTable(ds.Tables("serialMac"))) End If If (Not (ds.Tables("SHIPPER_REPORT_TABLE")) Is Nothing) Then MyBase.Tables.Add(New SHIPPER_REPORT_TABLEDataTable(ds.Tables("SHIPPER_REPORT_TABLE"))) End If If (Not (ds.Tables("SHIPPER_STATUS")) Is Nothing) Then MyBase.Tables.Add(New SHIPPER_STATUSDataTable(ds.Tables("SHIPPER_STATUS"))) End If If (Not (ds.Tables("SHIPPER_SUMMARY_TABLE")) Is Nothing) Then MyBase.Tables.Add(New SHIPPER_SUMMARY_TABLEDataTable(ds.Tables("SHIPPER_SUMMARY_TABLE"))) End If If (Not (ds.Tables("station")) Is Nothing) Then MyBase.Tables.Add(New stationDataTable(ds.Tables("station"))) End If If (Not (ds.Tables("station_convert")) Is Nothing) Then MyBase.Tables.Add(New station_convertDataTable(ds.Tables("station_convert"))) End If If (Not (ds.Tables("stationHist")) Is Nothing) Then MyBase.Tables.Add(New stationHistDataTable(ds.Tables("stationHist"))) End If If (Not (ds.Tables("users")) Is Nothing) Then MyBase.Tables.Add(New usersDataTable(ds.Tables("users"))) End If If (Not (ds.Tables("usersHist")) Is Nothing) Then MyBase.Tables.Add(New usersHistDataTable(ds.Tables("usersHist"))) End If If (Not (ds.Tables("WIP_TEMP")) Is Nothing) Then MyBase.Tables.Add(New WIP_TEMPDataTable(ds.Tables("WIP_TEMP"))) End If If (Not (ds.Tables("CTSB9-00001")) Is Nothing) Then MyBase.Tables.Add(New _CTSB9_00001DataTable(ds.Tables("CTSB9-00001"))) End If If (Not (ds.Tables("CTSB9-00002")) Is Nothing) Then MyBase.Tables.Add(New _CTSB9_00002DataTable(ds.Tables("CTSB9-00002"))) End If If (Not (ds.Tables("getMaxDate")) Is Nothing) Then MyBase.Tables.Add(New getMaxDateDataTable(ds.Tables("getMaxDate"))) End If If (Not (ds.Tables("getMinDate")) Is Nothing) Then MyBase.Tables.Add(New getMinDateDataTable(ds.Tables("getMinDate"))) End If If (Not (ds.Tables("Shipper_File")) Is Nothing) Then MyBase.Tables.Add(New Shipper_FileDataTable(ds.Tables("Shipper_File"))) End If If (Not (ds.Tables("Shipper_File_Body")) Is Nothing) Then MyBase.Tables.Add(New Shipper_File_BodyDataTable(ds.Tables("Shipper_File_Body"))) End If If (Not (ds.Tables("Shipper_File_Header")) Is Nothing) Then MyBase.Tables.Add(New Shipper_File_HeaderDataTable(ds.Tables("Shipper_File_Header"))) End If If (Not (ds.Tables("container")) Is Nothing) Then MyBase.Tables.Add(New containerDataTable(ds.Tables("container"))) End If If (Not (ds.Tables("createView")) Is Nothing) Then MyBase.Tables.Add(New createViewDataTable(ds.Tables("createView"))) End If If (Not (ds.Tables("item")) Is Nothing) Then MyBase.Tables.Add(New itemDataTable(ds.Tables("item"))) End If If (Not (ds.Tables("PO")) Is Nothing) Then MyBase.Tables.Add(New PODataTable(ds.Tables("PO"))) End If If (Not (ds.Tables("POLINE")) Is Nothing) Then MyBase.Tables.Add(New POLINEDataTable(ds.Tables("POLINE"))) End If If (Not (ds.Tables("shipAdd1")) Is Nothing) Then MyBase.Tables.Add(New shipAdd1DataTable(ds.Tables("shipAdd1"))) End If If (Not (ds.Tables("shipAdd2")) Is Nothing) Then MyBase.Tables.Add(New shipAdd2DataTable(ds.Tables("shipAdd2"))) End If If (Not (ds.Tables("shipAdd3")) Is Nothing) Then MyBase.Tables.Add(New shipAdd3DataTable(ds.Tables("shipAdd3"))) End If If (Not (ds.Tables("validatePOTransfer")) Is Nothing) Then MyBase.Tables.Add(New validatePOTransferDataTable(ds.Tables("validatePOTransfer"))) End If Me.DataSetName = ds.DataSetName Me.Prefix = ds.Prefix Me.Namespace = ds.Namespace Me.Locale = ds.Locale Me.CaseSensitive = ds.CaseSensitive Me.EnforceConstraints = ds.EnforceConstraints Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add) Me.InitVars Else Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema))) End If Me.GetSerializationData(info, context) Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler AddHandler Me.Relations.CollectionChanged, schemaChangedHandler End Sub _ Public ReadOnly Property AOIQ_Temp() As AOIQ_TempDataTable Get Return Me.tableAOIQ_Temp End Get End Property _ Public ReadOnly Property batch() As batchDataTable Get Return Me.tablebatch End Get End Property _ Public ReadOnly Property card() As cardDataTable Get Return Me.tablecard End Get End Property _ Public ReadOnly Property card_backup() As card_backupDataTable Get Return Me.tablecard_backup End Get End Property _ Public ReadOnly Property card_Hist() As card_HistDataTable Get Return Me.tablecard_Hist End Get End Property _ Public ReadOnly Property cardHist() As cardHistDataTable Get Return Me.tablecardHist End Get End Property _ Public ReadOnly Property component_parts() As component_partsDataTable Get Return Me.tablecomponent_parts End Get End Property _ Public ReadOnly Property CTS() As CTSDataTable Get Return Me.tableCTS End Get End Property _ Public ReadOnly Property defectCatProd() As defectCatProdDataTable Get Return Me.tabledefectCatProd End Get End Property _ Public ReadOnly Property defectCatProdHist() As defectCatProdHistDataTable Get Return Me.tabledefectCatProdHist End Get End Property _ Public ReadOnly Property defectCatQC() As defectCatQCDataTable Get Return Me.tabledefectCatQC End Get End Property _ Public ReadOnly Property defectCatQCHist() As defectCatQCHistDataTable Get Return Me.tabledefectCatQCHist End Get End Property _ Public ReadOnly Property defectProd() As defectProdDataTable Get Return Me.tabledefectProd End Get End Property _ Public ReadOnly Property defectProdHist() As defectProdHistDataTable Get Return Me.tabledefectProdHist End Get End Property _ Public ReadOnly Property defectQC() As defectQCDataTable Get Return Me.tabledefectQC End Get End Property _ Public ReadOnly Property defectQCHist() As defectQCHistDataTable Get Return Me.tabledefectQCHist End Get End Property _ Public ReadOnly Property FA_NewPT() As FA_NewPTDataTable Get Return Me.tableFA_NewPT End Get End Property _ Public ReadOnly Property faNo() As faNoDataTable Get Return Me.tablefaNo End Get End Property _ Public ReadOnly Property KITTING() As KITTINGDataTable Get Return Me.tableKITTING End Get End Property _ Public ReadOnly Property KMOUNTING() As KMOUNTINGDataTable Get Return Me.tableKMOUNTING End Get End Property _ Public ReadOnly Property KSEQUENCE_DETAIL() As KSEQUENCE_DETAILDataTable Get Return Me.tableKSEQUENCE_DETAIL End Get End Property _ Public ReadOnly Property KSEQUENCE_HEADER() As KSEQUENCE_HEADERDataTable Get Return Me.tableKSEQUENCE_HEADER End Get End Property _ Public ReadOnly Property KSETTINGS() As KSETTINGSDataTable Get Return Me.tableKSETTINGS End Get End Property _ Public ReadOnly Property LabelDef() As LabelDefDataTable Get Return Me.tableLabelDef End Get End Property _ Public ReadOnly Property LabelDefHist() As LabelDefHistDataTable Get Return Me.tableLabelDefHist End Get End Property _ Public ReadOnly Property log_action() As log_actionDataTable Get Return Me.tablelog_action End Get End Property _ Public ReadOnly Property log_alvarion_serial() As log_alvarion_serialDataTable Get Return Me.tablelog_alvarion_serial End Get End Property _ Public ReadOnly Property log_ATE_error() As log_ATE_errorDataTable Get Return Me.tablelog_ATE_error End Get End Property _ Public ReadOnly Property log_BL_Detail() As log_BL_DetailDataTable Get Return Me.tablelog_BL_Detail End Get End Property _ Public ReadOnly Property log_BL_Detail_Hist() As log_BL_Detail_HistDataTable Get Return Me.tablelog_BL_Detail_Hist End Get End Property _ Public ReadOnly Property log_BL_Header() As log_BL_HeaderDataTable Get Return Me.tablelog_BL_Header End Get End Property _ Public ReadOnly Property log_BL_Header_Hist() As log_BL_Header_HistDataTable Get Return Me.tablelog_BL_Header_Hist End Get End Property _ Public ReadOnly Property log_CAPA() As log_CAPADataTable Get Return Me.tablelog_CAPA End Get End Property _ Public ReadOnly Property log_card() As log_cardDataTable Get Return Me.tablelog_card End Get End Property _ Public ReadOnly Property log_CT_Detail() As log_CT_DetailDataTable Get Return Me.tablelog_CT_Detail End Get End Property _ Public ReadOnly Property log_CT_Detail_Hist() As log_CT_Detail_HistDataTable Get Return Me.tablelog_CT_Detail_Hist End Get End Property _ Public ReadOnly Property log_CT_Header() As log_CT_HeaderDataTable Get Return Me.tablelog_CT_Header End Get End Property _ Public ReadOnly Property log_CT_Header_Hist() As log_CT_Header_HistDataTable Get Return Me.tablelog_CT_Header_Hist End Get End Property _ Public ReadOnly Property log_ct_header_temp() As log_ct_header_tempDataTable Get Return Me.tablelog_ct_header_temp End Get End Property _ Public ReadOnly Property log_DA() As log_DADataTable Get Return Me.tablelog_DA End Get End Property _ Public ReadOnly Property log_label() As log_labelDataTable Get Return Me.tablelog_label End Get End Property _ Public ReadOnly Property log_labelHist() As log_labelHistDataTable Get Return Me.tablelog_labelHist End Get End Property _ Public ReadOnly Property log_link() As log_linkDataTable Get Return Me.tablelog_link End Get End Property _ Public ReadOnly Property log_linkHist() As log_linkHistDataTable Get Return Me.tablelog_linkHist End Get End Property _ Public ReadOnly Property log_lot() As log_lotDataTable Get Return Me.tablelog_lot End Get End Property _ Public ReadOnly Property log_pass() As log_passDataTable Get Return Me.tablelog_pass End Get End Property _ Public ReadOnly Property log_pass_serial() As log_pass_serialDataTable Get Return Me.tablelog_pass_serial End Get End Property _ Public ReadOnly Property log_PreTest_Detail() As log_PreTest_DetailDataTable Get Return Me.tablelog_PreTest_Detail End Get End Property _ Public ReadOnly Property log_repair() As log_repairDataTable Get Return Me.tablelog_repair End Get End Property _ Public ReadOnly Property log_repair_fa() As log_repair_faDataTable Get Return Me.tablelog_repair_fa End Get End Property _ Public ReadOnly Property log_repair_serial() As log_repair_serialDataTable Get Return Me.tablelog_repair_serial End Get End Property _ Public ReadOnly Property log_serial() As log_serialDataTable Get Return Me.tablelog_serial End Get End Property _ Public ReadOnly Property log_SH_Detail() As log_SH_DetailDataTable Get Return Me.tablelog_SH_Detail End Get End Property _ Public ReadOnly Property log_SH_Detail_Hist() As log_SH_Detail_HistDataTable Get Return Me.tablelog_SH_Detail_Hist End Get End Property _ Public ReadOnly Property log_SH_Header() As log_SH_HeaderDataTable Get Return Me.tablelog_SH_Header End Get End Property _ Public ReadOnly Property log_SH_Header_Hist() As log_SH_Header_HistDataTable Get Return Me.tablelog_SH_Header_Hist End Get End Property _ Public ReadOnly Property lotNo() As lotNoDataTable Get Return Me.tablelotNo End Get End Property _ Public ReadOnly Property LotNumber() As LotNumberDataTable Get Return Me.tableLotNumber End Get End Property _ Public ReadOnly Property machine() As machineDataTable Get Return Me.tablemachine End Get End Property _ Public ReadOnly Property machineHist() As machineHistDataTable Get Return Me.tablemachineHist End Get End Property _ Public ReadOnly Property model() As modelDataTable Get Return Me.tablemodel End Get End Property _ Public ReadOnly Property modelBackup() As modelBackupDataTable Get Return Me.tablemodelBackup End Get End Property _ Public ReadOnly Property modelDim() As modelDimDataTable Get Return Me.tablemodelDim End Get End Property _ Public ReadOnly Property modelDimHist() As modelDimHistDataTable Get Return Me.tablemodelDimHist End Get End Property _ Public ReadOnly Property modelFamily() As modelFamilyDataTable Get Return Me.tablemodelFamily End Get End Property _ Public ReadOnly Property modelFamilyHist() As modelFamilyHistDataTable Get Return Me.tablemodelFamilyHist End Get End Property _ Public ReadOnly Property modelHierarchy() As modelHierarchyDataTable Get Return Me.tablemodelHierarchy End Get End Property _ Public ReadOnly Property modelHierarchyHist() As modelHierarchyHistDataTable Get Return Me.tablemodelHierarchyHist End Get End Property _ Public ReadOnly Property modelHist() As modelHistDataTable Get Return Me.tablemodelHist End Get End Property _ Public ReadOnly Property modelRoute() As modelRouteDataTable Get Return Me.tablemodelRoute End Get End Property _ Public ReadOnly Property modelRoute_backup_1() As modelRoute_backup_1DataTable Get Return Me.tablemodelRoute_backup_1 End Get End Property _ Public ReadOnly Property modelRouteHist() As modelRouteHistDataTable Get Return Me.tablemodelRouteHist End Get End Property _ Public ReadOnly Property modelTemp() As modelTempDataTable Get Return Me.tablemodelTemp End Get End Property _ Public ReadOnly Property modelType() As modelTypeDataTable Get Return Me.tablemodelType End Get End Property _ Public ReadOnly Property modelTypeHist() As modelTypeHistDataTable Get Return Me.tablemodelTypeHist End Get End Property _ Public ReadOnly Property Parts_List() As Parts_ListDataTable Get Return Me.tableParts_List End Get End Property _ Public ReadOnly Property partsCode() As partsCodeDataTable Get Return Me.tablepartsCode End Get End Property _ Public ReadOnly Property PartsModel() As PartsModelDataTable Get Return Me.tablePartsModel End Get End Property _ Public ReadOnly Property PartsPrep() As PartsPrepDataTable Get Return Me.tablePartsPrep End Get End Property _ Public ReadOnly Property PartsRecords() As PartsRecordsDataTable Get Return Me.tablePartsRecords End Get End Property _ Public ReadOnly Property partsStation() As partsStationDataTable Get Return Me.tablepartsStation End Get End Property _ Public ReadOnly Property partsSupplier() As partsSupplierDataTable Get Return Me.tablepartsSupplier End Get End Property _ Public ReadOnly Property po_detail() As po_detailDataTable Get Return Me.tablepo_detail End Get End Property _ Public ReadOnly Property po_detail_backup() As po_detail_backupDataTable Get Return Me.tablepo_detail_backup End Get End Property _ Public ReadOnly Property po_detail_temp() As po_detail_tempDataTable Get Return Me.tablepo_detail_temp End Get End Property _ Public ReadOnly Property po_header() As po_headerDataTable Get Return Me.tablepo_header End Get End Property _ Public ReadOnly Property po_header_backup() As po_header_backupDataTable Get Return Me.tablepo_header_backup End Get End Property _ Public ReadOnly Property po_history_detail() As po_history_detailDataTable Get Return Me.tablepo_history_detail End Get End Property _ Public ReadOnly Property po_orig_detail() As po_orig_detailDataTable Get Return Me.tablepo_orig_detail End Get End Property _ Public ReadOnly Property po_orig_header() As po_orig_headerDataTable Get Return Me.tablepo_orig_header End Get End Property _ Public ReadOnly Property printer() As printerDataTable Get Return Me.tableprinter End Get End Property _ Public ReadOnly Property pt() As ptDataTable Get Return Me.tablept End Get End Property _ Public ReadOnly Property pt_Hist() As pt_HistDataTable Get Return Me.tablept_Hist End Get End Property _ Public ReadOnly Property serialAlvariset() As serialAlvarisetDataTable Get Return Me.tableserialAlvariset End Get End Property _ Public ReadOnly Property serialMac() As serialMacDataTable Get Return Me.tableserialMac End Get End Property _ Public ReadOnly Property SHIPPER_REPORT_TABLE() As SHIPPER_REPORT_TABLEDataTable Get Return Me.tableSHIPPER_REPORT_TABLE End Get End Property _ Public ReadOnly Property SHIPPER_STATUS() As SHIPPER_STATUSDataTable Get Return Me.tableSHIPPER_STATUS End Get End Property _ Public ReadOnly Property SHIPPER_SUMMARY_TABLE() As SHIPPER_SUMMARY_TABLEDataTable Get Return Me.tableSHIPPER_SUMMARY_TABLE End Get End Property _ Public ReadOnly Property station() As stationDataTable Get Return Me.tablestation End Get End Property _ Public ReadOnly Property station_convert() As station_convertDataTable Get Return Me.tablestation_convert End Get End Property _ Public ReadOnly Property stationHist() As stationHistDataTable Get Return Me.tablestationHist End Get End Property _ Public ReadOnly Property users() As usersDataTable Get Return Me.tableusers End Get End Property _ Public ReadOnly Property usersHist() As usersHistDataTable Get Return Me.tableusersHist End Get End Property _ Public ReadOnly Property WIP_TEMP() As WIP_TEMPDataTable Get Return Me.tableWIP_TEMP End Get End Property _ Public ReadOnly Property _CTSB9_00001() As _CTSB9_00001DataTable Get Return Me._tableCTSB9_00001 End Get End Property _ Public ReadOnly Property _CTSB9_00002() As _CTSB9_00002DataTable Get Return Me._tableCTSB9_00002 End Get End Property _ Public ReadOnly Property getMaxDate() As getMaxDateDataTable Get Return Me.tablegetMaxDate End Get End Property _ Public ReadOnly Property getMinDate() As getMinDateDataTable Get Return Me.tablegetMinDate End Get End Property _ Public ReadOnly Property Shipper_File() As Shipper_FileDataTable Get Return Me.tableShipper_File End Get End Property _ Public ReadOnly Property Shipper_File_Body() As Shipper_File_BodyDataTable Get Return Me.tableShipper_File_Body End Get End Property _ Public ReadOnly Property Shipper_File_Header() As Shipper_File_HeaderDataTable Get Return Me.tableShipper_File_Header End Get End Property _ Public ReadOnly Property container() As containerDataTable Get Return Me.tablecontainer End Get End Property _ Public ReadOnly Property createView() As createViewDataTable Get Return Me.tablecreateView End Get End Property _ Public ReadOnly Property item() As itemDataTable Get Return Me.tableitem End Get End Property _ Public ReadOnly Property PO() As PODataTable Get Return Me.tablePO End Get End Property _ Public ReadOnly Property POLINE() As POLINEDataTable Get Return Me.tablePOLINE End Get End Property _ Public ReadOnly Property shipAdd1() As shipAdd1DataTable Get Return Me.tableshipAdd1 End Get End Property _ Public ReadOnly Property shipAdd2() As shipAdd2DataTable Get Return Me.tableshipAdd2 End Get End Property _ Public ReadOnly Property shipAdd3() As shipAdd3DataTable Get Return Me.tableshipAdd3 End Get End Property _ Public ReadOnly Property validatePOTransfer() As validatePOTransferDataTable Get Return Me.tablevalidatePOTransfer End Get End Property _ Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode Get Return Me._schemaSerializationMode End Get Set Me._schemaSerializationMode = value End Set End Property _ Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection Get Return MyBase.Tables End Get End Property _ Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection Get Return MyBase.Relations End Get End Property _ Protected Overrides Sub InitializeDerivedDataSet() Me.BeginInit Me.InitClass Me.EndInit End Sub _ Public Overrides Function Clone() As Global.System.Data.DataSet Dim cln As EpsonDataSet1 = CType(MyBase.Clone,EpsonDataSet1) cln.InitVars cln.SchemaSerializationMode = Me.SchemaSerializationMode Return cln End Function _ Protected Overrides Function ShouldSerializeTables() As Boolean Return false End Function _ Protected Overrides Function ShouldSerializeRelations() As Boolean Return false End Function _ Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader) If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then Me.Reset Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet() ds.ReadXml(reader) If (Not (ds.Tables("AOIQ_Temp")) Is Nothing) Then MyBase.Tables.Add(New AOIQ_TempDataTable(ds.Tables("AOIQ_Temp"))) End If If (Not (ds.Tables("batch")) Is Nothing) Then MyBase.Tables.Add(New batchDataTable(ds.Tables("batch"))) End If If (Not (ds.Tables("card")) Is Nothing) Then MyBase.Tables.Add(New cardDataTable(ds.Tables("card"))) End If If (Not (ds.Tables("card_backup")) Is Nothing) Then MyBase.Tables.Add(New card_backupDataTable(ds.Tables("card_backup"))) End If If (Not (ds.Tables("card_Hist")) Is Nothing) Then MyBase.Tables.Add(New card_HistDataTable(ds.Tables("card_Hist"))) End If If (Not (ds.Tables("cardHist")) Is Nothing) Then MyBase.Tables.Add(New cardHistDataTable(ds.Tables("cardHist"))) End If If (Not (ds.Tables("component_parts")) Is Nothing) Then MyBase.Tables.Add(New component_partsDataTable(ds.Tables("component_parts"))) End If If (Not (ds.Tables("CTS")) Is Nothing) Then MyBase.Tables.Add(New CTSDataTable(ds.Tables("CTS"))) End If If (Not (ds.Tables("defectCatProd")) Is Nothing) Then MyBase.Tables.Add(New defectCatProdDataTable(ds.Tables("defectCatProd"))) End If If (Not (ds.Tables("defectCatProdHist")) Is Nothing) Then MyBase.Tables.Add(New defectCatProdHistDataTable(ds.Tables("defectCatProdHist"))) End If If (Not (ds.Tables("defectCatQC")) Is Nothing) Then MyBase.Tables.Add(New defectCatQCDataTable(ds.Tables("defectCatQC"))) End If If (Not (ds.Tables("defectCatQCHist")) Is Nothing) Then MyBase.Tables.Add(New defectCatQCHistDataTable(ds.Tables("defectCatQCHist"))) End If If (Not (ds.Tables("defectProd")) Is Nothing) Then MyBase.Tables.Add(New defectProdDataTable(ds.Tables("defectProd"))) End If If (Not (ds.Tables("defectProdHist")) Is Nothing) Then MyBase.Tables.Add(New defectProdHistDataTable(ds.Tables("defectProdHist"))) End If If (Not (ds.Tables("defectQC")) Is Nothing) Then MyBase.Tables.Add(New defectQCDataTable(ds.Tables("defectQC"))) End If If (Not (ds.Tables("defectQCHist")) Is Nothing) Then MyBase.Tables.Add(New defectQCHistDataTable(ds.Tables("defectQCHist"))) End If If (Not (ds.Tables("FA_NewPT")) Is Nothing) Then MyBase.Tables.Add(New FA_NewPTDataTable(ds.Tables("FA_NewPT"))) End If If (Not (ds.Tables("faNo")) Is Nothing) Then MyBase.Tables.Add(New faNoDataTable(ds.Tables("faNo"))) End If If (Not (ds.Tables("KITTING")) Is Nothing) Then MyBase.Tables.Add(New KITTINGDataTable(ds.Tables("KITTING"))) End If If (Not (ds.Tables("KMOUNTING")) Is Nothing) Then MyBase.Tables.Add(New KMOUNTINGDataTable(ds.Tables("KMOUNTING"))) End If If (Not (ds.Tables("KSEQUENCE_DETAIL")) Is Nothing) Then MyBase.Tables.Add(New KSEQUENCE_DETAILDataTable(ds.Tables("KSEQUENCE_DETAIL"))) End If If (Not (ds.Tables("KSEQUENCE_HEADER")) Is Nothing) Then MyBase.Tables.Add(New KSEQUENCE_HEADERDataTable(ds.Tables("KSEQUENCE_HEADER"))) End If If (Not (ds.Tables("KSETTINGS")) Is Nothing) Then MyBase.Tables.Add(New KSETTINGSDataTable(ds.Tables("KSETTINGS"))) End If If (Not (ds.Tables("LabelDef")) Is Nothing) Then MyBase.Tables.Add(New LabelDefDataTable(ds.Tables("LabelDef"))) End If If (Not (ds.Tables("LabelDefHist")) Is Nothing) Then MyBase.Tables.Add(New LabelDefHistDataTable(ds.Tables("LabelDefHist"))) End If If (Not (ds.Tables("log_action")) Is Nothing) Then MyBase.Tables.Add(New log_actionDataTable(ds.Tables("log_action"))) End If If (Not (ds.Tables("log_alvarion_serial")) Is Nothing) Then MyBase.Tables.Add(New log_alvarion_serialDataTable(ds.Tables("log_alvarion_serial"))) End If If (Not (ds.Tables("log_ATE_error")) Is Nothing) Then MyBase.Tables.Add(New log_ATE_errorDataTable(ds.Tables("log_ATE_error"))) End If If (Not (ds.Tables("log_BL_Detail")) Is Nothing) Then MyBase.Tables.Add(New log_BL_DetailDataTable(ds.Tables("log_BL_Detail"))) End If If (Not (ds.Tables("log_BL_Detail_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_BL_Detail_HistDataTable(ds.Tables("log_BL_Detail_Hist"))) End If If (Not (ds.Tables("log_BL_Header")) Is Nothing) Then MyBase.Tables.Add(New log_BL_HeaderDataTable(ds.Tables("log_BL_Header"))) End If If (Not (ds.Tables("log_BL_Header_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_BL_Header_HistDataTable(ds.Tables("log_BL_Header_Hist"))) End If If (Not (ds.Tables("log_CAPA")) Is Nothing) Then MyBase.Tables.Add(New log_CAPADataTable(ds.Tables("log_CAPA"))) End If If (Not (ds.Tables("log_card")) Is Nothing) Then MyBase.Tables.Add(New log_cardDataTable(ds.Tables("log_card"))) End If If (Not (ds.Tables("log_CT_Detail")) Is Nothing) Then MyBase.Tables.Add(New log_CT_DetailDataTable(ds.Tables("log_CT_Detail"))) End If If (Not (ds.Tables("log_CT_Detail_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_CT_Detail_HistDataTable(ds.Tables("log_CT_Detail_Hist"))) End If If (Not (ds.Tables("log_CT_Header")) Is Nothing) Then MyBase.Tables.Add(New log_CT_HeaderDataTable(ds.Tables("log_CT_Header"))) End If If (Not (ds.Tables("log_CT_Header_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_CT_Header_HistDataTable(ds.Tables("log_CT_Header_Hist"))) End If If (Not (ds.Tables("log_ct_header_temp")) Is Nothing) Then MyBase.Tables.Add(New log_ct_header_tempDataTable(ds.Tables("log_ct_header_temp"))) End If If (Not (ds.Tables("log_DA")) Is Nothing) Then MyBase.Tables.Add(New log_DADataTable(ds.Tables("log_DA"))) End If If (Not (ds.Tables("log_label")) Is Nothing) Then MyBase.Tables.Add(New log_labelDataTable(ds.Tables("log_label"))) End If If (Not (ds.Tables("log_labelHist")) Is Nothing) Then MyBase.Tables.Add(New log_labelHistDataTable(ds.Tables("log_labelHist"))) End If If (Not (ds.Tables("log_link")) Is Nothing) Then MyBase.Tables.Add(New log_linkDataTable(ds.Tables("log_link"))) End If If (Not (ds.Tables("log_linkHist")) Is Nothing) Then MyBase.Tables.Add(New log_linkHistDataTable(ds.Tables("log_linkHist"))) End If If (Not (ds.Tables("log_lot")) Is Nothing) Then MyBase.Tables.Add(New log_lotDataTable(ds.Tables("log_lot"))) End If If (Not (ds.Tables("log_pass")) Is Nothing) Then MyBase.Tables.Add(New log_passDataTable(ds.Tables("log_pass"))) End If If (Not (ds.Tables("log_pass_serial")) Is Nothing) Then MyBase.Tables.Add(New log_pass_serialDataTable(ds.Tables("log_pass_serial"))) End If If (Not (ds.Tables("log_PreTest_Detail")) Is Nothing) Then MyBase.Tables.Add(New log_PreTest_DetailDataTable(ds.Tables("log_PreTest_Detail"))) End If If (Not (ds.Tables("log_repair")) Is Nothing) Then MyBase.Tables.Add(New log_repairDataTable(ds.Tables("log_repair"))) End If If (Not (ds.Tables("log_repair_fa")) Is Nothing) Then MyBase.Tables.Add(New log_repair_faDataTable(ds.Tables("log_repair_fa"))) End If If (Not (ds.Tables("log_repair_serial")) Is Nothing) Then MyBase.Tables.Add(New log_repair_serialDataTable(ds.Tables("log_repair_serial"))) End If If (Not (ds.Tables("log_serial")) Is Nothing) Then MyBase.Tables.Add(New log_serialDataTable(ds.Tables("log_serial"))) End If If (Not (ds.Tables("log_SH_Detail")) Is Nothing) Then MyBase.Tables.Add(New log_SH_DetailDataTable(ds.Tables("log_SH_Detail"))) End If If (Not (ds.Tables("log_SH_Detail_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_SH_Detail_HistDataTable(ds.Tables("log_SH_Detail_Hist"))) End If If (Not (ds.Tables("log_SH_Header")) Is Nothing) Then MyBase.Tables.Add(New log_SH_HeaderDataTable(ds.Tables("log_SH_Header"))) End If If (Not (ds.Tables("log_SH_Header_Hist")) Is Nothing) Then MyBase.Tables.Add(New log_SH_Header_HistDataTable(ds.Tables("log_SH_Header_Hist"))) End If If (Not (ds.Tables("lotNo")) Is Nothing) Then MyBase.Tables.Add(New lotNoDataTable(ds.Tables("lotNo"))) End If If (Not (ds.Tables("LotNumber")) Is Nothing) Then MyBase.Tables.Add(New LotNumberDataTable(ds.Tables("LotNumber"))) End If If (Not (ds.Tables("machine")) Is Nothing) Then MyBase.Tables.Add(New machineDataTable(ds.Tables("machine"))) End If If (Not (ds.Tables("machineHist")) Is Nothing) Then MyBase.Tables.Add(New machineHistDataTable(ds.Tables("machineHist"))) End If If (Not (ds.Tables("model")) Is Nothing) Then MyBase.Tables.Add(New modelDataTable(ds.Tables("model"))) End If If (Not (ds.Tables("modelBackup")) Is Nothing) Then MyBase.Tables.Add(New modelBackupDataTable(ds.Tables("modelBackup"))) End If If (Not (ds.Tables("modelDim")) Is Nothing) Then MyBase.Tables.Add(New modelDimDataTable(ds.Tables("modelDim"))) End If If (Not (ds.Tables("modelDimHist")) Is Nothing) Then MyBase.Tables.Add(New modelDimHistDataTable(ds.Tables("modelDimHist"))) End If If (Not (ds.Tables("modelFamily")) Is Nothing) Then MyBase.Tables.Add(New modelFamilyDataTable(ds.Tables("modelFamily"))) End If If (Not (ds.Tables("modelFamilyHist")) Is Nothing) Then MyBase.Tables.Add(New modelFamilyHistDataTable(ds.Tables("modelFamilyHist"))) End If If (Not (ds.Tables("modelHierarchy")) Is Nothing) Then MyBase.Tables.Add(New modelHierarchyDataTable(ds.Tables("modelHierarchy"))) End If If (Not (ds.Tables("modelHierarchyHist")) Is Nothing) Then MyBase.Tables.Add(New modelHierarchyHistDataTable(ds.Tables("modelHierarchyHist"))) End If If (Not (ds.Tables("modelHist")) Is Nothing) Then MyBase.Tables.Add(New modelHistDataTable(ds.Tables("modelHist"))) End If If (Not (ds.Tables("modelRoute")) Is Nothing) Then MyBase.Tables.Add(New modelRouteDataTable(ds.Tables("modelRoute"))) End If If (Not (ds.Tables("modelRoute_backup_1")) Is Nothing) Then MyBase.Tables.Add(New modelRoute_backup_1DataTable(ds.Tables("modelRoute_backup_1"))) End If If (Not (ds.Tables("modelRouteHist")) Is Nothing) Then MyBase.Tables.Add(New modelRouteHistDataTable(ds.Tables("modelRouteHist"))) End If If (Not (ds.Tables("modelTemp")) Is Nothing) Then MyBase.Tables.Add(New modelTempDataTable(ds.Tables("modelTemp"))) End If If (Not (ds.Tables("modelType")) Is Nothing) Then MyBase.Tables.Add(New modelTypeDataTable(ds.Tables("modelType"))) End If If (Not (ds.Tables("modelTypeHist")) Is Nothing) Then MyBase.Tables.Add(New modelTypeHistDataTable(ds.Tables("modelTypeHist"))) End If If (Not (ds.Tables("Parts_List")) Is Nothing) Then MyBase.Tables.Add(New Parts_ListDataTable(ds.Tables("Parts_List"))) End If If (Not (ds.Tables("partsCode")) Is Nothing) Then MyBase.Tables.Add(New partsCodeDataTable(ds.Tables("partsCode"))) End If If (Not (ds.Tables("PartsModel")) Is Nothing) Then MyBase.Tables.Add(New PartsModelDataTable(ds.Tables("PartsModel"))) End If If (Not (ds.Tables("PartsPrep")) Is Nothing) Then MyBase.Tables.Add(New PartsPrepDataTable(ds.Tables("PartsPrep"))) End If If (Not (ds.Tables("PartsRecords")) Is Nothing) Then MyBase.Tables.Add(New PartsRecordsDataTable(ds.Tables("PartsRecords"))) End If If (Not (ds.Tables("partsStation")) Is Nothing) Then MyBase.Tables.Add(New partsStationDataTable(ds.Tables("partsStation"))) End If If (Not (ds.Tables("partsSupplier")) Is Nothing) Then MyBase.Tables.Add(New partsSupplierDataTable(ds.Tables("partsSupplier"))) End If If (Not (ds.Tables("po_detail")) Is Nothing) Then MyBase.Tables.Add(New po_detailDataTable(ds.Tables("po_detail"))) End If If (Not (ds.Tables("po_detail_backup")) Is Nothing) Then MyBase.Tables.Add(New po_detail_backupDataTable(ds.Tables("po_detail_backup"))) End If If (Not (ds.Tables("po_detail_temp")) Is Nothing) Then MyBase.Tables.Add(New po_detail_tempDataTable(ds.Tables("po_detail_temp"))) End If If (Not (ds.Tables("po_header")) Is Nothing) Then MyBase.Tables.Add(New po_headerDataTable(ds.Tables("po_header"))) End If If (Not (ds.Tables("po_header_backup")) Is Nothing) Then MyBase.Tables.Add(New po_header_backupDataTable(ds.Tables("po_header_backup"))) End If If (Not (ds.Tables("po_history_detail")) Is Nothing) Then MyBase.Tables.Add(New po_history_detailDataTable(ds.Tables("po_history_detail"))) End If If (Not (ds.Tables("po_orig_detail")) Is Nothing) Then MyBase.Tables.Add(New po_orig_detailDataTable(ds.Tables("po_orig_detail"))) End If If (Not (ds.Tables("po_orig_header")) Is Nothing) Then MyBase.Tables.Add(New po_orig_headerDataTable(ds.Tables("po_orig_header"))) End If If (Not (ds.Tables("printer")) Is Nothing) Then MyBase.Tables.Add(New printerDataTable(ds.Tables("printer"))) End If If (Not (ds.Tables("pt")) Is Nothing) Then MyBase.Tables.Add(New ptDataTable(ds.Tables("pt"))) End If If (Not (ds.Tables("pt_Hist")) Is Nothing) Then MyBase.Tables.Add(New pt_HistDataTable(ds.Tables("pt_Hist"))) End If If (Not (ds.Tables("serialAlvariset")) Is Nothing) Then MyBase.Tables.Add(New serialAlvarisetDataTable(ds.Tables("serialAlvariset"))) End If If (Not (ds.Tables("serialMac")) Is Nothing) Then MyBase.Tables.Add(New serialMacDataTable(ds.Tables("serialMac"))) End If If (Not (ds.Tables("SHIPPER_REPORT_TABLE")) Is Nothing) Then MyBase.Tables.Add(New SHIPPER_REPORT_TABLEDataTable(ds.Tables("SHIPPER_REPORT_TABLE"))) End If If (Not (ds.Tables("SHIPPER_STATUS")) Is Nothing) Then MyBase.Tables.Add(New SHIPPER_STATUSDataTable(ds.Tables("SHIPPER_STATUS"))) End If If (Not (ds.Tables("SHIPPER_SUMMARY_TABLE")) Is Nothing) Then MyBase.Tables.Add(New SHIPPER_SUMMARY_TABLEDataTable(ds.Tables("SHIPPER_SUMMARY_TABLE"))) End If If (Not (ds.Tables("station")) Is Nothing) Then MyBase.Tables.Add(New stationDataTable(ds.Tables("station"))) End If If (Not (ds.Tables("station_convert")) Is Nothing) Then MyBase.Tables.Add(New station_convertDataTable(ds.Tables("station_convert"))) End If If (Not (ds.Tables("stationHist")) Is Nothing) Then MyBase.Tables.Add(New stationHistDataTable(ds.Tables("stationHist"))) End If If (Not (ds.Tables("users")) Is Nothing) Then MyBase.Tables.Add(New usersDataTable(ds.Tables("users"))) End If If (Not (ds.Tables("usersHist")) Is Nothing) Then MyBase.Tables.Add(New usersHistDataTable(ds.Tables("usersHist"))) End If If (Not (ds.Tables("WIP_TEMP")) Is Nothing) Then MyBase.Tables.Add(New WIP_TEMPDataTable(ds.Tables("WIP_TEMP"))) End If If (Not (ds.Tables("CTSB9-00001")) Is Nothing) Then MyBase.Tables.Add(New _CTSB9_00001DataTable(ds.Tables("CTSB9-00001"))) End If If (Not (ds.Tables("CTSB9-00002")) Is Nothing) Then MyBase.Tables.Add(New _CTSB9_00002DataTable(ds.Tables("CTSB9-00002"))) End If If (Not (ds.Tables("getMaxDate")) Is Nothing) Then MyBase.Tables.Add(New getMaxDateDataTable(ds.Tables("getMaxDate"))) End If If (Not (ds.Tables("getMinDate")) Is Nothing) Then MyBase.Tables.Add(New getMinDateDataTable(ds.Tables("getMinDate"))) End If If (Not (ds.Tables("Shipper_File")) Is Nothing) Then MyBase.Tables.Add(New Shipper_FileDataTable(ds.Tables("Shipper_File"))) End If If (Not (ds.Tables("Shipper_File_Body")) Is Nothing) Then MyBase.Tables.Add(New Shipper_File_BodyDataTable(ds.Tables("Shipper_File_Body"))) End If If (Not (ds.Tables("Shipper_File_Header")) Is Nothing) Then MyBase.Tables.Add(New Shipper_File_HeaderDataTable(ds.Tables("Shipper_File_Header"))) End If If (Not (ds.Tables("container")) Is Nothing) Then MyBase.Tables.Add(New containerDataTable(ds.Tables("container"))) End If If (Not (ds.Tables("createView")) Is Nothing) Then MyBase.Tables.Add(New createViewDataTable(ds.Tables("createView"))) End If If (Not (ds.Tables("item")) Is Nothing) Then MyBase.Tables.Add(New itemDataTable(ds.Tables("item"))) End If If (Not (ds.Tables("PO")) Is Nothing) Then MyBase.Tables.Add(New PODataTable(ds.Tables("PO"))) End If If (Not (ds.Tables("POLINE")) Is Nothing) Then MyBase.Tables.Add(New POLINEDataTable(ds.Tables("POLINE"))) End If If (Not (ds.Tables("shipAdd1")) Is Nothing) Then MyBase.Tables.Add(New shipAdd1DataTable(ds.Tables("shipAdd1"))) End If If (Not (ds.Tables("shipAdd2")) Is Nothing) Then MyBase.Tables.Add(New shipAdd2DataTable(ds.Tables("shipAdd2"))) End If If (Not (ds.Tables("shipAdd3")) Is Nothing) Then MyBase.Tables.Add(New shipAdd3DataTable(ds.Tables("shipAdd3"))) End If If (Not (ds.Tables("validatePOTransfer")) Is Nothing) Then MyBase.Tables.Add(New validatePOTransferDataTable(ds.Tables("validatePOTransfer"))) End If Me.DataSetName = ds.DataSetName Me.Prefix = ds.Prefix Me.Namespace = ds.Namespace Me.Locale = ds.Locale Me.CaseSensitive = ds.CaseSensitive Me.EnforceConstraints = ds.EnforceConstraints Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add) Me.InitVars Else Me.ReadXml(reader) Me.InitVars End If End Sub _ Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing)) stream.Position = 0 Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing) End Function _ Friend Overloads Sub InitVars() Me.InitVars(true) End Sub _ Friend Overloads Sub InitVars(ByVal initTable As Boolean) Me.tableAOIQ_Temp = CType(MyBase.Tables("AOIQ_Temp"),AOIQ_TempDataTable) If (initTable = true) Then If (Not (Me.tableAOIQ_Temp) Is Nothing) Then Me.tableAOIQ_Temp.InitVars End If End If Me.tablebatch = CType(MyBase.Tables("batch"),batchDataTable) If (initTable = true) Then If (Not (Me.tablebatch) Is Nothing) Then Me.tablebatch.InitVars End If End If Me.tablecard = CType(MyBase.Tables("card"),cardDataTable) If (initTable = true) Then If (Not (Me.tablecard) Is Nothing) Then Me.tablecard.InitVars End If End If Me.tablecard_backup = CType(MyBase.Tables("card_backup"),card_backupDataTable) If (initTable = true) Then If (Not (Me.tablecard_backup) Is Nothing) Then Me.tablecard_backup.InitVars End If End If Me.tablecard_Hist = CType(MyBase.Tables("card_Hist"),card_HistDataTable) If (initTable = true) Then If (Not (Me.tablecard_Hist) Is Nothing) Then Me.tablecard_Hist.InitVars End If End If Me.tablecardHist = CType(MyBase.Tables("cardHist"),cardHistDataTable) If (initTable = true) Then If (Not (Me.tablecardHist) Is Nothing) Then Me.tablecardHist.InitVars End If End If Me.tablecomponent_parts = CType(MyBase.Tables("component_parts"),component_partsDataTable) If (initTable = true) Then If (Not (Me.tablecomponent_parts) Is Nothing) Then Me.tablecomponent_parts.InitVars End If End If Me.tableCTS = CType(MyBase.Tables("CTS"),CTSDataTable) If (initTable = true) Then If (Not (Me.tableCTS) Is Nothing) Then Me.tableCTS.InitVars End If End If Me.tabledefectCatProd = CType(MyBase.Tables("defectCatProd"),defectCatProdDataTable) If (initTable = true) Then If (Not (Me.tabledefectCatProd) Is Nothing) Then Me.tabledefectCatProd.InitVars End If End If Me.tabledefectCatProdHist = CType(MyBase.Tables("defectCatProdHist"),defectCatProdHistDataTable) If (initTable = true) Then If (Not (Me.tabledefectCatProdHist) Is Nothing) Then Me.tabledefectCatProdHist.InitVars End If End If Me.tabledefectCatQC = CType(MyBase.Tables("defectCatQC"),defectCatQCDataTable) If (initTable = true) Then If (Not (Me.tabledefectCatQC) Is Nothing) Then Me.tabledefectCatQC.InitVars End If End If Me.tabledefectCatQCHist = CType(MyBase.Tables("defectCatQCHist"),defectCatQCHistDataTable) If (initTable = true) Then If (Not (Me.tabledefectCatQCHist) Is Nothing) Then Me.tabledefectCatQCHist.InitVars End If End If Me.tabledefectProd = CType(MyBase.Tables("defectProd"),defectProdDataTable) If (initTable = true) Then If (Not (Me.tabledefectProd) Is Nothing) Then Me.tabledefectProd.InitVars End If End If Me.tabledefectProdHist = CType(MyBase.Tables("defectProdHist"),defectProdHistDataTable) If (initTable = true) Then If (Not (Me.tabledefectProdHist) Is Nothing) Then Me.tabledefectProdHist.InitVars End If End If Me.tabledefectQC = CType(MyBase.Tables("defectQC"),defectQCDataTable) If (initTable = true) Then If (Not (Me.tabledefectQC) Is Nothing) Then Me.tabledefectQC.InitVars End If End If Me.tabledefectQCHist = CType(MyBase.Tables("defectQCHist"),defectQCHistDataTable) If (initTable = true) Then If (Not (Me.tabledefectQCHist) Is Nothing) Then Me.tabledefectQCHist.InitVars End If End If Me.tableFA_NewPT = CType(MyBase.Tables("FA_NewPT"),FA_NewPTDataTable) If (initTable = true) Then If (Not (Me.tableFA_NewPT) Is Nothing) Then Me.tableFA_NewPT.InitVars End If End If Me.tablefaNo = CType(MyBase.Tables("faNo"),faNoDataTable) If (initTable = true) Then If (Not (Me.tablefaNo) Is Nothing) Then Me.tablefaNo.InitVars End If End If Me.tableKITTING = CType(MyBase.Tables("KITTING"),KITTINGDataTable) If (initTable = true) Then If (Not (Me.tableKITTING) Is Nothing) Then Me.tableKITTING.InitVars End If End If Me.tableKMOUNTING = CType(MyBase.Tables("KMOUNTING"),KMOUNTINGDataTable) If (initTable = true) Then If (Not (Me.tableKMOUNTING) Is Nothing) Then Me.tableKMOUNTING.InitVars End If End If Me.tableKSEQUENCE_DETAIL = CType(MyBase.Tables("KSEQUENCE_DETAIL"),KSEQUENCE_DETAILDataTable) If (initTable = true) Then If (Not (Me.tableKSEQUENCE_DETAIL) Is Nothing) Then Me.tableKSEQUENCE_DETAIL.InitVars End If End If Me.tableKSEQUENCE_HEADER = CType(MyBase.Tables("KSEQUENCE_HEADER"),KSEQUENCE_HEADERDataTable) If (initTable = true) Then If (Not (Me.tableKSEQUENCE_HEADER) Is Nothing) Then Me.tableKSEQUENCE_HEADER.InitVars End If End If Me.tableKSETTINGS = CType(MyBase.Tables("KSETTINGS"),KSETTINGSDataTable) If (initTable = true) Then If (Not (Me.tableKSETTINGS) Is Nothing) Then Me.tableKSETTINGS.InitVars End If End If Me.tableLabelDef = CType(MyBase.Tables("LabelDef"),LabelDefDataTable) If (initTable = true) Then If (Not (Me.tableLabelDef) Is Nothing) Then Me.tableLabelDef.InitVars End If End If Me.tableLabelDefHist = CType(MyBase.Tables("LabelDefHist"),LabelDefHistDataTable) If (initTable = true) Then If (Not (Me.tableLabelDefHist) Is Nothing) Then Me.tableLabelDefHist.InitVars End If End If Me.tablelog_action = CType(MyBase.Tables("log_action"),log_actionDataTable) If (initTable = true) Then If (Not (Me.tablelog_action) Is Nothing) Then Me.tablelog_action.InitVars End If End If Me.tablelog_alvarion_serial = CType(MyBase.Tables("log_alvarion_serial"),log_alvarion_serialDataTable) If (initTable = true) Then If (Not (Me.tablelog_alvarion_serial) Is Nothing) Then Me.tablelog_alvarion_serial.InitVars End If End If Me.tablelog_ATE_error = CType(MyBase.Tables("log_ATE_error"),log_ATE_errorDataTable) If (initTable = true) Then If (Not (Me.tablelog_ATE_error) Is Nothing) Then Me.tablelog_ATE_error.InitVars End If End If Me.tablelog_BL_Detail = CType(MyBase.Tables("log_BL_Detail"),log_BL_DetailDataTable) If (initTable = true) Then If (Not (Me.tablelog_BL_Detail) Is Nothing) Then Me.tablelog_BL_Detail.InitVars End If End If Me.tablelog_BL_Detail_Hist = CType(MyBase.Tables("log_BL_Detail_Hist"),log_BL_Detail_HistDataTable) If (initTable = true) Then If (Not (Me.tablelog_BL_Detail_Hist) Is Nothing) Then Me.tablelog_BL_Detail_Hist.InitVars End If End If Me.tablelog_BL_Header = CType(MyBase.Tables("log_BL_Header"),log_BL_HeaderDataTable) If (initTable = true) Then If (Not (Me.tablelog_BL_Header) Is Nothing) Then Me.tablelog_BL_Header.InitVars End If End If Me.tablelog_BL_Header_Hist = CType(MyBase.Tables("log_BL_Header_Hist"),log_BL_Header_HistDataTable) If (initTable = true) Then If (Not (Me.tablelog_BL_Header_Hist) Is Nothing) Then Me.tablelog_BL_Header_Hist.InitVars End If End If Me.tablelog_CAPA = CType(MyBase.Tables("log_CAPA"),log_CAPADataTable) If (initTable = true) Then If (Not (Me.tablelog_CAPA) Is Nothing) Then Me.tablelog_CAPA.InitVars End If End If Me.tablelog_card = CType(MyBase.Tables("log_card"),log_cardDataTable) If (initTable = true) Then If (Not (Me.tablelog_card) Is Nothing) Then Me.tablelog_card.InitVars End If End If Me.tablelog_CT_Detail = CType(MyBase.Tables("log_CT_Detail"),log_CT_DetailDataTable) If (initTable = true) Then If (Not (Me.tablelog_CT_Detail) Is Nothing) Then Me.tablelog_CT_Detail.InitVars End If End If Me.tablelog_CT_Detail_Hist = CType(MyBase.Tables("log_CT_Detail_Hist"),log_CT_Detail_HistDataTable) If (initTable = true) Then If (Not (Me.tablelog_CT_Detail_Hist) Is Nothing) Then Me.tablelog_CT_Detail_Hist.InitVars End If End If Me.tablelog_CT_Header = CType(MyBase.Tables("log_CT_Header"),log_CT_HeaderDataTable) If (initTable = true) Then If (Not (Me.tablelog_CT_Header) Is Nothing) Then Me.tablelog_CT_Header.InitVars End If End If Me.tablelog_CT_Header_Hist = CType(MyBase.Tables("log_CT_Header_Hist"),log_CT_Header_HistDataTable) If (initTable = true) Then If (Not (Me.tablelog_CT_Header_Hist) Is Nothing) Then Me.tablelog_CT_Header_Hist.InitVars End If End If Me.tablelog_ct_header_temp = CType(MyBase.Tables("log_ct_header_temp"),log_ct_header_tempDataTable) If (initTable = true) Then If (Not (Me.tablelog_ct_header_temp) Is Nothing) Then Me.tablelog_ct_header_temp.InitVars End If End If Me.tablelog_DA = CType(MyBase.Tables("log_DA"),log_DADataTable) If (initTable = true) Then If (Not (Me.tablelog_DA) Is Nothing) Then Me.tablelog_DA.InitVars End If End If Me.tablelog_label = CType(MyBase.Tables("log_label"),log_labelDataTable) If (initTable = true) Then If (Not (Me.tablelog_label) Is Nothing) Then Me.tablelog_label.InitVars End If End If Me.tablelog_labelHist = CType(MyBase.Tables("log_labelHist"),log_labelHistDataTable) If (initTable = true) Then If (Not (Me.tablelog_labelHist) Is Nothing) Then Me.tablelog_labelHist.InitVars End If End If Me.tablelog_link = CType(MyBase.Tables("log_link"),log_linkDataTable) If (initTable = true) Then If (Not (Me.tablelog_link) Is Nothing) Then Me.tablelog_link.InitVars End If End If Me.tablelog_linkHist = CType(MyBase.Tables("log_linkHist"),log_linkHistDataTable) If (initTable = true) Then If (Not (Me.tablelog_linkHist) Is Nothing) Then Me.tablelog_linkHist.InitVars End If End If Me.tablelog_lot = CType(MyBase.Tables("log_lot"),log_lotDataTable) If (initTable = true) Then If (Not (Me.tablelog_lot) Is Nothing) Then Me.tablelog_lot.InitVars End If End If Me.tablelog_pass = CType(MyBase.Tables("log_pass"),log_passDataTable) If (initTable = true) Then If (Not (Me.tablelog_pass) Is Nothing) Then Me.tablelog_pass.InitVars End If End If Me.tablelog_pass_serial = CType(MyBase.Tables("log_pass_serial"),log_pass_serialDataTable) If (initTable = true) Then If (Not (Me.tablelog_pass_serial) Is Nothing) Then Me.tablelog_pass_serial.InitVars End If End If Me.tablelog_PreTest_Detail = CType(MyBase.Tables("log_PreTest_Detail"),log_PreTest_DetailDataTable) If (initTable = true) Then If (Not (Me.tablelog_PreTest_Detail) Is Nothing) Then Me.tablelog_PreTest_Detail.InitVars End If End If Me.tablelog_repair = CType(MyBase.Tables("log_repair"),log_repairDataTable) If (initTable = true) Then If (Not (Me.tablelog_repair) Is Nothing) Then Me.tablelog_repair.InitVars End If End If Me.tablelog_repair_fa = CType(MyBase.Tables("log_repair_fa"),log_repair_faDataTable) If (initTable = true) Then If (Not (Me.tablelog_repair_fa) Is Nothing) Then Me.tablelog_repair_fa.InitVars End If End If Me.tablelog_repair_serial = CType(MyBase.Tables("log_repair_serial"),log_repair_serialDataTable) If (initTable = true) Then If (Not (Me.tablelog_repair_serial) Is Nothing) Then Me.tablelog_repair_serial.InitVars End If End If Me.tablelog_serial = CType(MyBase.Tables("log_serial"),log_serialDataTable) If (initTable = true) Then If (Not (Me.tablelog_serial) Is Nothing) Then Me.tablelog_serial.InitVars End If End If Me.tablelog_SH_Detail = CType(MyBase.Tables("log_SH_Detail"),log_SH_DetailDataTable) If (initTable = true) Then If (Not (Me.tablelog_SH_Detail) Is Nothing) Then Me.tablelog_SH_Detail.InitVars End If End If Me.tablelog_SH_Detail_Hist = CType(MyBase.Tables("log_SH_Detail_Hist"),log_SH_Detail_HistDataTable) If (initTable = true) Then If (Not (Me.tablelog_SH_Detail_Hist) Is Nothing) Then Me.tablelog_SH_Detail_Hist.InitVars End If End If Me.tablelog_SH_Header = CType(MyBase.Tables("log_SH_Header"),log_SH_HeaderDataTable) If (initTable = true) Then If (Not (Me.tablelog_SH_Header) Is Nothing) Then Me.tablelog_SH_Header.InitVars End If End If Me.tablelog_SH_Header_Hist = CType(MyBase.Tables("log_SH_Header_Hist"),log_SH_Header_HistDataTable) If (initTable = true) Then If (Not (Me.tablelog_SH_Header_Hist) Is Nothing) Then Me.tablelog_SH_Header_Hist.InitVars End If End If Me.tablelotNo = CType(MyBase.Tables("lotNo"),lotNoDataTable) If (initTable = true) Then If (Not (Me.tablelotNo) Is Nothing) Then Me.tablelotNo.InitVars End If End If Me.tableLotNumber = CType(MyBase.Tables("LotNumber"),LotNumberDataTable) If (initTable = true) Then If (Not (Me.tableLotNumber) Is Nothing) Then Me.tableLotNumber.InitVars End If End If Me.tablemachine = CType(MyBase.Tables("machine"),machineDataTable) If (initTable = true) Then If (Not (Me.tablemachine) Is Nothing) Then Me.tablemachine.InitVars End If End If Me.tablemachineHist = CType(MyBase.Tables("machineHist"),machineHistDataTable) If (initTable = true) Then If (Not (Me.tablemachineHist) Is Nothing) Then Me.tablemachineHist.InitVars End If End If Me.tablemodel = CType(MyBase.Tables("model"),modelDataTable) If (initTable = true) Then If (Not (Me.tablemodel) Is Nothing) Then Me.tablemodel.InitVars End If End If Me.tablemodelBackup = CType(MyBase.Tables("modelBackup"),modelBackupDataTable) If (initTable = true) Then If (Not (Me.tablemodelBackup) Is Nothing) Then Me.tablemodelBackup.InitVars End If End If Me.tablemodelDim = CType(MyBase.Tables("modelDim"),modelDimDataTable) If (initTable = true) Then If (Not (Me.tablemodelDim) Is Nothing) Then Me.tablemodelDim.InitVars End If End If Me.tablemodelDimHist = CType(MyBase.Tables("modelDimHist"),modelDimHistDataTable) If (initTable = true) Then If (Not (Me.tablemodelDimHist) Is Nothing) Then Me.tablemodelDimHist.InitVars End If End If Me.tablemodelFamily = CType(MyBase.Tables("modelFamily"),modelFamilyDataTable) If (initTable = true) Then If (Not (Me.tablemodelFamily) Is Nothing) Then Me.tablemodelFamily.InitVars End If End If Me.tablemodelFamilyHist = CType(MyBase.Tables("modelFamilyHist"),modelFamilyHistDataTable) If (initTable = true) Then If (Not (Me.tablemodelFamilyHist) Is Nothing) Then Me.tablemodelFamilyHist.InitVars End If End If Me.tablemodelHierarchy = CType(MyBase.Tables("modelHierarchy"),modelHierarchyDataTable) If (initTable = true) Then If (Not (Me.tablemodelHierarchy) Is Nothing) Then Me.tablemodelHierarchy.InitVars End If End If Me.tablemodelHierarchyHist = CType(MyBase.Tables("modelHierarchyHist"),modelHierarchyHistDataTable) If (initTable = true) Then If (Not (Me.tablemodelHierarchyHist) Is Nothing) Then Me.tablemodelHierarchyHist.InitVars End If End If Me.tablemodelHist = CType(MyBase.Tables("modelHist"),modelHistDataTable) If (initTable = true) Then If (Not (Me.tablemodelHist) Is Nothing) Then Me.tablemodelHist.InitVars End If End If Me.tablemodelRoute = CType(MyBase.Tables("modelRoute"),modelRouteDataTable) If (initTable = true) Then If (Not (Me.tablemodelRoute) Is Nothing) Then Me.tablemodelRoute.InitVars End If End If Me.tablemodelRoute_backup_1 = CType(MyBase.Tables("modelRoute_backup_1"),modelRoute_backup_1DataTable) If (initTable = true) Then If (Not (Me.tablemodelRoute_backup_1) Is Nothing) Then Me.tablemodelRoute_backup_1.InitVars End If End If Me.tablemodelRouteHist = CType(MyBase.Tables("modelRouteHist"),modelRouteHistDataTable) If (initTable = true) Then If (Not (Me.tablemodelRouteHist) Is Nothing) Then Me.tablemodelRouteHist.InitVars End If End If Me.tablemodelTemp = CType(MyBase.Tables("modelTemp"),modelTempDataTable) If (initTable = true) Then If (Not (Me.tablemodelTemp) Is Nothing) Then Me.tablemodelTemp.InitVars End If End If Me.tablemodelType = CType(MyBase.Tables("modelType"),modelTypeDataTable) If (initTable = true) Then If (Not (Me.tablemodelType) Is Nothing) Then Me.tablemodelType.InitVars End If End If Me.tablemodelTypeHist = CType(MyBase.Tables("modelTypeHist"),modelTypeHistDataTable) If (initTable = true) Then If (Not (Me.tablemodelTypeHist) Is Nothing) Then Me.tablemodelTypeHist.InitVars End If End If Me.tableParts_List = CType(MyBase.Tables("Parts_List"),Parts_ListDataTable) If (initTable = true) Then If (Not (Me.tableParts_List) Is Nothing) Then Me.tableParts_List.InitVars End If End If Me.tablepartsCode = CType(MyBase.Tables("partsCode"),partsCodeDataTable) If (initTable = true) Then If (Not (Me.tablepartsCode) Is Nothing) Then Me.tablepartsCode.InitVars End If End If Me.tablePartsModel = CType(MyBase.Tables("PartsModel"),PartsModelDataTable) If (initTable = true) Then If (Not (Me.tablePartsModel) Is Nothing) Then Me.tablePartsModel.InitVars End If End If Me.tablePartsPrep = CType(MyBase.Tables("PartsPrep"),PartsPrepDataTable) If (initTable = true) Then If (Not (Me.tablePartsPrep) Is Nothing) Then Me.tablePartsPrep.InitVars End If End If Me.tablePartsRecords = CType(MyBase.Tables("PartsRecords"),PartsRecordsDataTable) If (initTable = true) Then If (Not (Me.tablePartsRecords) Is Nothing) Then Me.tablePartsRecords.InitVars End If End If Me.tablepartsStation = CType(MyBase.Tables("partsStation"),partsStationDataTable) If (initTable = true) Then If (Not (Me.tablepartsStation) Is Nothing) Then Me.tablepartsStation.InitVars End If End If Me.tablepartsSupplier = CType(MyBase.Tables("partsSupplier"),partsSupplierDataTable) If (initTable = true) Then If (Not (Me.tablepartsSupplier) Is Nothing) Then Me.tablepartsSupplier.InitVars End If End If Me.tablepo_detail = CType(MyBase.Tables("po_detail"),po_detailDataTable) If (initTable = true) Then If (Not (Me.tablepo_detail) Is Nothing) Then Me.tablepo_detail.InitVars End If End If Me.tablepo_detail_backup = CType(MyBase.Tables("po_detail_backup"),po_detail_backupDataTable) If (initTable = true) Then If (Not (Me.tablepo_detail_backup) Is Nothing) Then Me.tablepo_detail_backup.InitVars End If End If Me.tablepo_detail_temp = CType(MyBase.Tables("po_detail_temp"),po_detail_tempDataTable) If (initTable = true) Then If (Not (Me.tablepo_detail_temp) Is Nothing) Then Me.tablepo_detail_temp.InitVars End If End If Me.tablepo_header = CType(MyBase.Tables("po_header"),po_headerDataTable) If (initTable = true) Then If (Not (Me.tablepo_header) Is Nothing) Then Me.tablepo_header.InitVars End If End If Me.tablepo_header_backup = CType(MyBase.Tables("po_header_backup"),po_header_backupDataTable) If (initTable = true) Then If (Not (Me.tablepo_header_backup) Is Nothing) Then Me.tablepo_header_backup.InitVars End If End If Me.tablepo_history_detail = CType(MyBase.Tables("po_history_detail"),po_history_detailDataTable) If (initTable = true) Then If (Not (Me.tablepo_history_detail) Is Nothing) Then Me.tablepo_history_detail.InitVars End If End If Me.tablepo_orig_detail = CType(MyBase.Tables("po_orig_detail"),po_orig_detailDataTable) If (initTable = true) Then If (Not (Me.tablepo_orig_detail) Is Nothing) Then Me.tablepo_orig_detail.InitVars End If End If Me.tablepo_orig_header = CType(MyBase.Tables("po_orig_header"),po_orig_headerDataTable) If (initTable = true) Then If (Not (Me.tablepo_orig_header) Is Nothing) Then Me.tablepo_orig_header.InitVars End If End If Me.tableprinter = CType(MyBase.Tables("printer"),printerDataTable) If (initTable = true) Then If (Not (Me.tableprinter) Is Nothing) Then Me.tableprinter.InitVars End If End If Me.tablept = CType(MyBase.Tables("pt"),ptDataTable) If (initTable = true) Then If (Not (Me.tablept) Is Nothing) Then Me.tablept.InitVars End If End If Me.tablept_Hist = CType(MyBase.Tables("pt_Hist"),pt_HistDataTable) If (initTable = true) Then If (Not (Me.tablept_Hist) Is Nothing) Then Me.tablept_Hist.InitVars End If End If Me.tableserialAlvariset = CType(MyBase.Tables("serialAlvariset"),serialAlvarisetDataTable) If (initTable = true) Then If (Not (Me.tableserialAlvariset) Is Nothing) Then Me.tableserialAlvariset.InitVars End If End If Me.tableserialMac = CType(MyBase.Tables("serialMac"),serialMacDataTable) If (initTable = true) Then If (Not (Me.tableserialMac) Is Nothing) Then Me.tableserialMac.InitVars End If End If Me.tableSHIPPER_REPORT_TABLE = CType(MyBase.Tables("SHIPPER_REPORT_TABLE"),SHIPPER_REPORT_TABLEDataTable) If (initTable = true) Then If (Not (Me.tableSHIPPER_REPORT_TABLE) Is Nothing) Then Me.tableSHIPPER_REPORT_TABLE.InitVars End If End If Me.tableSHIPPER_STATUS = CType(MyBase.Tables("SHIPPER_STATUS"),SHIPPER_STATUSDataTable) If (initTable = true) Then If (Not (Me.tableSHIPPER_STATUS) Is Nothing) Then Me.tableSHIPPER_STATUS.InitVars End If End If Me.tableSHIPPER_SUMMARY_TABLE = CType(MyBase.Tables("SHIPPER_SUMMARY_TABLE"),SHIPPER_SUMMARY_TABLEDataTable) If (initTable = true) Then If (Not (Me.tableSHIPPER_SUMMARY_TABLE) Is Nothing) Then Me.tableSHIPPER_SUMMARY_TABLE.InitVars End If End If Me.tablestation = CType(MyBase.Tables("station"),stationDataTable) If (initTable = true) Then If (Not (Me.tablestation) Is Nothing) Then Me.tablestation.InitVars End If End If Me.tablestation_convert = CType(MyBase.Tables("station_convert"),station_convertDataTable) If (initTable = true) Then If (Not (Me.tablestation_convert) Is Nothing) Then Me.tablestation_convert.InitVars End If End If Me.tablestationHist = CType(MyBase.Tables("stationHist"),stationHistDataTable) If (initTable = true) Then If (Not (Me.tablestationHist) Is Nothing) Then Me.tablestationHist.InitVars End If End If Me.tableusers = CType(MyBase.Tables("users"),usersDataTable) If (initTable = true) Then If (Not (Me.tableusers) Is Nothing) Then Me.tableusers.InitVars End If End If Me.tableusersHist = CType(MyBase.Tables("usersHist"),usersHistDataTable) If (initTable = true) Then If (Not (Me.tableusersHist) Is Nothing) Then Me.tableusersHist.InitVars End If End If Me.tableWIP_TEMP = CType(MyBase.Tables("WIP_TEMP"),WIP_TEMPDataTable) If (initTable = true) Then If (Not (Me.tableWIP_TEMP) Is Nothing) Then Me.tableWIP_TEMP.InitVars End If End If Me._tableCTSB9_00001 = CType(MyBase.Tables("CTSB9-00001"),_CTSB9_00001DataTable) If (initTable = true) Then If (Not (Me._tableCTSB9_00001) Is Nothing) Then Me._tableCTSB9_00001.InitVars End If End If Me._tableCTSB9_00002 = CType(MyBase.Tables("CTSB9-00002"),_CTSB9_00002DataTable) If (initTable = true) Then If (Not (Me._tableCTSB9_00002) Is Nothing) Then Me._tableCTSB9_00002.InitVars End If End If Me.tablegetMaxDate = CType(MyBase.Tables("getMaxDate"),getMaxDateDataTable) If (initTable = true) Then If (Not (Me.tablegetMaxDate) Is Nothing) Then Me.tablegetMaxDate.InitVars End If End If Me.tablegetMinDate = CType(MyBase.Tables("getMinDate"),getMinDateDataTable) If (initTable = true) Then If (Not (Me.tablegetMinDate) Is Nothing) Then Me.tablegetMinDate.InitVars End If End If Me.tableShipper_File = CType(MyBase.Tables("Shipper_File"),Shipper_FileDataTable) If (initTable = true) Then If (Not (Me.tableShipper_File) Is Nothing) Then Me.tableShipper_File.InitVars End If End If Me.tableShipper_File_Body = CType(MyBase.Tables("Shipper_File_Body"),Shipper_File_BodyDataTable) If (initTable = true) Then If (Not (Me.tableShipper_File_Body) Is Nothing) Then Me.tableShipper_File_Body.InitVars End If End If Me.tableShipper_File_Header = CType(MyBase.Tables("Shipper_File_Header"),Shipper_File_HeaderDataTable) If (initTable = true) Then If (Not (Me.tableShipper_File_Header) Is Nothing) Then Me.tableShipper_File_Header.InitVars End If End If Me.tablecontainer = CType(MyBase.Tables("container"),containerDataTable) If (initTable = true) Then If (Not (Me.tablecontainer) Is Nothing) Then Me.tablecontainer.InitVars End If End If Me.tablecreateView = CType(MyBase.Tables("createView"),createViewDataTable) If (initTable = true) Then If (Not (Me.tablecreateView) Is Nothing) Then Me.tablecreateView.InitVars End If End If Me.tableitem = CType(MyBase.Tables("item"),itemDataTable) If (initTable = true) Then If (Not (Me.tableitem) Is Nothing) Then Me.tableitem.InitVars End If End If Me.tablePO = CType(MyBase.Tables("PO"),PODataTable) If (initTable = true) Then If (Not (Me.tablePO) Is Nothing) Then Me.tablePO.InitVars End If End If Me.tablePOLINE = CType(MyBase.Tables("POLINE"),POLINEDataTable) If (initTable = true) Then If (Not (Me.tablePOLINE) Is Nothing) Then Me.tablePOLINE.InitVars End If End If Me.tableshipAdd1 = CType(MyBase.Tables("shipAdd1"),shipAdd1DataTable) If (initTable = true) Then If (Not (Me.tableshipAdd1) Is Nothing) Then Me.tableshipAdd1.InitVars End If End If Me.tableshipAdd2 = CType(MyBase.Tables("shipAdd2"),shipAdd2DataTable) If (initTable = true) Then If (Not (Me.tableshipAdd2) Is Nothing) Then Me.tableshipAdd2.InitVars End If End If Me.tableshipAdd3 = CType(MyBase.Tables("shipAdd3"),shipAdd3DataTable) If (initTable = true) Then If (Not (Me.tableshipAdd3) Is Nothing) Then Me.tableshipAdd3.InitVars End If End If Me.tablevalidatePOTransfer = CType(MyBase.Tables("validatePOTransfer"),validatePOTransferDataTable) If (initTable = true) Then If (Not (Me.tablevalidatePOTransfer) Is Nothing) Then Me.tablevalidatePOTransfer.InitVars End If End If End Sub _ Private Sub InitClass() Me.DataSetName = "EpsonDataSet1" Me.Prefix = "" Me.Namespace = "http://tempuri.org/EpsonDataSet1.xsd" Me.EnforceConstraints = true Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema Me.tableAOIQ_Temp = New AOIQ_TempDataTable() MyBase.Tables.Add(Me.tableAOIQ_Temp) Me.tablebatch = New batchDataTable() MyBase.Tables.Add(Me.tablebatch) Me.tablecard = New cardDataTable() MyBase.Tables.Add(Me.tablecard) Me.tablecard_backup = New card_backupDataTable() MyBase.Tables.Add(Me.tablecard_backup) Me.tablecard_Hist = New card_HistDataTable() MyBase.Tables.Add(Me.tablecard_Hist) Me.tablecardHist = New cardHistDataTable() MyBase.Tables.Add(Me.tablecardHist) Me.tablecomponent_parts = New component_partsDataTable() MyBase.Tables.Add(Me.tablecomponent_parts) Me.tableCTS = New CTSDataTable() MyBase.Tables.Add(Me.tableCTS) Me.tabledefectCatProd = New defectCatProdDataTable() MyBase.Tables.Add(Me.tabledefectCatProd) Me.tabledefectCatProdHist = New defectCatProdHistDataTable() MyBase.Tables.Add(Me.tabledefectCatProdHist) Me.tabledefectCatQC = New defectCatQCDataTable() MyBase.Tables.Add(Me.tabledefectCatQC) Me.tabledefectCatQCHist = New defectCatQCHistDataTable() MyBase.Tables.Add(Me.tabledefectCatQCHist) Me.tabledefectProd = New defectProdDataTable() MyBase.Tables.Add(Me.tabledefectProd) Me.tabledefectProdHist = New defectProdHistDataTable() MyBase.Tables.Add(Me.tabledefectProdHist) Me.tabledefectQC = New defectQCDataTable() MyBase.Tables.Add(Me.tabledefectQC) Me.tabledefectQCHist = New defectQCHistDataTable() MyBase.Tables.Add(Me.tabledefectQCHist) Me.tableFA_NewPT = New FA_NewPTDataTable() MyBase.Tables.Add(Me.tableFA_NewPT) Me.tablefaNo = New faNoDataTable() MyBase.Tables.Add(Me.tablefaNo) Me.tableKITTING = New KITTINGDataTable() MyBase.Tables.Add(Me.tableKITTING) Me.tableKMOUNTING = New KMOUNTINGDataTable() MyBase.Tables.Add(Me.tableKMOUNTING) Me.tableKSEQUENCE_DETAIL = New KSEQUENCE_DETAILDataTable() MyBase.Tables.Add(Me.tableKSEQUENCE_DETAIL) Me.tableKSEQUENCE_HEADER = New KSEQUENCE_HEADERDataTable() MyBase.Tables.Add(Me.tableKSEQUENCE_HEADER) Me.tableKSETTINGS = New KSETTINGSDataTable() MyBase.Tables.Add(Me.tableKSETTINGS) Me.tableLabelDef = New LabelDefDataTable() MyBase.Tables.Add(Me.tableLabelDef) Me.tableLabelDefHist = New LabelDefHistDataTable() MyBase.Tables.Add(Me.tableLabelDefHist) Me.tablelog_action = New log_actionDataTable() MyBase.Tables.Add(Me.tablelog_action) Me.tablelog_alvarion_serial = New log_alvarion_serialDataTable() MyBase.Tables.Add(Me.tablelog_alvarion_serial) Me.tablelog_ATE_error = New log_ATE_errorDataTable() MyBase.Tables.Add(Me.tablelog_ATE_error) Me.tablelog_BL_Detail = New log_BL_DetailDataTable() MyBase.Tables.Add(Me.tablelog_BL_Detail) Me.tablelog_BL_Detail_Hist = New log_BL_Detail_HistDataTable() MyBase.Tables.Add(Me.tablelog_BL_Detail_Hist) Me.tablelog_BL_Header = New log_BL_HeaderDataTable() MyBase.Tables.Add(Me.tablelog_BL_Header) Me.tablelog_BL_Header_Hist = New log_BL_Header_HistDataTable() MyBase.Tables.Add(Me.tablelog_BL_Header_Hist) Me.tablelog_CAPA = New log_CAPADataTable() MyBase.Tables.Add(Me.tablelog_CAPA) Me.tablelog_card = New log_cardDataTable() MyBase.Tables.Add(Me.tablelog_card) Me.tablelog_CT_Detail = New log_CT_DetailDataTable() MyBase.Tables.Add(Me.tablelog_CT_Detail) Me.tablelog_CT_Detail_Hist = New log_CT_Detail_HistDataTable() MyBase.Tables.Add(Me.tablelog_CT_Detail_Hist) Me.tablelog_CT_Header = New log_CT_HeaderDataTable() MyBase.Tables.Add(Me.tablelog_CT_Header) Me.tablelog_CT_Header_Hist = New log_CT_Header_HistDataTable() MyBase.Tables.Add(Me.tablelog_CT_Header_Hist) Me.tablelog_ct_header_temp = New log_ct_header_tempDataTable() MyBase.Tables.Add(Me.tablelog_ct_header_temp) Me.tablelog_DA = New log_DADataTable() MyBase.Tables.Add(Me.tablelog_DA) Me.tablelog_label = New log_labelDataTable() MyBase.Tables.Add(Me.tablelog_label) Me.tablelog_labelHist = New log_labelHistDataTable() MyBase.Tables.Add(Me.tablelog_labelHist) Me.tablelog_link = New log_linkDataTable() MyBase.Tables.Add(Me.tablelog_link) Me.tablelog_linkHist = New log_linkHistDataTable() MyBase.Tables.Add(Me.tablelog_linkHist) Me.tablelog_lot = New log_lotDataTable() MyBase.Tables.Add(Me.tablelog_lot) Me.tablelog_pass = New log_passDataTable() MyBase.Tables.Add(Me.tablelog_pass) Me.tablelog_pass_serial = New log_pass_serialDataTable() MyBase.Tables.Add(Me.tablelog_pass_serial) Me.tablelog_PreTest_Detail = New log_PreTest_DetailDataTable() MyBase.Tables.Add(Me.tablelog_PreTest_Detail) Me.tablelog_repair = New log_repairDataTable() MyBase.Tables.Add(Me.tablelog_repair) Me.tablelog_repair_fa = New log_repair_faDataTable() MyBase.Tables.Add(Me.tablelog_repair_fa) Me.tablelog_repair_serial = New log_repair_serialDataTable() MyBase.Tables.Add(Me.tablelog_repair_serial) Me.tablelog_serial = New log_serialDataTable() MyBase.Tables.Add(Me.tablelog_serial) Me.tablelog_SH_Detail = New log_SH_DetailDataTable() MyBase.Tables.Add(Me.tablelog_SH_Detail) Me.tablelog_SH_Detail_Hist = New log_SH_Detail_HistDataTable() MyBase.Tables.Add(Me.tablelog_SH_Detail_Hist) Me.tablelog_SH_Header = New log_SH_HeaderDataTable() MyBase.Tables.Add(Me.tablelog_SH_Header) Me.tablelog_SH_Header_Hist = New log_SH_Header_HistDataTable() MyBase.Tables.Add(Me.tablelog_SH_Header_Hist) Me.tablelotNo = New lotNoDataTable() MyBase.Tables.Add(Me.tablelotNo) Me.tableLotNumber = New LotNumberDataTable() MyBase.Tables.Add(Me.tableLotNumber) Me.tablemachine = New machineDataTable() MyBase.Tables.Add(Me.tablemachine) Me.tablemachineHist = New machineHistDataTable() MyBase.Tables.Add(Me.tablemachineHist) Me.tablemodel = New modelDataTable() MyBase.Tables.Add(Me.tablemodel) Me.tablemodelBackup = New modelBackupDataTable() MyBase.Tables.Add(Me.tablemodelBackup) Me.tablemodelDim = New modelDimDataTable() MyBase.Tables.Add(Me.tablemodelDim) Me.tablemodelDimHist = New modelDimHistDataTable() MyBase.Tables.Add(Me.tablemodelDimHist) Me.tablemodelFamily = New modelFamilyDataTable() MyBase.Tables.Add(Me.tablemodelFamily) Me.tablemodelFamilyHist = New modelFamilyHistDataTable() MyBase.Tables.Add(Me.tablemodelFamilyHist) Me.tablemodelHierarchy = New modelHierarchyDataTable() MyBase.Tables.Add(Me.tablemodelHierarchy) Me.tablemodelHierarchyHist = New modelHierarchyHistDataTable() MyBase.Tables.Add(Me.tablemodelHierarchyHist) Me.tablemodelHist = New modelHistDataTable() MyBase.Tables.Add(Me.tablemodelHist) Me.tablemodelRoute = New modelRouteDataTable() MyBase.Tables.Add(Me.tablemodelRoute) Me.tablemodelRoute_backup_1 = New modelRoute_backup_1DataTable() MyBase.Tables.Add(Me.tablemodelRoute_backup_1) Me.tablemodelRouteHist = New modelRouteHistDataTable() MyBase.Tables.Add(Me.tablemodelRouteHist) Me.tablemodelTemp = New modelTempDataTable() MyBase.Tables.Add(Me.tablemodelTemp) Me.tablemodelType = New modelTypeDataTable() MyBase.Tables.Add(Me.tablemodelType) Me.tablemodelTypeHist = New modelTypeHistDataTable() MyBase.Tables.Add(Me.tablemodelTypeHist) Me.tableParts_List = New Parts_ListDataTable() MyBase.Tables.Add(Me.tableParts_List) Me.tablepartsCode = New partsCodeDataTable() MyBase.Tables.Add(Me.tablepartsCode) Me.tablePartsModel = New PartsModelDataTable() MyBase.Tables.Add(Me.tablePartsModel) Me.tablePartsPrep = New PartsPrepDataTable() MyBase.Tables.Add(Me.tablePartsPrep) Me.tablePartsRecords = New PartsRecordsDataTable() MyBase.Tables.Add(Me.tablePartsRecords) Me.tablepartsStation = New partsStationDataTable() MyBase.Tables.Add(Me.tablepartsStation) Me.tablepartsSupplier = New partsSupplierDataTable() MyBase.Tables.Add(Me.tablepartsSupplier) Me.tablepo_detail = New po_detailDataTable() MyBase.Tables.Add(Me.tablepo_detail) Me.tablepo_detail_backup = New po_detail_backupDataTable() MyBase.Tables.Add(Me.tablepo_detail_backup) Me.tablepo_detail_temp = New po_detail_tempDataTable() MyBase.Tables.Add(Me.tablepo_detail_temp) Me.tablepo_header = New po_headerDataTable() MyBase.Tables.Add(Me.tablepo_header) Me.tablepo_header_backup = New po_header_backupDataTable() MyBase.Tables.Add(Me.tablepo_header_backup) Me.tablepo_history_detail = New po_history_detailDataTable() MyBase.Tables.Add(Me.tablepo_history_detail) Me.tablepo_orig_detail = New po_orig_detailDataTable() MyBase.Tables.Add(Me.tablepo_orig_detail) Me.tablepo_orig_header = New po_orig_headerDataTable() MyBase.Tables.Add(Me.tablepo_orig_header) Me.tableprinter = New printerDataTable() MyBase.Tables.Add(Me.tableprinter) Me.tablept = New ptDataTable() MyBase.Tables.Add(Me.tablept) Me.tablept_Hist = New pt_HistDataTable() MyBase.Tables.Add(Me.tablept_Hist) Me.tableserialAlvariset = New serialAlvarisetDataTable() MyBase.Tables.Add(Me.tableserialAlvariset) Me.tableserialMac = New serialMacDataTable() MyBase.Tables.Add(Me.tableserialMac) Me.tableSHIPPER_REPORT_TABLE = New SHIPPER_REPORT_TABLEDataTable() MyBase.Tables.Add(Me.tableSHIPPER_REPORT_TABLE) Me.tableSHIPPER_STATUS = New SHIPPER_STATUSDataTable() MyBase.Tables.Add(Me.tableSHIPPER_STATUS) Me.tableSHIPPER_SUMMARY_TABLE = New SHIPPER_SUMMARY_TABLEDataTable() MyBase.Tables.Add(Me.tableSHIPPER_SUMMARY_TABLE) Me.tablestation = New stationDataTable() MyBase.Tables.Add(Me.tablestation) Me.tablestation_convert = New station_convertDataTable() MyBase.Tables.Add(Me.tablestation_convert) Me.tablestationHist = New stationHistDataTable() MyBase.Tables.Add(Me.tablestationHist) Me.tableusers = New usersDataTable() MyBase.Tables.Add(Me.tableusers) Me.tableusersHist = New usersHistDataTable() MyBase.Tables.Add(Me.tableusersHist) Me.tableWIP_TEMP = New WIP_TEMPDataTable() MyBase.Tables.Add(Me.tableWIP_TEMP) Me._tableCTSB9_00001 = New _CTSB9_00001DataTable() MyBase.Tables.Add(Me._tableCTSB9_00001) Me._tableCTSB9_00002 = New _CTSB9_00002DataTable() MyBase.Tables.Add(Me._tableCTSB9_00002) Me.tablegetMaxDate = New getMaxDateDataTable() MyBase.Tables.Add(Me.tablegetMaxDate) Me.tablegetMinDate = New getMinDateDataTable() MyBase.Tables.Add(Me.tablegetMinDate) Me.tableShipper_File = New Shipper_FileDataTable() MyBase.Tables.Add(Me.tableShipper_File) Me.tableShipper_File_Body = New Shipper_File_BodyDataTable() MyBase.Tables.Add(Me.tableShipper_File_Body) Me.tableShipper_File_Header = New Shipper_File_HeaderDataTable() MyBase.Tables.Add(Me.tableShipper_File_Header) Me.tablecontainer = New containerDataTable() MyBase.Tables.Add(Me.tablecontainer) Me.tablecreateView = New createViewDataTable() MyBase.Tables.Add(Me.tablecreateView) Me.tableitem = New itemDataTable() MyBase.Tables.Add(Me.tableitem) Me.tablePO = New PODataTable() MyBase.Tables.Add(Me.tablePO) Me.tablePOLINE = New POLINEDataTable() MyBase.Tables.Add(Me.tablePOLINE) Me.tableshipAdd1 = New shipAdd1DataTable() MyBase.Tables.Add(Me.tableshipAdd1) Me.tableshipAdd2 = New shipAdd2DataTable() MyBase.Tables.Add(Me.tableshipAdd2) Me.tableshipAdd3 = New shipAdd3DataTable() MyBase.Tables.Add(Me.tableshipAdd3) Me.tablevalidatePOTransfer = New validatePOTransferDataTable() MyBase.Tables.Add(Me.tablevalidatePOTransfer) End Sub _ Private Function ShouldSerializeAOIQ_Temp() As Boolean Return false End Function _ Private Function ShouldSerializebatch() As Boolean Return false End Function _ Private Function ShouldSerializecard() As Boolean Return false End Function _ Private Function ShouldSerializecard_backup() As Boolean Return false End Function _ Private Function ShouldSerializecard_Hist() As Boolean Return false End Function _ Private Function ShouldSerializecardHist() As Boolean Return false End Function _ Private Function ShouldSerializecomponent_parts() As Boolean Return false End Function _ Private Function ShouldSerializeCTS() As Boolean Return false End Function _ Private Function ShouldSerializedefectCatProd() As Boolean Return false End Function _ Private Function ShouldSerializedefectCatProdHist() As Boolean Return false End Function _ Private Function ShouldSerializedefectCatQC() As Boolean Return false End Function _ Private Function ShouldSerializedefectCatQCHist() As Boolean Return false End Function _ Private Function ShouldSerializedefectProd() As Boolean Return false End Function _ Private Function ShouldSerializedefectProdHist() As Boolean Return false End Function _ Private Function ShouldSerializedefectQC() As Boolean Return false End Function _ Private Function ShouldSerializedefectQCHist() As Boolean Return false End Function _ Private Function ShouldSerializeFA_NewPT() As Boolean Return false End Function _ Private Function ShouldSerializefaNo() As Boolean Return false End Function _ Private Function ShouldSerializeKITTING() As Boolean Return false End Function _ Private Function ShouldSerializeKMOUNTING() As Boolean Return false End Function _ Private Function ShouldSerializeKSEQUENCE_DETAIL() As Boolean Return false End Function _ Private Function ShouldSerializeKSEQUENCE_HEADER() As Boolean Return false End Function _ Private Function ShouldSerializeKSETTINGS() As Boolean Return false End Function _ Private Function ShouldSerializeLabelDef() As Boolean Return false End Function _ Private Function ShouldSerializeLabelDefHist() As Boolean Return false End Function _ Private Function ShouldSerializelog_action() As Boolean Return false End Function _ Private Function ShouldSerializelog_alvarion_serial() As Boolean Return false End Function _ Private Function ShouldSerializelog_ATE_error() As Boolean Return false End Function _ Private Function ShouldSerializelog_BL_Detail() As Boolean Return false End Function _ Private Function ShouldSerializelog_BL_Detail_Hist() As Boolean Return false End Function _ Private Function ShouldSerializelog_BL_Header() As Boolean Return false End Function _ Private Function ShouldSerializelog_BL_Header_Hist() As Boolean Return false End Function _ Private Function ShouldSerializelog_CAPA() As Boolean Return false End Function _ Private Function ShouldSerializelog_card() As Boolean Return false End Function _ Private Function ShouldSerializelog_CT_Detail() As Boolean Return false End Function _ Private Function ShouldSerializelog_CT_Detail_Hist() As Boolean Return false End Function _ Private Function ShouldSerializelog_CT_Header() As Boolean Return false End Function _ Private Function ShouldSerializelog_CT_Header_Hist() As Boolean Return false End Function _ Private Function ShouldSerializelog_ct_header_temp() As Boolean Return false End Function _ Private Function ShouldSerializelog_DA() As Boolean Return false End Function _ Private Function ShouldSerializelog_label() As Boolean Return false End Function _ Private Function ShouldSerializelog_labelHist() As Boolean Return false End Function _ Private Function ShouldSerializelog_link() As Boolean Return false End Function _ Private Function ShouldSerializelog_linkHist() As Boolean Return false End Function _ Private Function ShouldSerializelog_lot() As Boolean Return false End Function _ Private Function ShouldSerializelog_pass() As Boolean Return false End Function _ Private Function ShouldSerializelog_pass_serial() As Boolean Return false End Function _ Private Function ShouldSerializelog_PreTest_Detail() As Boolean Return false End Function _ Private Function ShouldSerializelog_repair() As Boolean Return false End Function _ Private Function ShouldSerializelog_repair_fa() As Boolean Return false End Function _ Private Function ShouldSerializelog_repair_serial() As Boolean Return false End Function _ Private Function ShouldSerializelog_serial() As Boolean Return false End Function _ Private Function ShouldSerializelog_SH_Detail() As Boolean Return false End Function _ Private Function ShouldSerializelog_SH_Detail_Hist() As Boolean Return false End Function _ Private Function ShouldSerializelog_SH_Header() As Boolean Return false End Function _ Private Function ShouldSerializelog_SH_Header_Hist() As Boolean Return false End Function _ Private Function ShouldSerializelotNo() As Boolean Return false End Function _ Private Function ShouldSerializeLotNumber() As Boolean Return false End Function _ Private Function ShouldSerializemachine() As Boolean Return false End Function _ Private Function ShouldSerializemachineHist() As Boolean Return false End Function _ Private Function ShouldSerializemodel() As Boolean Return false End Function _ Private Function ShouldSerializemodelBackup() As Boolean Return false End Function _ Private Function ShouldSerializemodelDim() As Boolean Return false End Function _ Private Function ShouldSerializemodelDimHist() As Boolean Return false End Function _ Private Function ShouldSerializemodelFamily() As Boolean Return false End Function _ Private Function ShouldSerializemodelFamilyHist() As Boolean Return false End Function _ Private Function ShouldSerializemodelHierarchy() As Boolean Return false End Function _ Private Function ShouldSerializemodelHierarchyHist() As Boolean Return false End Function _ Private Function ShouldSerializemodelHist() As Boolean Return false End Function _ Private Function ShouldSerializemodelRoute() As Boolean Return false End Function _ Private Function ShouldSerializemodelRoute_backup_1() As Boolean Return false End Function _ Private Function ShouldSerializemodelRouteHist() As Boolean Return false End Function _ Private Function ShouldSerializemodelTemp() As Boolean Return false End Function _ Private Function ShouldSerializemodelType() As Boolean Return false End Function _ Private Function ShouldSerializemodelTypeHist() As Boolean Return false End Function _ Private Function ShouldSerializeParts_List() As Boolean Return false End Function _ Private Function ShouldSerializepartsCode() As Boolean Return false End Function _ Private Function ShouldSerializePartsModel() As Boolean Return false End Function _ Private Function ShouldSerializePartsPrep() As Boolean Return false End Function _ Private Function ShouldSerializePartsRecords() As Boolean Return false End Function _ Private Function ShouldSerializepartsStation() As Boolean Return false End Function _ Private Function ShouldSerializepartsSupplier() As Boolean Return false End Function _ Private Function ShouldSerializepo_detail() As Boolean Return false End Function _ Private Function ShouldSerializepo_detail_backup() As Boolean Return false End Function _ Private Function ShouldSerializepo_detail_temp() As Boolean Return false End Function _ Private Function ShouldSerializepo_header() As Boolean Return false End Function _ Private Function ShouldSerializepo_header_backup() As Boolean Return false End Function _ Private Function ShouldSerializepo_history_detail() As Boolean Return false End Function _ Private Function ShouldSerializepo_orig_detail() As Boolean Return false End Function _ Private Function ShouldSerializepo_orig_header() As Boolean Return false End Function _ Private Function ShouldSerializeprinter() As Boolean Return false End Function _ Private Function ShouldSerializept() As Boolean Return false End Function _ Private Function ShouldSerializept_Hist() As Boolean Return false End Function _ Private Function ShouldSerializeserialAlvariset() As Boolean Return false End Function _ Private Function ShouldSerializeserialMac() As Boolean Return false End Function _ Private Function ShouldSerializeSHIPPER_REPORT_TABLE() As Boolean Return false End Function _ Private Function ShouldSerializeSHIPPER_STATUS() As Boolean Return false End Function _ Private Function ShouldSerializeSHIPPER_SUMMARY_TABLE() As Boolean Return false End Function _ Private Function ShouldSerializestation() As Boolean Return false End Function _ Private Function ShouldSerializestation_convert() As Boolean Return false End Function _ Private Function ShouldSerializestationHist() As Boolean Return false End Function _ Private Function ShouldSerializeusers() As Boolean Return false End Function _ Private Function ShouldSerializeusersHist() As Boolean Return false End Function _ Private Function ShouldSerializeWIP_TEMP() As Boolean Return false End Function _ Private Function ShouldSerialize_CTSB9_00001() As Boolean Return false End Function _ Private Function ShouldSerialize_CTSB9_00002() As Boolean Return false End Function _ Private Function ShouldSerializegetMaxDate() As Boolean Return false End Function _ Private Function ShouldSerializegetMinDate() As Boolean Return false End Function _ Private Function ShouldSerializeShipper_File() As Boolean Return false End Function _ Private Function ShouldSerializeShipper_File_Body() As Boolean Return false End Function _ Private Function ShouldSerializeShipper_File_Header() As Boolean Return false End Function _ Private Function ShouldSerializecontainer() As Boolean Return false End Function _ Private Function ShouldSerializecreateView() As Boolean Return false End Function _ Private Function ShouldSerializeitem() As Boolean Return false End Function _ Private Function ShouldSerializePO() As Boolean Return false End Function _ Private Function ShouldSerializePOLINE() As Boolean Return false End Function _ Private Function ShouldSerializeshipAdd1() As Boolean Return false End Function _ Private Function ShouldSerializeshipAdd2() As Boolean Return false End Function _ Private Function ShouldSerializeshipAdd3() As Boolean Return false End Function _ Private Function ShouldSerializevalidatePOTransfer() As Boolean Return false End Function _ Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs) If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then Me.InitVars End If End Sub _ Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any.Namespace = ds.Namespace sequence.Items.Add(any) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function _ Public Delegate Sub AOIQ_TempRowChangeEventHandler(ByVal sender As Object, ByVal e As AOIQ_TempRowChangeEvent) _ Public Delegate Sub batchRowChangeEventHandler(ByVal sender As Object, ByVal e As batchRowChangeEvent) _ Public Delegate Sub cardRowChangeEventHandler(ByVal sender As Object, ByVal e As cardRowChangeEvent) _ Public Delegate Sub card_backupRowChangeEventHandler(ByVal sender As Object, ByVal e As card_backupRowChangeEvent) _ Public Delegate Sub card_HistRowChangeEventHandler(ByVal sender As Object, ByVal e As card_HistRowChangeEvent) _ Public Delegate Sub cardHistRowChangeEventHandler(ByVal sender As Object, ByVal e As cardHistRowChangeEvent) _ Public Delegate Sub component_partsRowChangeEventHandler(ByVal sender As Object, ByVal e As component_partsRowChangeEvent) _ Public Delegate Sub CTSRowChangeEventHandler(ByVal sender As Object, ByVal e As CTSRowChangeEvent) _ Public Delegate Sub defectCatProdRowChangeEventHandler(ByVal sender As Object, ByVal e As defectCatProdRowChangeEvent) _ Public Delegate Sub defectCatProdHistRowChangeEventHandler(ByVal sender As Object, ByVal e As defectCatProdHistRowChangeEvent) _ Public Delegate Sub defectCatQCRowChangeEventHandler(ByVal sender As Object, ByVal e As defectCatQCRowChangeEvent) _ Public Delegate Sub defectCatQCHistRowChangeEventHandler(ByVal sender As Object, ByVal e As defectCatQCHistRowChangeEvent) _ Public Delegate Sub defectProdRowChangeEventHandler(ByVal sender As Object, ByVal e As defectProdRowChangeEvent) _ Public Delegate Sub defectProdHistRowChangeEventHandler(ByVal sender As Object, ByVal e As defectProdHistRowChangeEvent) _ Public Delegate Sub defectQCRowChangeEventHandler(ByVal sender As Object, ByVal e As defectQCRowChangeEvent) _ Public Delegate Sub defectQCHistRowChangeEventHandler(ByVal sender As Object, ByVal e As defectQCHistRowChangeEvent) _ Public Delegate Sub FA_NewPTRowChangeEventHandler(ByVal sender As Object, ByVal e As FA_NewPTRowChangeEvent) _ Public Delegate Sub faNoRowChangeEventHandler(ByVal sender As Object, ByVal e As faNoRowChangeEvent) _ Public Delegate Sub KITTINGRowChangeEventHandler(ByVal sender As Object, ByVal e As KITTINGRowChangeEvent) _ Public Delegate Sub KMOUNTINGRowChangeEventHandler(ByVal sender As Object, ByVal e As KMOUNTINGRowChangeEvent) _ Public Delegate Sub KSEQUENCE_DETAILRowChangeEventHandler(ByVal sender As Object, ByVal e As KSEQUENCE_DETAILRowChangeEvent) _ Public Delegate Sub KSEQUENCE_HEADERRowChangeEventHandler(ByVal sender As Object, ByVal e As KSEQUENCE_HEADERRowChangeEvent) _ Public Delegate Sub KSETTINGSRowChangeEventHandler(ByVal sender As Object, ByVal e As KSETTINGSRowChangeEvent) _ Public Delegate Sub LabelDefRowChangeEventHandler(ByVal sender As Object, ByVal e As LabelDefRowChangeEvent) _ Public Delegate Sub LabelDefHistRowChangeEventHandler(ByVal sender As Object, ByVal e As LabelDefHistRowChangeEvent) _ Public Delegate Sub log_actionRowChangeEventHandler(ByVal sender As Object, ByVal e As log_actionRowChangeEvent) _ Public Delegate Sub log_alvarion_serialRowChangeEventHandler(ByVal sender As Object, ByVal e As log_alvarion_serialRowChangeEvent) _ Public Delegate Sub log_ATE_errorRowChangeEventHandler(ByVal sender As Object, ByVal e As log_ATE_errorRowChangeEvent) _ Public Delegate Sub log_BL_DetailRowChangeEventHandler(ByVal sender As Object, ByVal e As log_BL_DetailRowChangeEvent) _ Public Delegate Sub log_BL_Detail_HistRowChangeEventHandler(ByVal sender As Object, ByVal e As log_BL_Detail_HistRowChangeEvent) _ Public Delegate Sub log_BL_HeaderRowChangeEventHandler(ByVal sender As Object, ByVal e As log_BL_HeaderRowChangeEvent) _ Public Delegate Sub log_BL_Header_HistRowChangeEventHandler(ByVal sender As Object, ByVal e As log_BL_Header_HistRowChangeEvent) _ Public Delegate Sub log_CAPARowChangeEventHandler(ByVal sender As Object, ByVal e As log_CAPARowChangeEvent) _ Public Delegate Sub log_cardRowChangeEventHandler(ByVal sender As Object, ByVal e As log_cardRowChangeEvent) _ Public Delegate Sub log_CT_DetailRowChangeEventHandler(ByVal sender As Object, ByVal e As log_CT_DetailRowChangeEvent) _ Public Delegate Sub log_CT_Detail_HistRowChangeEventHandler(ByVal sender As Object, ByVal e As log_CT_Detail_HistRowChangeEvent) _ Public Delegate Sub log_CT_HeaderRowChangeEventHandler(ByVal sender As Object, ByVal e As log_CT_HeaderRowChangeEvent) _ Public Delegate Sub log_CT_Header_HistRowChangeEventHandler(ByVal sender As Object, ByVal e As log_CT_Header_HistRowChangeEvent) _ Public Delegate Sub log_ct_header_tempRowChangeEventHandler(ByVal sender As Object, ByVal e As log_ct_header_tempRowChangeEvent) _ Public Delegate Sub log_DARowChangeEventHandler(ByVal sender As Object, ByVal e As log_DARowChangeEvent) _ Public Delegate Sub log_labelRowChangeEventHandler(ByVal sender As Object, ByVal e As log_labelRowChangeEvent) _ Public Delegate Sub log_labelHistRowChangeEventHandler(ByVal sender As Object, ByVal e As log_labelHistRowChangeEvent) _ Public Delegate Sub log_linkRowChangeEventHandler(ByVal sender As Object, ByVal e As log_linkRowChangeEvent) _ Public Delegate Sub log_linkHistRowChangeEventHandler(ByVal sender As Object, ByVal e As log_linkHistRowChangeEvent) _ Public Delegate Sub log_lotRowChangeEventHandler(ByVal sender As Object, ByVal e As log_lotRowChangeEvent) _ Public Delegate Sub log_passRowChangeEventHandler(ByVal sender As Object, ByVal e As log_passRowChangeEvent) _ Public Delegate Sub log_pass_serialRowChangeEventHandler(ByVal sender As Object, ByVal e As log_pass_serialRowChangeEvent) _ Public Delegate Sub log_PreTest_DetailRowChangeEventHandler(ByVal sender As Object, ByVal e As log_PreTest_DetailRowChangeEvent) _ Public Delegate Sub log_repairRowChangeEventHandler(ByVal sender As Object, ByVal e As log_repairRowChangeEvent) _ Public Delegate Sub log_repair_faRowChangeEventHandler(ByVal sender As Object, ByVal e As log_repair_faRowChangeEvent) _ Public Delegate Sub log_repair_serialRowChangeEventHandler(ByVal sender As Object, ByVal e As log_repair_serialRowChangeEvent) _ Public Delegate Sub log_serialRowChangeEventHandler(ByVal sender As Object, ByVal e As log_serialRowChangeEvent) _ Public Delegate Sub log_SH_DetailRowChangeEventHandler(ByVal sender As Object, ByVal e As log_SH_DetailRowChangeEvent) _ Public Delegate Sub log_SH_Detail_HistRowChangeEventHandler(ByVal sender As Object, ByVal e As log_SH_Detail_HistRowChangeEvent) _ Public Delegate Sub log_SH_HeaderRowChangeEventHandler(ByVal sender As Object, ByVal e As log_SH_HeaderRowChangeEvent) _ Public Delegate Sub log_SH_Header_HistRowChangeEventHandler(ByVal sender As Object, ByVal e As log_SH_Header_HistRowChangeEvent) _ Public Delegate Sub lotNoRowChangeEventHandler(ByVal sender As Object, ByVal e As lotNoRowChangeEvent) _ Public Delegate Sub LotNumberRowChangeEventHandler(ByVal sender As Object, ByVal e As LotNumberRowChangeEvent) _ Public Delegate Sub machineRowChangeEventHandler(ByVal sender As Object, ByVal e As machineRowChangeEvent) _ Public Delegate Sub machineHistRowChangeEventHandler(ByVal sender As Object, ByVal e As machineHistRowChangeEvent) _ Public Delegate Sub modelRowChangeEventHandler(ByVal sender As Object, ByVal e As modelRowChangeEvent) _ Public Delegate Sub modelBackupRowChangeEventHandler(ByVal sender As Object, ByVal e As modelBackupRowChangeEvent) _ Public Delegate Sub modelDimRowChangeEventHandler(ByVal sender As Object, ByVal e As modelDimRowChangeEvent) _ Public Delegate Sub modelDimHistRowChangeEventHandler(ByVal sender As Object, ByVal e As modelDimHistRowChangeEvent) _ Public Delegate Sub modelFamilyRowChangeEventHandler(ByVal sender As Object, ByVal e As modelFamilyRowChangeEvent) _ Public Delegate Sub modelFamilyHistRowChangeEventHandler(ByVal sender As Object, ByVal e As modelFamilyHistRowChangeEvent) _ Public Delegate Sub modelHierarchyRowChangeEventHandler(ByVal sender As Object, ByVal e As modelHierarchyRowChangeEvent) _ Public Delegate Sub modelHierarchyHistRowChangeEventHandler(ByVal sender As Object, ByVal e As modelHierarchyHistRowChangeEvent) _ Public Delegate Sub modelHistRowChangeEventHandler(ByVal sender As Object, ByVal e As modelHistRowChangeEvent) _ Public Delegate Sub modelRouteRowChangeEventHandler(ByVal sender As Object, ByVal e As modelRouteRowChangeEvent) _ Public Delegate Sub modelRoute_backup_1RowChangeEventHandler(ByVal sender As Object, ByVal e As modelRoute_backup_1RowChangeEvent) _ Public Delegate Sub modelRouteHistRowChangeEventHandler(ByVal sender As Object, ByVal e As modelRouteHistRowChangeEvent) _ Public Delegate Sub modelTempRowChangeEventHandler(ByVal sender As Object, ByVal e As modelTempRowChangeEvent) _ Public Delegate Sub modelTypeRowChangeEventHandler(ByVal sender As Object, ByVal e As modelTypeRowChangeEvent) _ Public Delegate Sub modelTypeHistRowChangeEventHandler(ByVal sender As Object, ByVal e As modelTypeHistRowChangeEvent) _ Public Delegate Sub Parts_ListRowChangeEventHandler(ByVal sender As Object, ByVal e As Parts_ListRowChangeEvent) _ Public Delegate Sub partsCodeRowChangeEventHandler(ByVal sender As Object, ByVal e As partsCodeRowChangeEvent) _ Public Delegate Sub PartsModelRowChangeEventHandler(ByVal sender As Object, ByVal e As PartsModelRowChangeEvent) _ Public Delegate Sub PartsPrepRowChangeEventHandler(ByVal sender As Object, ByVal e As PartsPrepRowChangeEvent) _ Public Delegate Sub PartsRecordsRowChangeEventHandler(ByVal sender As Object, ByVal e As PartsRecordsRowChangeEvent) _ Public Delegate Sub partsStationRowChangeEventHandler(ByVal sender As Object, ByVal e As partsStationRowChangeEvent) _ Public Delegate Sub partsSupplierRowChangeEventHandler(ByVal sender As Object, ByVal e As partsSupplierRowChangeEvent) _ Public Delegate Sub po_detailRowChangeEventHandler(ByVal sender As Object, ByVal e As po_detailRowChangeEvent) _ Public Delegate Sub po_detail_backupRowChangeEventHandler(ByVal sender As Object, ByVal e As po_detail_backupRowChangeEvent) _ Public Delegate Sub po_detail_tempRowChangeEventHandler(ByVal sender As Object, ByVal e As po_detail_tempRowChangeEvent) _ Public Delegate Sub po_headerRowChangeEventHandler(ByVal sender As Object, ByVal e As po_headerRowChangeEvent) _ Public Delegate Sub po_header_backupRowChangeEventHandler(ByVal sender As Object, ByVal e As po_header_backupRowChangeEvent) _ Public Delegate Sub po_history_detailRowChangeEventHandler(ByVal sender As Object, ByVal e As po_history_detailRowChangeEvent) _ Public Delegate Sub po_orig_detailRowChangeEventHandler(ByVal sender As Object, ByVal e As po_orig_detailRowChangeEvent) _ Public Delegate Sub po_orig_headerRowChangeEventHandler(ByVal sender As Object, ByVal e As po_orig_headerRowChangeEvent) _ Public Delegate Sub printerRowChangeEventHandler(ByVal sender As Object, ByVal e As printerRowChangeEvent) _ Public Delegate Sub ptRowChangeEventHandler(ByVal sender As Object, ByVal e As ptRowChangeEvent) _ Public Delegate Sub pt_HistRowChangeEventHandler(ByVal sender As Object, ByVal e As pt_HistRowChangeEvent) _ Public Delegate Sub serialAlvarisetRowChangeEventHandler(ByVal sender As Object, ByVal e As serialAlvarisetRowChangeEvent) _ Public Delegate Sub serialMacRowChangeEventHandler(ByVal sender As Object, ByVal e As serialMacRowChangeEvent) _ Public Delegate Sub SHIPPER_REPORT_TABLERowChangeEventHandler(ByVal sender As Object, ByVal e As SHIPPER_REPORT_TABLERowChangeEvent) _ Public Delegate Sub SHIPPER_STATUSRowChangeEventHandler(ByVal sender As Object, ByVal e As SHIPPER_STATUSRowChangeEvent) _ Public Delegate Sub SHIPPER_SUMMARY_TABLERowChangeEventHandler(ByVal sender As Object, ByVal e As SHIPPER_SUMMARY_TABLERowChangeEvent) _ Public Delegate Sub stationRowChangeEventHandler(ByVal sender As Object, ByVal e As stationRowChangeEvent) _ Public Delegate Sub station_convertRowChangeEventHandler(ByVal sender As Object, ByVal e As station_convertRowChangeEvent) _ Public Delegate Sub stationHistRowChangeEventHandler(ByVal sender As Object, ByVal e As stationHistRowChangeEvent) _ Public Delegate Sub usersRowChangeEventHandler(ByVal sender As Object, ByVal e As usersRowChangeEvent) _ Public Delegate Sub usersHistRowChangeEventHandler(ByVal sender As Object, ByVal e As usersHistRowChangeEvent) _ Public Delegate Sub WIP_TEMPRowChangeEventHandler(ByVal sender As Object, ByVal e As WIP_TEMPRowChangeEvent) _ Public Delegate Sub _CTSB9_00001RowChangeEventHandler(ByVal sender As Object, ByVal e As _CTSB9_00001RowChangeEvent) _ Public Delegate Sub _CTSB9_00002RowChangeEventHandler(ByVal sender As Object, ByVal e As _CTSB9_00002RowChangeEvent) _ Public Delegate Sub getMaxDateRowChangeEventHandler(ByVal sender As Object, ByVal e As getMaxDateRowChangeEvent) _ Public Delegate Sub getMinDateRowChangeEventHandler(ByVal sender As Object, ByVal e As getMinDateRowChangeEvent) _ Public Delegate Sub Shipper_FileRowChangeEventHandler(ByVal sender As Object, ByVal e As Shipper_FileRowChangeEvent) _ Public Delegate Sub Shipper_File_BodyRowChangeEventHandler(ByVal sender As Object, ByVal e As Shipper_File_BodyRowChangeEvent) _ Public Delegate Sub Shipper_File_HeaderRowChangeEventHandler(ByVal sender As Object, ByVal e As Shipper_File_HeaderRowChangeEvent) _ Public Delegate Sub containerRowChangeEventHandler(ByVal sender As Object, ByVal e As containerRowChangeEvent) _ Public Delegate Sub createViewRowChangeEventHandler(ByVal sender As Object, ByVal e As createViewRowChangeEvent) _ Public Delegate Sub itemRowChangeEventHandler(ByVal sender As Object, ByVal e As itemRowChangeEvent) _ Public Delegate Sub PORowChangeEventHandler(ByVal sender As Object, ByVal e As PORowChangeEvent) _ Public Delegate Sub POLINERowChangeEventHandler(ByVal sender As Object, ByVal e As POLINERowChangeEvent) _ Public Delegate Sub shipAdd1RowChangeEventHandler(ByVal sender As Object, ByVal e As shipAdd1RowChangeEvent) _ Public Delegate Sub shipAdd2RowChangeEventHandler(ByVal sender As Object, ByVal e As shipAdd2RowChangeEvent) _ Public Delegate Sub shipAdd3RowChangeEventHandler(ByVal sender As Object, ByVal e As shipAdd3RowChangeEvent) _ Public Delegate Sub validatePOTransferRowChangeEventHandler(ByVal sender As Object, ByVal e As validatePOTransferRowChangeEvent) ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class AOIQ_TempDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnStage As Global.System.Data.DataColumn Private columnQty As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "AOIQ_Temp" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property StageColumn() As Global.System.Data.DataColumn Get Return Me.columnStage End Get End Property _ Public ReadOnly Property QtyColumn() As Global.System.Data.DataColumn Get Return Me.columnQty End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As AOIQ_TempRow Get Return CType(Me.Rows(index),AOIQ_TempRow) End Get End Property _ Public Event AOIQ_TempRowChanging As AOIQ_TempRowChangeEventHandler _ Public Event AOIQ_TempRowChanged As AOIQ_TempRowChangeEventHandler _ Public Event AOIQ_TempRowDeleting As AOIQ_TempRowChangeEventHandler _ Public Event AOIQ_TempRowDeleted As AOIQ_TempRowChangeEventHandler _ Public Overloads Sub AddAOIQ_TempRow(ByVal row As AOIQ_TempRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddAOIQ_TempRow(ByVal Stage As String, ByVal Qty As Integer) As AOIQ_TempRow Dim rowAOIQ_TempRow As AOIQ_TempRow = CType(Me.NewRow,AOIQ_TempRow) Dim columnValuesArray() As Object = New Object() {Stage, Qty} rowAOIQ_TempRow.ItemArray = columnValuesArray Me.Rows.Add(rowAOIQ_TempRow) Return rowAOIQ_TempRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As AOIQ_TempDataTable = CType(MyBase.Clone,AOIQ_TempDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New AOIQ_TempDataTable() End Function _ Friend Sub InitVars() Me.columnStage = MyBase.Columns("Stage") Me.columnQty = MyBase.Columns("Qty") End Sub _ Private Sub InitClass() Me.columnStage = New Global.System.Data.DataColumn("Stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnStage) Me.columnQty = New Global.System.Data.DataColumn("Qty", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnQty) Me.columnStage.AllowDBNull = false Me.columnStage.MaxLength = 21 End Sub _ Public Function NewAOIQ_TempRow() As AOIQ_TempRow Return CType(Me.NewRow,AOIQ_TempRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New AOIQ_TempRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(AOIQ_TempRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.AOIQ_TempRowChangedEvent) Is Nothing) Then RaiseEvent AOIQ_TempRowChanged(Me, New AOIQ_TempRowChangeEvent(CType(e.Row,AOIQ_TempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.AOIQ_TempRowChangingEvent) Is Nothing) Then RaiseEvent AOIQ_TempRowChanging(Me, New AOIQ_TempRowChangeEvent(CType(e.Row,AOIQ_TempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.AOIQ_TempRowDeletedEvent) Is Nothing) Then RaiseEvent AOIQ_TempRowDeleted(Me, New AOIQ_TempRowChangeEvent(CType(e.Row,AOIQ_TempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.AOIQ_TempRowDeletingEvent) Is Nothing) Then RaiseEvent AOIQ_TempRowDeleting(Me, New AOIQ_TempRowChangeEvent(CType(e.Row,AOIQ_TempRow), e.Action)) End If End Sub _ Public Sub RemoveAOIQ_TempRow(ByVal row As AOIQ_TempRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "AOIQ_TempDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class batchDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnbatchId As Global.System.Data.DataColumn Private columnbatchNo As Global.System.Data.DataColumn Private columnpartNo As Global.System.Data.DataColumn Private columnline As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columnprefix As Global.System.Data.DataColumn Private columnsuffix As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "batch" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property batchIdColumn() As Global.System.Data.DataColumn Get Return Me.columnbatchId End Get End Property _ Public ReadOnly Property batchNoColumn() As Global.System.Data.DataColumn Get Return Me.columnbatchNo End Get End Property _ Public ReadOnly Property partNoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartNo End Get End Property _ Public ReadOnly Property lineColumn() As Global.System.Data.DataColumn Get Return Me.columnline End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property prefixColumn() As Global.System.Data.DataColumn Get Return Me.columnprefix End Get End Property _ Public ReadOnly Property suffixColumn() As Global.System.Data.DataColumn Get Return Me.columnsuffix End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As batchRow Get Return CType(Me.Rows(index),batchRow) End Get End Property _ Public Event batchRowChanging As batchRowChangeEventHandler _ Public Event batchRowChanged As batchRowChangeEventHandler _ Public Event batchRowDeleting As batchRowChangeEventHandler _ Public Event batchRowDeleted As batchRowChangeEventHandler _ Public Overloads Sub AddbatchRow(ByVal row As batchRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddbatchRow(ByVal batchNo As String, ByVal partNo As String, ByVal line As Integer, ByVal quantity As Integer, ByVal prefix As String, ByVal suffix As Integer, ByVal lastupdatedby As String, ByVal lastupdate As Date) As batchRow Dim rowbatchRow As batchRow = CType(Me.NewRow,batchRow) Dim columnValuesArray() As Object = New Object() {Nothing, batchNo, partNo, line, quantity, prefix, suffix, lastupdatedby, lastupdate} rowbatchRow.ItemArray = columnValuesArray Me.Rows.Add(rowbatchRow) Return rowbatchRow End Function _ Public Function FindBybatchId(ByVal batchId As Integer) As batchRow Return CType(Me.Rows.Find(New Object() {batchId}),batchRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As batchDataTable = CType(MyBase.Clone,batchDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New batchDataTable() End Function _ Friend Sub InitVars() Me.columnbatchId = MyBase.Columns("batchId") Me.columnbatchNo = MyBase.Columns("batchNo") Me.columnpartNo = MyBase.Columns("partNo") Me.columnline = MyBase.Columns("line") Me.columnquantity = MyBase.Columns("quantity") Me.columnprefix = MyBase.Columns("prefix") Me.columnsuffix = MyBase.Columns("suffix") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") Me.columnlastupdate = MyBase.Columns("lastupdate") End Sub _ Private Sub InitClass() Me.columnbatchId = New Global.System.Data.DataColumn("batchId", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatchId) Me.columnbatchNo = New Global.System.Data.DataColumn("batchNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatchNo) Me.columnpartNo = New Global.System.Data.DataColumn("partNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartNo) Me.columnline = New Global.System.Data.DataColumn("line", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnline) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columnprefix = New Global.System.Data.DataColumn("prefix", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnprefix) Me.columnsuffix = New Global.System.Data.DataColumn("suffix", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsuffix) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnbatchId}, true)) Me.columnbatchId.AutoIncrement = true Me.columnbatchId.AutoIncrementSeed = -1 Me.columnbatchId.AutoIncrementStep = -1 Me.columnbatchId.AllowDBNull = false Me.columnbatchId.ReadOnly = true Me.columnbatchId.Unique = true Me.columnbatchNo.MaxLength = 50 Me.columnpartNo.MaxLength = 50 Me.columnprefix.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewbatchRow() As batchRow Return CType(Me.NewRow,batchRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New batchRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(batchRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.batchRowChangedEvent) Is Nothing) Then RaiseEvent batchRowChanged(Me, New batchRowChangeEvent(CType(e.Row,batchRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.batchRowChangingEvent) Is Nothing) Then RaiseEvent batchRowChanging(Me, New batchRowChangeEvent(CType(e.Row,batchRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.batchRowDeletedEvent) Is Nothing) Then RaiseEvent batchRowDeleted(Me, New batchRowChangeEvent(CType(e.Row,batchRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.batchRowDeletingEvent) Is Nothing) Then RaiseEvent batchRowDeleting(Me, New batchRowChangeEvent(CType(e.Row,batchRow), e.Action)) End If End Sub _ Public Sub RemovebatchRow(ByVal row As batchRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "batchDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class cardDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnptno As Global.System.Data.DataColumn Private columnlotno As Global.System.Data.DataColumn Private columnpartno As Global.System.Data.DataColumn Private columnrevision As Global.System.Data.DataColumn Private columnlinecode As Global.System.Data.DataColumn Private columnholdflag As Global.System.Data.DataColumn Private columnpackflag As Global.System.Data.DataColumn Private columnshipflag As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlottype As Global.System.Data.DataColumn Private columncurtstage As Global.System.Data.DataColumn Private columnstarttime As Global.System.Data.DataColumn Private columnstarttimeRef As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "card" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property ptnoColumn() As Global.System.Data.DataColumn Get Return Me.columnptno End Get End Property _ Public ReadOnly Property lotnoColumn() As Global.System.Data.DataColumn Get Return Me.columnlotno End Get End Property _ Public ReadOnly Property partnoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartno End Get End Property _ Public ReadOnly Property revisionColumn() As Global.System.Data.DataColumn Get Return Me.columnrevision End Get End Property _ Public ReadOnly Property linecodeColumn() As Global.System.Data.DataColumn Get Return Me.columnlinecode End Get End Property _ Public ReadOnly Property holdflagColumn() As Global.System.Data.DataColumn Get Return Me.columnholdflag End Get End Property _ Public ReadOnly Property packflagColumn() As Global.System.Data.DataColumn Get Return Me.columnpackflag End Get End Property _ Public ReadOnly Property shipflagColumn() As Global.System.Data.DataColumn Get Return Me.columnshipflag End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lottypeColumn() As Global.System.Data.DataColumn Get Return Me.columnlottype End Get End Property _ Public ReadOnly Property curtstageColumn() As Global.System.Data.DataColumn Get Return Me.columncurtstage End Get End Property _ Public ReadOnly Property starttimeColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttime End Get End Property _ Public ReadOnly Property starttimeRefColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttimeRef End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As cardRow Get Return CType(Me.Rows(index),cardRow) End Get End Property _ Public Event cardRowChanging As cardRowChangeEventHandler _ Public Event cardRowChanged As cardRowChangeEventHandler _ Public Event cardRowDeleting As cardRowChangeEventHandler _ Public Event cardRowDeleted As cardRowChangeEventHandler _ Public Overloads Sub AddcardRow(ByVal row As cardRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddcardRow( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal ptno As String, _ ByVal lotno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Integer, _ ByVal holdflag As Integer, _ ByVal packflag As Integer, _ ByVal shipflag As Integer, _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Date, _ ByVal starttimeRef As Date, _ ByVal lastupdate As Date, _ ByVal lastupdatedby As String) As cardRow Dim rowcardRow As cardRow = CType(Me.NewRow,cardRow) Dim columnValuesArray() As Object = New Object() {cardno, serialno, ptno, lotno, partno, revision, linecode, holdflag, packflag, shipflag, status, lottype, curtstage, starttime, starttimeRef, lastupdate, lastupdatedby} rowcardRow.ItemArray = columnValuesArray Me.Rows.Add(rowcardRow) Return rowcardRow End Function _ Public Function FindBycardno(ByVal cardno As String) As cardRow Return CType(Me.Rows.Find(New Object() {cardno}),cardRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As cardDataTable = CType(MyBase.Clone,cardDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New cardDataTable() End Function _ Friend Sub InitVars() Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnptno = MyBase.Columns("ptno") Me.columnlotno = MyBase.Columns("lotno") Me.columnpartno = MyBase.Columns("partno") Me.columnrevision = MyBase.Columns("revision") Me.columnlinecode = MyBase.Columns("linecode") Me.columnholdflag = MyBase.Columns("holdflag") Me.columnpackflag = MyBase.Columns("packflag") Me.columnshipflag = MyBase.Columns("shipflag") Me.columnstatus = MyBase.Columns("status") Me.columnlottype = MyBase.Columns("lottype") Me.columncurtstage = MyBase.Columns("curtstage") Me.columnstarttime = MyBase.Columns("starttime") Me.columnstarttimeRef = MyBase.Columns("starttimeRef") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnptno = New Global.System.Data.DataColumn("ptno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptno) Me.columnlotno = New Global.System.Data.DataColumn("lotno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlotno) Me.columnpartno = New Global.System.Data.DataColumn("partno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartno) Me.columnrevision = New Global.System.Data.DataColumn("revision", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrevision) Me.columnlinecode = New Global.System.Data.DataColumn("linecode", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlinecode) Me.columnholdflag = New Global.System.Data.DataColumn("holdflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnholdflag) Me.columnpackflag = New Global.System.Data.DataColumn("packflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpackflag) Me.columnshipflag = New Global.System.Data.DataColumn("shipflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipflag) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlottype = New Global.System.Data.DataColumn("lottype", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlottype) Me.columncurtstage = New Global.System.Data.DataColumn("curtstage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncurtstage) Me.columnstarttime = New Global.System.Data.DataColumn("starttime", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttime) Me.columnstarttimeRef = New Global.System.Data.DataColumn("starttimeRef", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttimeRef) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columncardno}, true)) Me.columncardno.AllowDBNull = false Me.columncardno.Unique = true Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnptno.MaxLength = 50 Me.columnlotno.MaxLength = 50 Me.columnpartno.MaxLength = 50 Me.columnrevision.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlottype.MaxLength = 50 Me.columncurtstage.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewcardRow() As cardRow Return CType(Me.NewRow,cardRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New cardRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(cardRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.cardRowChangedEvent) Is Nothing) Then RaiseEvent cardRowChanged(Me, New cardRowChangeEvent(CType(e.Row,cardRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.cardRowChangingEvent) Is Nothing) Then RaiseEvent cardRowChanging(Me, New cardRowChangeEvent(CType(e.Row,cardRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.cardRowDeletedEvent) Is Nothing) Then RaiseEvent cardRowDeleted(Me, New cardRowChangeEvent(CType(e.Row,cardRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.cardRowDeletingEvent) Is Nothing) Then RaiseEvent cardRowDeleting(Me, New cardRowChangeEvent(CType(e.Row,cardRow), e.Action)) End If End Sub _ Public Sub RemovecardRow(ByVal row As cardRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "cardDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class card_backupDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnptno As Global.System.Data.DataColumn Private columnlotno As Global.System.Data.DataColumn Private columnpartno As Global.System.Data.DataColumn Private columnrevision As Global.System.Data.DataColumn Private columnlinecode As Global.System.Data.DataColumn Private columnholdflag As Global.System.Data.DataColumn Private columnpackflag As Global.System.Data.DataColumn Private columnshipflag As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlottype As Global.System.Data.DataColumn Private columncurtstage As Global.System.Data.DataColumn Private columnstarttime As Global.System.Data.DataColumn Private columnstarttimeRef As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "card_backup" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property ptnoColumn() As Global.System.Data.DataColumn Get Return Me.columnptno End Get End Property _ Public ReadOnly Property lotnoColumn() As Global.System.Data.DataColumn Get Return Me.columnlotno End Get End Property _ Public ReadOnly Property partnoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartno End Get End Property _ Public ReadOnly Property revisionColumn() As Global.System.Data.DataColumn Get Return Me.columnrevision End Get End Property _ Public ReadOnly Property linecodeColumn() As Global.System.Data.DataColumn Get Return Me.columnlinecode End Get End Property _ Public ReadOnly Property holdflagColumn() As Global.System.Data.DataColumn Get Return Me.columnholdflag End Get End Property _ Public ReadOnly Property packflagColumn() As Global.System.Data.DataColumn Get Return Me.columnpackflag End Get End Property _ Public ReadOnly Property shipflagColumn() As Global.System.Data.DataColumn Get Return Me.columnshipflag End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lottypeColumn() As Global.System.Data.DataColumn Get Return Me.columnlottype End Get End Property _ Public ReadOnly Property curtstageColumn() As Global.System.Data.DataColumn Get Return Me.columncurtstage End Get End Property _ Public ReadOnly Property starttimeColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttime End Get End Property _ Public ReadOnly Property starttimeRefColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttimeRef End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As card_backupRow Get Return CType(Me.Rows(index),card_backupRow) End Get End Property _ Public Event card_backupRowChanging As card_backupRowChangeEventHandler _ Public Event card_backupRowChanged As card_backupRowChangeEventHandler _ Public Event card_backupRowDeleting As card_backupRowChangeEventHandler _ Public Event card_backupRowDeleted As card_backupRowChangeEventHandler _ Public Overloads Sub Addcard_backupRow(ByVal row As card_backupRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addcard_backupRow( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal ptno As String, _ ByVal lotno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Integer, _ ByVal holdflag As Integer, _ ByVal packflag As Integer, _ ByVal shipflag As Integer, _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Date, _ ByVal starttimeRef As Date, _ ByVal lastupdate As Date, _ ByVal lastupdatedby As String) As card_backupRow Dim rowcard_backupRow As card_backupRow = CType(Me.NewRow,card_backupRow) Dim columnValuesArray() As Object = New Object() {cardno, serialno, ptno, lotno, partno, revision, linecode, holdflag, packflag, shipflag, status, lottype, curtstage, starttime, starttimeRef, lastupdate, lastupdatedby} rowcard_backupRow.ItemArray = columnValuesArray Me.Rows.Add(rowcard_backupRow) Return rowcard_backupRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As card_backupDataTable = CType(MyBase.Clone,card_backupDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New card_backupDataTable() End Function _ Friend Sub InitVars() Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnptno = MyBase.Columns("ptno") Me.columnlotno = MyBase.Columns("lotno") Me.columnpartno = MyBase.Columns("partno") Me.columnrevision = MyBase.Columns("revision") Me.columnlinecode = MyBase.Columns("linecode") Me.columnholdflag = MyBase.Columns("holdflag") Me.columnpackflag = MyBase.Columns("packflag") Me.columnshipflag = MyBase.Columns("shipflag") Me.columnstatus = MyBase.Columns("status") Me.columnlottype = MyBase.Columns("lottype") Me.columncurtstage = MyBase.Columns("curtstage") Me.columnstarttime = MyBase.Columns("starttime") Me.columnstarttimeRef = MyBase.Columns("starttimeRef") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnptno = New Global.System.Data.DataColumn("ptno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptno) Me.columnlotno = New Global.System.Data.DataColumn("lotno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlotno) Me.columnpartno = New Global.System.Data.DataColumn("partno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartno) Me.columnrevision = New Global.System.Data.DataColumn("revision", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrevision) Me.columnlinecode = New Global.System.Data.DataColumn("linecode", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlinecode) Me.columnholdflag = New Global.System.Data.DataColumn("holdflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnholdflag) Me.columnpackflag = New Global.System.Data.DataColumn("packflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpackflag) Me.columnshipflag = New Global.System.Data.DataColumn("shipflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipflag) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlottype = New Global.System.Data.DataColumn("lottype", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlottype) Me.columncurtstage = New Global.System.Data.DataColumn("curtstage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncurtstage) Me.columnstarttime = New Global.System.Data.DataColumn("starttime", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttime) Me.columnstarttimeRef = New Global.System.Data.DataColumn("starttimeRef", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttimeRef) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columncardno.AllowDBNull = false Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnptno.MaxLength = 50 Me.columnlotno.MaxLength = 50 Me.columnpartno.MaxLength = 50 Me.columnrevision.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlottype.MaxLength = 50 Me.columncurtstage.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newcard_backupRow() As card_backupRow Return CType(Me.NewRow,card_backupRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New card_backupRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(card_backupRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.card_backupRowChangedEvent) Is Nothing) Then RaiseEvent card_backupRowChanged(Me, New card_backupRowChangeEvent(CType(e.Row,card_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.card_backupRowChangingEvent) Is Nothing) Then RaiseEvent card_backupRowChanging(Me, New card_backupRowChangeEvent(CType(e.Row,card_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.card_backupRowDeletedEvent) Is Nothing) Then RaiseEvent card_backupRowDeleted(Me, New card_backupRowChangeEvent(CType(e.Row,card_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.card_backupRowDeletingEvent) Is Nothing) Then RaiseEvent card_backupRowDeleting(Me, New card_backupRowChangeEvent(CType(e.Row,card_backupRow), e.Action)) End If End Sub _ Public Sub Removecard_backupRow(ByVal row As card_backupRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "card_backupDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class card_HistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnptno As Global.System.Data.DataColumn Private columnlotno As Global.System.Data.DataColumn Private columnpartno As Global.System.Data.DataColumn Private columnrevision As Global.System.Data.DataColumn Private columnlinecode As Global.System.Data.DataColumn Private columnholdflag As Global.System.Data.DataColumn Private columnpackflag As Global.System.Data.DataColumn Private columnshipflag As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlottype As Global.System.Data.DataColumn Private columncurtstage As Global.System.Data.DataColumn Private columnstarttime As Global.System.Data.DataColumn Private columnstarttimeRef As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "card_Hist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property ptnoColumn() As Global.System.Data.DataColumn Get Return Me.columnptno End Get End Property _ Public ReadOnly Property lotnoColumn() As Global.System.Data.DataColumn Get Return Me.columnlotno End Get End Property _ Public ReadOnly Property partnoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartno End Get End Property _ Public ReadOnly Property revisionColumn() As Global.System.Data.DataColumn Get Return Me.columnrevision End Get End Property _ Public ReadOnly Property linecodeColumn() As Global.System.Data.DataColumn Get Return Me.columnlinecode End Get End Property _ Public ReadOnly Property holdflagColumn() As Global.System.Data.DataColumn Get Return Me.columnholdflag End Get End Property _ Public ReadOnly Property packflagColumn() As Global.System.Data.DataColumn Get Return Me.columnpackflag End Get End Property _ Public ReadOnly Property shipflagColumn() As Global.System.Data.DataColumn Get Return Me.columnshipflag End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lottypeColumn() As Global.System.Data.DataColumn Get Return Me.columnlottype End Get End Property _ Public ReadOnly Property curtstageColumn() As Global.System.Data.DataColumn Get Return Me.columncurtstage End Get End Property _ Public ReadOnly Property starttimeColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttime End Get End Property _ Public ReadOnly Property starttimeRefColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttimeRef End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As card_HistRow Get Return CType(Me.Rows(index),card_HistRow) End Get End Property _ Public Event card_HistRowChanging As card_HistRowChangeEventHandler _ Public Event card_HistRowChanged As card_HistRowChangeEventHandler _ Public Event card_HistRowDeleting As card_HistRowChangeEventHandler _ Public Event card_HistRowDeleted As card_HistRowChangeEventHandler _ Public Overloads Sub Addcard_HistRow(ByVal row As card_HistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addcard_HistRow( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal ptno As String, _ ByVal lotno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Integer, _ ByVal holdflag As Integer, _ ByVal packflag As Integer, _ ByVal shipflag As Integer, _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Date, _ ByVal starttimeRef As Date, _ ByVal lastupdate As Date, _ ByVal lastupdatedby As String) As card_HistRow Dim rowcard_HistRow As card_HistRow = CType(Me.NewRow,card_HistRow) Dim columnValuesArray() As Object = New Object() {cardno, serialno, ptno, lotno, partno, revision, linecode, holdflag, packflag, shipflag, status, lottype, curtstage, starttime, starttimeRef, lastupdate, lastupdatedby} rowcard_HistRow.ItemArray = columnValuesArray Me.Rows.Add(rowcard_HistRow) Return rowcard_HistRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As card_HistDataTable = CType(MyBase.Clone,card_HistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New card_HistDataTable() End Function _ Friend Sub InitVars() Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnptno = MyBase.Columns("ptno") Me.columnlotno = MyBase.Columns("lotno") Me.columnpartno = MyBase.Columns("partno") Me.columnrevision = MyBase.Columns("revision") Me.columnlinecode = MyBase.Columns("linecode") Me.columnholdflag = MyBase.Columns("holdflag") Me.columnpackflag = MyBase.Columns("packflag") Me.columnshipflag = MyBase.Columns("shipflag") Me.columnstatus = MyBase.Columns("status") Me.columnlottype = MyBase.Columns("lottype") Me.columncurtstage = MyBase.Columns("curtstage") Me.columnstarttime = MyBase.Columns("starttime") Me.columnstarttimeRef = MyBase.Columns("starttimeRef") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnptno = New Global.System.Data.DataColumn("ptno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptno) Me.columnlotno = New Global.System.Data.DataColumn("lotno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlotno) Me.columnpartno = New Global.System.Data.DataColumn("partno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartno) Me.columnrevision = New Global.System.Data.DataColumn("revision", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrevision) Me.columnlinecode = New Global.System.Data.DataColumn("linecode", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlinecode) Me.columnholdflag = New Global.System.Data.DataColumn("holdflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnholdflag) Me.columnpackflag = New Global.System.Data.DataColumn("packflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpackflag) Me.columnshipflag = New Global.System.Data.DataColumn("shipflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipflag) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlottype = New Global.System.Data.DataColumn("lottype", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlottype) Me.columncurtstage = New Global.System.Data.DataColumn("curtstage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncurtstage) Me.columnstarttime = New Global.System.Data.DataColumn("starttime", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttime) Me.columnstarttimeRef = New Global.System.Data.DataColumn("starttimeRef", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttimeRef) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnptno.MaxLength = 50 Me.columnlotno.MaxLength = 50 Me.columnpartno.MaxLength = 50 Me.columnrevision.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlottype.MaxLength = 50 Me.columncurtstage.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newcard_HistRow() As card_HistRow Return CType(Me.NewRow,card_HistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New card_HistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(card_HistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.card_HistRowChangedEvent) Is Nothing) Then RaiseEvent card_HistRowChanged(Me, New card_HistRowChangeEvent(CType(e.Row,card_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.card_HistRowChangingEvent) Is Nothing) Then RaiseEvent card_HistRowChanging(Me, New card_HistRowChangeEvent(CType(e.Row,card_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.card_HistRowDeletedEvent) Is Nothing) Then RaiseEvent card_HistRowDeleted(Me, New card_HistRowChangeEvent(CType(e.Row,card_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.card_HistRowDeletingEvent) Is Nothing) Then RaiseEvent card_HistRowDeleting(Me, New card_HistRowChangeEvent(CType(e.Row,card_HistRow), e.Action)) End If End Sub _ Public Sub Removecard_HistRow(ByVal row As card_HistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "card_HistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class cardHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnpartno As Global.System.Data.DataColumn Private columnrevision As Global.System.Data.DataColumn Private columnlinecode As Global.System.Data.DataColumn Private columnholdflag As Global.System.Data.DataColumn Private columnpackflag As Global.System.Data.DataColumn Private columnshipflag As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlottype As Global.System.Data.DataColumn Private columncurtstage As Global.System.Data.DataColumn Private columnstarttime As Global.System.Data.DataColumn Private columnstarttimeRef As Global.System.Data.DataColumn Private columnaction As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "cardHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property partnoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartno End Get End Property _ Public ReadOnly Property revisionColumn() As Global.System.Data.DataColumn Get Return Me.columnrevision End Get End Property _ Public ReadOnly Property linecodeColumn() As Global.System.Data.DataColumn Get Return Me.columnlinecode End Get End Property _ Public ReadOnly Property holdflagColumn() As Global.System.Data.DataColumn Get Return Me.columnholdflag End Get End Property _ Public ReadOnly Property packflagColumn() As Global.System.Data.DataColumn Get Return Me.columnpackflag End Get End Property _ Public ReadOnly Property shipflagColumn() As Global.System.Data.DataColumn Get Return Me.columnshipflag End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lottypeColumn() As Global.System.Data.DataColumn Get Return Me.columnlottype End Get End Property _ Public ReadOnly Property curtstageColumn() As Global.System.Data.DataColumn Get Return Me.columncurtstage End Get End Property _ Public ReadOnly Property starttimeColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttime End Get End Property _ Public ReadOnly Property starttimeRefColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttimeRef End Get End Property _ Public ReadOnly Property actionColumn() As Global.System.Data.DataColumn Get Return Me.columnaction End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As cardHistRow Get Return CType(Me.Rows(index),cardHistRow) End Get End Property _ Public Event cardHistRowChanging As cardHistRowChangeEventHandler _ Public Event cardHistRowChanged As cardHistRowChangeEventHandler _ Public Event cardHistRowDeleting As cardHistRowChangeEventHandler _ Public Event cardHistRowDeleted As cardHistRowChangeEventHandler _ Public Overloads Sub AddcardHistRow(ByVal row As cardHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddcardHistRow( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Integer, _ ByVal holdflag As Integer, _ ByVal packflag As Integer, _ ByVal shipflag As Integer, _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Date, _ ByVal starttimeRef As Date, _ ByVal action As String, _ ByVal lastupdate As Date, _ ByVal lastupdatedby As String) As cardHistRow Dim rowcardHistRow As cardHistRow = CType(Me.NewRow,cardHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, cardno, serialno, partno, revision, linecode, holdflag, packflag, shipflag, status, lottype, curtstage, starttime, starttimeRef, action, lastupdate, lastupdatedby} rowcardHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowcardHistRow) Return rowcardHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As cardHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),cardHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As cardHistDataTable = CType(MyBase.Clone,cardHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New cardHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnpartno = MyBase.Columns("partno") Me.columnrevision = MyBase.Columns("revision") Me.columnlinecode = MyBase.Columns("linecode") Me.columnholdflag = MyBase.Columns("holdflag") Me.columnpackflag = MyBase.Columns("packflag") Me.columnshipflag = MyBase.Columns("shipflag") Me.columnstatus = MyBase.Columns("status") Me.columnlottype = MyBase.Columns("lottype") Me.columncurtstage = MyBase.Columns("curtstage") Me.columnstarttime = MyBase.Columns("starttime") Me.columnstarttimeRef = MyBase.Columns("starttimeRef") Me.columnaction = MyBase.Columns("action") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnpartno = New Global.System.Data.DataColumn("partno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartno) Me.columnrevision = New Global.System.Data.DataColumn("revision", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrevision) Me.columnlinecode = New Global.System.Data.DataColumn("linecode", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlinecode) Me.columnholdflag = New Global.System.Data.DataColumn("holdflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnholdflag) Me.columnpackflag = New Global.System.Data.DataColumn("packflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpackflag) Me.columnshipflag = New Global.System.Data.DataColumn("shipflag", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipflag) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlottype = New Global.System.Data.DataColumn("lottype", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlottype) Me.columncurtstage = New Global.System.Data.DataColumn("curtstage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncurtstage) Me.columnstarttime = New Global.System.Data.DataColumn("starttime", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttime) Me.columnstarttimeRef = New Global.System.Data.DataColumn("starttimeRef", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttimeRef) Me.columnaction = New Global.System.Data.DataColumn("action", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnaction) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnpartno.MaxLength = 50 Me.columnrevision.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlottype.MaxLength = 50 Me.columncurtstage.MaxLength = 50 Me.columnaction.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewcardHistRow() As cardHistRow Return CType(Me.NewRow,cardHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New cardHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(cardHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.cardHistRowChangedEvent) Is Nothing) Then RaiseEvent cardHistRowChanged(Me, New cardHistRowChangeEvent(CType(e.Row,cardHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.cardHistRowChangingEvent) Is Nothing) Then RaiseEvent cardHistRowChanging(Me, New cardHistRowChangeEvent(CType(e.Row,cardHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.cardHistRowDeletedEvent) Is Nothing) Then RaiseEvent cardHistRowDeleted(Me, New cardHistRowChangeEvent(CType(e.Row,cardHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.cardHistRowDeletingEvent) Is Nothing) Then RaiseEvent cardHistRowDeleting(Me, New cardHistRowChangeEvent(CType(e.Row,cardHistRow), e.Action)) End If End Sub _ Public Sub RemovecardHistRow(ByVal row As cardHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "cardHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class component_partsDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnparent As Global.System.Data.DataColumn Private columncomponent As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "component_parts" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property parentColumn() As Global.System.Data.DataColumn Get Return Me.columnparent End Get End Property _ Public ReadOnly Property componentColumn() As Global.System.Data.DataColumn Get Return Me.columncomponent End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As component_partsRow Get Return CType(Me.Rows(index),component_partsRow) End Get End Property _ Public Event component_partsRowChanging As component_partsRowChangeEventHandler _ Public Event component_partsRowChanged As component_partsRowChangeEventHandler _ Public Event component_partsRowDeleting As component_partsRowChangeEventHandler _ Public Event component_partsRowDeleted As component_partsRowChangeEventHandler _ Public Overloads Sub Addcomponent_partsRow(ByVal row As component_partsRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addcomponent_partsRow(ByVal parent As String, ByVal component As String) As component_partsRow Dim rowcomponent_partsRow As component_partsRow = CType(Me.NewRow,component_partsRow) Dim columnValuesArray() As Object = New Object() {parent, component} rowcomponent_partsRow.ItemArray = columnValuesArray Me.Rows.Add(rowcomponent_partsRow) Return rowcomponent_partsRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As component_partsDataTable = CType(MyBase.Clone,component_partsDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New component_partsDataTable() End Function _ Friend Sub InitVars() Me.columnparent = MyBase.Columns("parent") Me.columncomponent = MyBase.Columns("component") End Sub _ Private Sub InitClass() Me.columnparent = New Global.System.Data.DataColumn("parent", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnparent) Me.columncomponent = New Global.System.Data.DataColumn("component", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncomponent) Me.columnparent.MaxLength = 100 Me.columncomponent.MaxLength = 100 End Sub _ Public Function Newcomponent_partsRow() As component_partsRow Return CType(Me.NewRow,component_partsRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New component_partsRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(component_partsRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.component_partsRowChangedEvent) Is Nothing) Then RaiseEvent component_partsRowChanged(Me, New component_partsRowChangeEvent(CType(e.Row,component_partsRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.component_partsRowChangingEvent) Is Nothing) Then RaiseEvent component_partsRowChanging(Me, New component_partsRowChangeEvent(CType(e.Row,component_partsRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.component_partsRowDeletedEvent) Is Nothing) Then RaiseEvent component_partsRowDeleted(Me, New component_partsRowChangeEvent(CType(e.Row,component_partsRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.component_partsRowDeletingEvent) Is Nothing) Then RaiseEvent component_partsRowDeleting(Me, New component_partsRowChangeEvent(CType(e.Row,component_partsRow), e.Action)) End If End Sub _ Public Sub Removecomponent_partsRow(ByVal row As component_partsRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "component_partsDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class CTSDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnserialno As Global.System.Data.DataColumn Private columnlocation As Global.System.Data.DataColumn Private columnpartno As Global.System.Data.DataColumn Private columnlotnumber As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "CTS" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property locationColumn() As Global.System.Data.DataColumn Get Return Me.columnlocation End Get End Property _ Public ReadOnly Property partnoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartno End Get End Property _ Public ReadOnly Property lotnumberColumn() As Global.System.Data.DataColumn Get Return Me.columnlotnumber End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As CTSRow Get Return CType(Me.Rows(index),CTSRow) End Get End Property _ Public Event CTSRowChanging As CTSRowChangeEventHandler _ Public Event CTSRowChanged As CTSRowChangeEventHandler _ Public Event CTSRowDeleting As CTSRowChangeEventHandler _ Public Event CTSRowDeleted As CTSRowChangeEventHandler _ Public Overloads Sub AddCTSRow(ByVal row As CTSRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddCTSRow(ByVal serialno As String, ByVal location As String, ByVal partno As String, ByVal lotnumber As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As CTSRow Dim rowCTSRow As CTSRow = CType(Me.NewRow,CTSRow) Dim columnValuesArray() As Object = New Object() {serialno, location, partno, lotnumber, lastupdate, lastupdatedby} rowCTSRow.ItemArray = columnValuesArray Me.Rows.Add(rowCTSRow) Return rowCTSRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As CTSDataTable = CType(MyBase.Clone,CTSDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New CTSDataTable() End Function _ Friend Sub InitVars() Me.columnserialno = MyBase.Columns("serialno") Me.columnlocation = MyBase.Columns("location") Me.columnpartno = MyBase.Columns("partno") Me.columnlotnumber = MyBase.Columns("lotnumber") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnlocation = New Global.System.Data.DataColumn("location", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlocation) Me.columnpartno = New Global.System.Data.DataColumn("partno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartno) Me.columnlotnumber = New Global.System.Data.DataColumn("lotnumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlotnumber) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnserialno.MaxLength = 50 Me.columnlocation.MaxLength = 50 Me.columnpartno.MaxLength = 50 Me.columnlotnumber.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewCTSRow() As CTSRow Return CType(Me.NewRow,CTSRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New CTSRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(CTSRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.CTSRowChangedEvent) Is Nothing) Then RaiseEvent CTSRowChanged(Me, New CTSRowChangeEvent(CType(e.Row,CTSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.CTSRowChangingEvent) Is Nothing) Then RaiseEvent CTSRowChanging(Me, New CTSRowChangeEvent(CType(e.Row,CTSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.CTSRowDeletedEvent) Is Nothing) Then RaiseEvent CTSRowDeleted(Me, New CTSRowChangeEvent(CType(e.Row,CTSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.CTSRowDeletingEvent) Is Nothing) Then RaiseEvent CTSRowDeleting(Me, New CTSRowChangeEvent(CType(e.Row,CTSRow), e.Action)) End If End Sub _ Public Sub RemoveCTSRow(ByVal row As CTSRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "CTSDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class defectCatProdDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columndefectCatCode As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "defectCatProd" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property defectCatCodeColumn() As Global.System.Data.DataColumn Get Return Me.columndefectCatCode End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As defectCatProdRow Get Return CType(Me.Rows(index),defectCatProdRow) End Get End Property _ Public Event defectCatProdRowChanging As defectCatProdRowChangeEventHandler _ Public Event defectCatProdRowChanged As defectCatProdRowChangeEventHandler _ Public Event defectCatProdRowDeleting As defectCatProdRowChangeEventHandler _ Public Event defectCatProdRowDeleted As defectCatProdRowChangeEventHandler _ Public Overloads Sub AdddefectCatProdRow(ByVal row As defectCatProdRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdddefectCatProdRow(ByVal defectCatCode As String, ByVal description As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As defectCatProdRow Dim rowdefectCatProdRow As defectCatProdRow = CType(Me.NewRow,defectCatProdRow) Dim columnValuesArray() As Object = New Object() {defectCatCode, description, active, lastupdate, lastupdatedby} rowdefectCatProdRow.ItemArray = columnValuesArray Me.Rows.Add(rowdefectCatProdRow) Return rowdefectCatProdRow End Function _ Public Function FindBydefectCatCode(ByVal defectCatCode As String) As defectCatProdRow Return CType(Me.Rows.Find(New Object() {defectCatCode}),defectCatProdRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As defectCatProdDataTable = CType(MyBase.Clone,defectCatProdDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New defectCatProdDataTable() End Function _ Friend Sub InitVars() Me.columndefectCatCode = MyBase.Columns("defectCatCode") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columndefectCatCode = New Global.System.Data.DataColumn("defectCatCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefectCatCode) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columndefectCatCode}, true)) Me.columndefectCatCode.AllowDBNull = false Me.columndefectCatCode.Unique = true Me.columndefectCatCode.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewdefectCatProdRow() As defectCatProdRow Return CType(Me.NewRow,defectCatProdRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New defectCatProdRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(defectCatProdRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.defectCatProdRowChangedEvent) Is Nothing) Then RaiseEvent defectCatProdRowChanged(Me, New defectCatProdRowChangeEvent(CType(e.Row,defectCatProdRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.defectCatProdRowChangingEvent) Is Nothing) Then RaiseEvent defectCatProdRowChanging(Me, New defectCatProdRowChangeEvent(CType(e.Row,defectCatProdRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.defectCatProdRowDeletedEvent) Is Nothing) Then RaiseEvent defectCatProdRowDeleted(Me, New defectCatProdRowChangeEvent(CType(e.Row,defectCatProdRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.defectCatProdRowDeletingEvent) Is Nothing) Then RaiseEvent defectCatProdRowDeleting(Me, New defectCatProdRowChangeEvent(CType(e.Row,defectCatProdRow), e.Action)) End If End Sub _ Public Sub RemovedefectCatProdRow(ByVal row As defectCatProdRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "defectCatProdDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class defectCatProdHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columndefectCatCode As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "defectCatProdHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property defectCatCodeColumn() As Global.System.Data.DataColumn Get Return Me.columndefectCatCode End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As defectCatProdHistRow Get Return CType(Me.Rows(index),defectCatProdHistRow) End Get End Property _ Public Event defectCatProdHistRowChanging As defectCatProdHistRowChangeEventHandler _ Public Event defectCatProdHistRowChanged As defectCatProdHistRowChangeEventHandler _ Public Event defectCatProdHistRowDeleting As defectCatProdHistRowChangeEventHandler _ Public Event defectCatProdHistRowDeleted As defectCatProdHistRowChangeEventHandler _ Public Overloads Sub AdddefectCatProdHistRow(ByVal row As defectCatProdHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdddefectCatProdHistRow(ByVal defectCatCode As String, ByVal description As String, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As defectCatProdHistRow Dim rowdefectCatProdHistRow As defectCatProdHistRow = CType(Me.NewRow,defectCatProdHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, defectCatCode, description, active, status, lastupdate, lastupdatedby} rowdefectCatProdHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowdefectCatProdHistRow) Return rowdefectCatProdHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As defectCatProdHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),defectCatProdHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As defectCatProdHistDataTable = CType(MyBase.Clone,defectCatProdHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New defectCatProdHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columndefectCatCode = MyBase.Columns("defectCatCode") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columndefectCatCode = New Global.System.Data.DataColumn("defectCatCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefectCatCode) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columndefectCatCode.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewdefectCatProdHistRow() As defectCatProdHistRow Return CType(Me.NewRow,defectCatProdHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New defectCatProdHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(defectCatProdHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.defectCatProdHistRowChangedEvent) Is Nothing) Then RaiseEvent defectCatProdHistRowChanged(Me, New defectCatProdHistRowChangeEvent(CType(e.Row,defectCatProdHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.defectCatProdHistRowChangingEvent) Is Nothing) Then RaiseEvent defectCatProdHistRowChanging(Me, New defectCatProdHistRowChangeEvent(CType(e.Row,defectCatProdHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.defectCatProdHistRowDeletedEvent) Is Nothing) Then RaiseEvent defectCatProdHistRowDeleted(Me, New defectCatProdHistRowChangeEvent(CType(e.Row,defectCatProdHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.defectCatProdHistRowDeletingEvent) Is Nothing) Then RaiseEvent defectCatProdHistRowDeleting(Me, New defectCatProdHistRowChangeEvent(CType(e.Row,defectCatProdHistRow), e.Action)) End If End Sub _ Public Sub RemovedefectCatProdHistRow(ByVal row As defectCatProdHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "defectCatProdHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class defectCatQCDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columndefectCatCode As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "defectCatQC" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property defectCatCodeColumn() As Global.System.Data.DataColumn Get Return Me.columndefectCatCode End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As defectCatQCRow Get Return CType(Me.Rows(index),defectCatQCRow) End Get End Property _ Public Event defectCatQCRowChanging As defectCatQCRowChangeEventHandler _ Public Event defectCatQCRowChanged As defectCatQCRowChangeEventHandler _ Public Event defectCatQCRowDeleting As defectCatQCRowChangeEventHandler _ Public Event defectCatQCRowDeleted As defectCatQCRowChangeEventHandler _ Public Overloads Sub AdddefectCatQCRow(ByVal row As defectCatQCRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdddefectCatQCRow(ByVal defectCatCode As String, ByVal description As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As defectCatQCRow Dim rowdefectCatQCRow As defectCatQCRow = CType(Me.NewRow,defectCatQCRow) Dim columnValuesArray() As Object = New Object() {defectCatCode, description, active, lastupdate, lastupdatedby} rowdefectCatQCRow.ItemArray = columnValuesArray Me.Rows.Add(rowdefectCatQCRow) Return rowdefectCatQCRow End Function _ Public Function FindBydefectCatCode(ByVal defectCatCode As String) As defectCatQCRow Return CType(Me.Rows.Find(New Object() {defectCatCode}),defectCatQCRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As defectCatQCDataTable = CType(MyBase.Clone,defectCatQCDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New defectCatQCDataTable() End Function _ Friend Sub InitVars() Me.columndefectCatCode = MyBase.Columns("defectCatCode") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columndefectCatCode = New Global.System.Data.DataColumn("defectCatCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefectCatCode) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columndefectCatCode}, true)) Me.columndefectCatCode.AllowDBNull = false Me.columndefectCatCode.Unique = true Me.columndefectCatCode.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewdefectCatQCRow() As defectCatQCRow Return CType(Me.NewRow,defectCatQCRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New defectCatQCRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(defectCatQCRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.defectCatQCRowChangedEvent) Is Nothing) Then RaiseEvent defectCatQCRowChanged(Me, New defectCatQCRowChangeEvent(CType(e.Row,defectCatQCRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.defectCatQCRowChangingEvent) Is Nothing) Then RaiseEvent defectCatQCRowChanging(Me, New defectCatQCRowChangeEvent(CType(e.Row,defectCatQCRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.defectCatQCRowDeletedEvent) Is Nothing) Then RaiseEvent defectCatQCRowDeleted(Me, New defectCatQCRowChangeEvent(CType(e.Row,defectCatQCRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.defectCatQCRowDeletingEvent) Is Nothing) Then RaiseEvent defectCatQCRowDeleting(Me, New defectCatQCRowChangeEvent(CType(e.Row,defectCatQCRow), e.Action)) End If End Sub _ Public Sub RemovedefectCatQCRow(ByVal row As defectCatQCRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "defectCatQCDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class defectCatQCHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columndefectCatCode As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "defectCatQCHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property defectCatCodeColumn() As Global.System.Data.DataColumn Get Return Me.columndefectCatCode End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As defectCatQCHistRow Get Return CType(Me.Rows(index),defectCatQCHistRow) End Get End Property _ Public Event defectCatQCHistRowChanging As defectCatQCHistRowChangeEventHandler _ Public Event defectCatQCHistRowChanged As defectCatQCHistRowChangeEventHandler _ Public Event defectCatQCHistRowDeleting As defectCatQCHistRowChangeEventHandler _ Public Event defectCatQCHistRowDeleted As defectCatQCHistRowChangeEventHandler _ Public Overloads Sub AdddefectCatQCHistRow(ByVal row As defectCatQCHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdddefectCatQCHistRow(ByVal defectCatCode As String, ByVal description As String, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As defectCatQCHistRow Dim rowdefectCatQCHistRow As defectCatQCHistRow = CType(Me.NewRow,defectCatQCHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, defectCatCode, description, active, status, lastupdate, lastupdatedby} rowdefectCatQCHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowdefectCatQCHistRow) Return rowdefectCatQCHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As defectCatQCHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),defectCatQCHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As defectCatQCHistDataTable = CType(MyBase.Clone,defectCatQCHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New defectCatQCHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columndefectCatCode = MyBase.Columns("defectCatCode") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columndefectCatCode = New Global.System.Data.DataColumn("defectCatCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefectCatCode) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columndefectCatCode.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewdefectCatQCHistRow() As defectCatQCHistRow Return CType(Me.NewRow,defectCatQCHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New defectCatQCHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(defectCatQCHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.defectCatQCHistRowChangedEvent) Is Nothing) Then RaiseEvent defectCatQCHistRowChanged(Me, New defectCatQCHistRowChangeEvent(CType(e.Row,defectCatQCHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.defectCatQCHistRowChangingEvent) Is Nothing) Then RaiseEvent defectCatQCHistRowChanging(Me, New defectCatQCHistRowChangeEvent(CType(e.Row,defectCatQCHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.defectCatQCHistRowDeletedEvent) Is Nothing) Then RaiseEvent defectCatQCHistRowDeleted(Me, New defectCatQCHistRowChangeEvent(CType(e.Row,defectCatQCHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.defectCatQCHistRowDeletingEvent) Is Nothing) Then RaiseEvent defectCatQCHistRowDeleting(Me, New defectCatQCHistRowChangeEvent(CType(e.Row,defectCatQCHistRow), e.Action)) End If End Sub _ Public Sub RemovedefectCatQCHistRow(ByVal row As defectCatQCHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "defectCatQCHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class defectProdDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columndefectCode As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "defectProd" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property defectCodeColumn() As Global.System.Data.DataColumn Get Return Me.columndefectCode End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As defectProdRow Get Return CType(Me.Rows(index),defectProdRow) End Get End Property _ Public Event defectProdRowChanging As defectProdRowChangeEventHandler _ Public Event defectProdRowChanged As defectProdRowChangeEventHandler _ Public Event defectProdRowDeleting As defectProdRowChangeEventHandler _ Public Event defectProdRowDeleted As defectProdRowChangeEventHandler _ Public Overloads Sub AdddefectProdRow(ByVal row As defectProdRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdddefectProdRow(ByVal defectCode As String, ByVal description As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As defectProdRow Dim rowdefectProdRow As defectProdRow = CType(Me.NewRow,defectProdRow) Dim columnValuesArray() As Object = New Object() {defectCode, description, active, lastupdate, lastupdatedby} rowdefectProdRow.ItemArray = columnValuesArray Me.Rows.Add(rowdefectProdRow) Return rowdefectProdRow End Function _ Public Function FindBydefectCode(ByVal defectCode As String) As defectProdRow Return CType(Me.Rows.Find(New Object() {defectCode}),defectProdRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As defectProdDataTable = CType(MyBase.Clone,defectProdDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New defectProdDataTable() End Function _ Friend Sub InitVars() Me.columndefectCode = MyBase.Columns("defectCode") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columndefectCode = New Global.System.Data.DataColumn("defectCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefectCode) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columndefectCode}, true)) Me.columndefectCode.AllowDBNull = false Me.columndefectCode.Unique = true Me.columndefectCode.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewdefectProdRow() As defectProdRow Return CType(Me.NewRow,defectProdRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New defectProdRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(defectProdRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.defectProdRowChangedEvent) Is Nothing) Then RaiseEvent defectProdRowChanged(Me, New defectProdRowChangeEvent(CType(e.Row,defectProdRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.defectProdRowChangingEvent) Is Nothing) Then RaiseEvent defectProdRowChanging(Me, New defectProdRowChangeEvent(CType(e.Row,defectProdRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.defectProdRowDeletedEvent) Is Nothing) Then RaiseEvent defectProdRowDeleted(Me, New defectProdRowChangeEvent(CType(e.Row,defectProdRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.defectProdRowDeletingEvent) Is Nothing) Then RaiseEvent defectProdRowDeleting(Me, New defectProdRowChangeEvent(CType(e.Row,defectProdRow), e.Action)) End If End Sub _ Public Sub RemovedefectProdRow(ByVal row As defectProdRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "defectProdDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class defectProdHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columndefectCode As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "defectProdHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property defectCodeColumn() As Global.System.Data.DataColumn Get Return Me.columndefectCode End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As defectProdHistRow Get Return CType(Me.Rows(index),defectProdHistRow) End Get End Property _ Public Event defectProdHistRowChanging As defectProdHistRowChangeEventHandler _ Public Event defectProdHistRowChanged As defectProdHistRowChangeEventHandler _ Public Event defectProdHistRowDeleting As defectProdHistRowChangeEventHandler _ Public Event defectProdHistRowDeleted As defectProdHistRowChangeEventHandler _ Public Overloads Sub AdddefectProdHistRow(ByVal row As defectProdHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdddefectProdHistRow(ByVal defectCode As String, ByVal description As String, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As defectProdHistRow Dim rowdefectProdHistRow As defectProdHistRow = CType(Me.NewRow,defectProdHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, defectCode, description, active, status, lastupdate, lastupdatedby} rowdefectProdHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowdefectProdHistRow) Return rowdefectProdHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As defectProdHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),defectProdHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As defectProdHistDataTable = CType(MyBase.Clone,defectProdHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New defectProdHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columndefectCode = MyBase.Columns("defectCode") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columndefectCode = New Global.System.Data.DataColumn("defectCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefectCode) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columndefectCode.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewdefectProdHistRow() As defectProdHistRow Return CType(Me.NewRow,defectProdHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New defectProdHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(defectProdHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.defectProdHistRowChangedEvent) Is Nothing) Then RaiseEvent defectProdHistRowChanged(Me, New defectProdHistRowChangeEvent(CType(e.Row,defectProdHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.defectProdHistRowChangingEvent) Is Nothing) Then RaiseEvent defectProdHistRowChanging(Me, New defectProdHistRowChangeEvent(CType(e.Row,defectProdHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.defectProdHistRowDeletedEvent) Is Nothing) Then RaiseEvent defectProdHistRowDeleted(Me, New defectProdHistRowChangeEvent(CType(e.Row,defectProdHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.defectProdHistRowDeletingEvent) Is Nothing) Then RaiseEvent defectProdHistRowDeleting(Me, New defectProdHistRowChangeEvent(CType(e.Row,defectProdHistRow), e.Action)) End If End Sub _ Public Sub RemovedefectProdHistRow(ByVal row As defectProdHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "defectProdHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class defectQCDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columndefectCode As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "defectQC" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property defectCodeColumn() As Global.System.Data.DataColumn Get Return Me.columndefectCode End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As defectQCRow Get Return CType(Me.Rows(index),defectQCRow) End Get End Property _ Public Event defectQCRowChanging As defectQCRowChangeEventHandler _ Public Event defectQCRowChanged As defectQCRowChangeEventHandler _ Public Event defectQCRowDeleting As defectQCRowChangeEventHandler _ Public Event defectQCRowDeleted As defectQCRowChangeEventHandler _ Public Overloads Sub AdddefectQCRow(ByVal row As defectQCRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdddefectQCRow(ByVal defectCode As String, ByVal description As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As defectQCRow Dim rowdefectQCRow As defectQCRow = CType(Me.NewRow,defectQCRow) Dim columnValuesArray() As Object = New Object() {defectCode, description, active, lastupdate, lastupdatedby} rowdefectQCRow.ItemArray = columnValuesArray Me.Rows.Add(rowdefectQCRow) Return rowdefectQCRow End Function _ Public Function FindBydefectCode(ByVal defectCode As String) As defectQCRow Return CType(Me.Rows.Find(New Object() {defectCode}),defectQCRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As defectQCDataTable = CType(MyBase.Clone,defectQCDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New defectQCDataTable() End Function _ Friend Sub InitVars() Me.columndefectCode = MyBase.Columns("defectCode") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columndefectCode = New Global.System.Data.DataColumn("defectCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefectCode) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columndefectCode}, true)) Me.columndefectCode.AllowDBNull = false Me.columndefectCode.Unique = true Me.columndefectCode.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewdefectQCRow() As defectQCRow Return CType(Me.NewRow,defectQCRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New defectQCRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(defectQCRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.defectQCRowChangedEvent) Is Nothing) Then RaiseEvent defectQCRowChanged(Me, New defectQCRowChangeEvent(CType(e.Row,defectQCRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.defectQCRowChangingEvent) Is Nothing) Then RaiseEvent defectQCRowChanging(Me, New defectQCRowChangeEvent(CType(e.Row,defectQCRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.defectQCRowDeletedEvent) Is Nothing) Then RaiseEvent defectQCRowDeleted(Me, New defectQCRowChangeEvent(CType(e.Row,defectQCRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.defectQCRowDeletingEvent) Is Nothing) Then RaiseEvent defectQCRowDeleting(Me, New defectQCRowChangeEvent(CType(e.Row,defectQCRow), e.Action)) End If End Sub _ Public Sub RemovedefectQCRow(ByVal row As defectQCRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "defectQCDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class defectQCHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columndefectCode As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "defectQCHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property defectCodeColumn() As Global.System.Data.DataColumn Get Return Me.columndefectCode End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As defectQCHistRow Get Return CType(Me.Rows(index),defectQCHistRow) End Get End Property _ Public Event defectQCHistRowChanging As defectQCHistRowChangeEventHandler _ Public Event defectQCHistRowChanged As defectQCHistRowChangeEventHandler _ Public Event defectQCHistRowDeleting As defectQCHistRowChangeEventHandler _ Public Event defectQCHistRowDeleted As defectQCHistRowChangeEventHandler _ Public Overloads Sub AdddefectQCHistRow(ByVal row As defectQCHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdddefectQCHistRow(ByVal defectCode As String, ByVal description As String, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As defectQCHistRow Dim rowdefectQCHistRow As defectQCHistRow = CType(Me.NewRow,defectQCHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, defectCode, description, active, status, lastupdate, lastupdatedby} rowdefectQCHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowdefectQCHistRow) Return rowdefectQCHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As defectQCHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),defectQCHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As defectQCHistDataTable = CType(MyBase.Clone,defectQCHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New defectQCHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columndefectCode = MyBase.Columns("defectCode") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columndefectCode = New Global.System.Data.DataColumn("defectCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefectCode) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columndefectCode.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewdefectQCHistRow() As defectQCHistRow Return CType(Me.NewRow,defectQCHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New defectQCHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(defectQCHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.defectQCHistRowChangedEvent) Is Nothing) Then RaiseEvent defectQCHistRowChanged(Me, New defectQCHistRowChangeEvent(CType(e.Row,defectQCHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.defectQCHistRowChangingEvent) Is Nothing) Then RaiseEvent defectQCHistRowChanging(Me, New defectQCHistRowChangeEvent(CType(e.Row,defectQCHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.defectQCHistRowDeletedEvent) Is Nothing) Then RaiseEvent defectQCHistRowDeleted(Me, New defectQCHistRowChangeEvent(CType(e.Row,defectQCHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.defectQCHistRowDeletingEvent) Is Nothing) Then RaiseEvent defectQCHistRowDeleting(Me, New defectQCHistRowChangeEvent(CType(e.Row,defectQCHistRow), e.Action)) End If End Sub _ Public Sub RemovedefectQCHistRow(ByVal row As defectQCHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "defectQCHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class FA_NewPTDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnPTno As Global.System.Data.DataColumn Private columnFAno As Global.System.Data.DataColumn Private columnQuantity As Global.System.Data.DataColumn Private columnRegisteredBy As Global.System.Data.DataColumn Private columnRegisteredDate As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "FA_NewPT" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property PTnoColumn() As Global.System.Data.DataColumn Get Return Me.columnPTno End Get End Property _ Public ReadOnly Property FAnoColumn() As Global.System.Data.DataColumn Get Return Me.columnFAno End Get End Property _ Public ReadOnly Property QuantityColumn() As Global.System.Data.DataColumn Get Return Me.columnQuantity End Get End Property _ Public ReadOnly Property RegisteredByColumn() As Global.System.Data.DataColumn Get Return Me.columnRegisteredBy End Get End Property _ Public ReadOnly Property RegisteredDateColumn() As Global.System.Data.DataColumn Get Return Me.columnRegisteredDate End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As FA_NewPTRow Get Return CType(Me.Rows(index),FA_NewPTRow) End Get End Property _ Public Event FA_NewPTRowChanging As FA_NewPTRowChangeEventHandler _ Public Event FA_NewPTRowChanged As FA_NewPTRowChangeEventHandler _ Public Event FA_NewPTRowDeleting As FA_NewPTRowChangeEventHandler _ Public Event FA_NewPTRowDeleted As FA_NewPTRowChangeEventHandler _ Public Overloads Sub AddFA_NewPTRow(ByVal row As FA_NewPTRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddFA_NewPTRow(ByVal PTno As String, ByVal FAno As String, ByVal Quantity As Integer, ByVal RegisteredBy As String, ByVal RegisteredDate As Date) As FA_NewPTRow Dim rowFA_NewPTRow As FA_NewPTRow = CType(Me.NewRow,FA_NewPTRow) Dim columnValuesArray() As Object = New Object() {PTno, FAno, Quantity, RegisteredBy, RegisteredDate} rowFA_NewPTRow.ItemArray = columnValuesArray Me.Rows.Add(rowFA_NewPTRow) Return rowFA_NewPTRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As FA_NewPTDataTable = CType(MyBase.Clone,FA_NewPTDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New FA_NewPTDataTable() End Function _ Friend Sub InitVars() Me.columnPTno = MyBase.Columns("PTno") Me.columnFAno = MyBase.Columns("FAno") Me.columnQuantity = MyBase.Columns("Quantity") Me.columnRegisteredBy = MyBase.Columns("RegisteredBy") Me.columnRegisteredDate = MyBase.Columns("RegisteredDate") End Sub _ Private Sub InitClass() Me.columnPTno = New Global.System.Data.DataColumn("PTno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPTno) Me.columnFAno = New Global.System.Data.DataColumn("FAno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFAno) Me.columnQuantity = New Global.System.Data.DataColumn("Quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnQuantity) Me.columnRegisteredBy = New Global.System.Data.DataColumn("RegisteredBy", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRegisteredBy) Me.columnRegisteredDate = New Global.System.Data.DataColumn("RegisteredDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRegisteredDate) Me.columnPTno.AllowDBNull = false Me.columnPTno.MaxLength = 50 Me.columnFAno.AllowDBNull = false Me.columnFAno.MaxLength = 50 Me.columnQuantity.AllowDBNull = false Me.columnRegisteredBy.AllowDBNull = false Me.columnRegisteredBy.MaxLength = 50 Me.columnRegisteredDate.AllowDBNull = false End Sub _ Public Function NewFA_NewPTRow() As FA_NewPTRow Return CType(Me.NewRow,FA_NewPTRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New FA_NewPTRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(FA_NewPTRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.FA_NewPTRowChangedEvent) Is Nothing) Then RaiseEvent FA_NewPTRowChanged(Me, New FA_NewPTRowChangeEvent(CType(e.Row,FA_NewPTRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.FA_NewPTRowChangingEvent) Is Nothing) Then RaiseEvent FA_NewPTRowChanging(Me, New FA_NewPTRowChangeEvent(CType(e.Row,FA_NewPTRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.FA_NewPTRowDeletedEvent) Is Nothing) Then RaiseEvent FA_NewPTRowDeleted(Me, New FA_NewPTRowChangeEvent(CType(e.Row,FA_NewPTRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.FA_NewPTRowDeletingEvent) Is Nothing) Then RaiseEvent FA_NewPTRowDeleting(Me, New FA_NewPTRowChangeEvent(CType(e.Row,FA_NewPTRow), e.Action)) End If End Sub _ Public Sub RemoveFA_NewPTRow(ByVal row As FA_NewPTRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "FA_NewPTDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class faNoDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnfaId As Global.System.Data.DataColumn Private columnfaNo As Global.System.Data.DataColumn Private columnptNo As Global.System.Data.DataColumn Private columnsuffix As Global.System.Data.DataColumn Private columnstage As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn Private columnQuantity As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "faNo" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property faIdColumn() As Global.System.Data.DataColumn Get Return Me.columnfaId End Get End Property _ Public ReadOnly Property faNoColumn() As Global.System.Data.DataColumn Get Return Me.columnfaNo End Get End Property _ Public ReadOnly Property ptNoColumn() As Global.System.Data.DataColumn Get Return Me.columnptNo End Get End Property _ Public ReadOnly Property suffixColumn() As Global.System.Data.DataColumn Get Return Me.columnsuffix End Get End Property _ Public ReadOnly Property stageColumn() As Global.System.Data.DataColumn Get Return Me.columnstage End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property QuantityColumn() As Global.System.Data.DataColumn Get Return Me.columnQuantity End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As faNoRow Get Return CType(Me.Rows(index),faNoRow) End Get End Property _ Public Event faNoRowChanging As faNoRowChangeEventHandler _ Public Event faNoRowChanged As faNoRowChangeEventHandler _ Public Event faNoRowDeleting As faNoRowChangeEventHandler _ Public Event faNoRowDeleted As faNoRowChangeEventHandler _ Public Overloads Sub AddfaNoRow(ByVal row As faNoRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddfaNoRow(ByVal faNo As String, ByVal ptNo As String, ByVal suffix As String, ByVal stage As String, ByVal lastupdate As Date, ByVal lastupdatedby As String, ByVal Quantity As Integer, ByVal status As Integer) As faNoRow Dim rowfaNoRow As faNoRow = CType(Me.NewRow,faNoRow) Dim columnValuesArray() As Object = New Object() {Nothing, faNo, ptNo, suffix, stage, lastupdate, lastupdatedby, Quantity, status} rowfaNoRow.ItemArray = columnValuesArray Me.Rows.Add(rowfaNoRow) Return rowfaNoRow End Function _ Public Function FindByfaId(ByVal faId As Integer) As faNoRow Return CType(Me.Rows.Find(New Object() {faId}),faNoRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As faNoDataTable = CType(MyBase.Clone,faNoDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New faNoDataTable() End Function _ Friend Sub InitVars() Me.columnfaId = MyBase.Columns("faId") Me.columnfaNo = MyBase.Columns("faNo") Me.columnptNo = MyBase.Columns("ptNo") Me.columnsuffix = MyBase.Columns("suffix") Me.columnstage = MyBase.Columns("stage") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") Me.columnQuantity = MyBase.Columns("Quantity") Me.columnstatus = MyBase.Columns("status") End Sub _ Private Sub InitClass() Me.columnfaId = New Global.System.Data.DataColumn("faId", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnfaId) Me.columnfaNo = New Global.System.Data.DataColumn("faNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnfaNo) Me.columnptNo = New Global.System.Data.DataColumn("ptNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptNo) Me.columnsuffix = New Global.System.Data.DataColumn("suffix", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsuffix) Me.columnstage = New Global.System.Data.DataColumn("stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstage) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnQuantity = New Global.System.Data.DataColumn("Quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnQuantity) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnfaId}, true)) Me.columnfaId.AutoIncrement = true Me.columnfaId.AutoIncrementSeed = -1 Me.columnfaId.AutoIncrementStep = -1 Me.columnfaId.AllowDBNull = false Me.columnfaId.ReadOnly = true Me.columnfaId.Unique = true Me.columnfaNo.MaxLength = 50 Me.columnptNo.MaxLength = 50 Me.columnsuffix.MaxLength = 50 Me.columnstage.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewfaNoRow() As faNoRow Return CType(Me.NewRow,faNoRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New faNoRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(faNoRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.faNoRowChangedEvent) Is Nothing) Then RaiseEvent faNoRowChanged(Me, New faNoRowChangeEvent(CType(e.Row,faNoRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.faNoRowChangingEvent) Is Nothing) Then RaiseEvent faNoRowChanging(Me, New faNoRowChangeEvent(CType(e.Row,faNoRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.faNoRowDeletedEvent) Is Nothing) Then RaiseEvent faNoRowDeleted(Me, New faNoRowChangeEvent(CType(e.Row,faNoRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.faNoRowDeletingEvent) Is Nothing) Then RaiseEvent faNoRowDeleting(Me, New faNoRowChangeEvent(CType(e.Row,faNoRow), e.Action)) End If End Sub _ Public Sub RemovefaNoRow(ByVal row As faNoRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "faNoDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class KITTINGDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnREV As Global.System.Data.DataColumn Private columnPARTNO As Global.System.Data.DataColumn Private columnDESC1 As Global.System.Data.DataColumn Private columnUSAGE As Global.System.Data.DataColumn Private columnSPQ As Global.System.Data.DataColumn Private columnOPERATOR As Global.System.Data.DataColumn Private columnKITTINGDATE As Global.System.Data.DataColumn Private columnQTY As Global.System.Data.DataColumn Private columnFEEDER As Global.System.Data.DataColumn Private columnACCOUNT As Global.System.Data.DataColumn Private columnMACHINE As Global.System.Data.DataColumn Private columnMODEL As Global.System.Data.DataColumn Private columnTYPE As Global.System.Data.DataColumn Private columnLINE As Global.System.Data.DataColumn Private columnEOH As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "KITTING" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property REVColumn() As Global.System.Data.DataColumn Get Return Me.columnREV End Get End Property _ Public ReadOnly Property PARTNOColumn() As Global.System.Data.DataColumn Get Return Me.columnPARTNO End Get End Property _ Public ReadOnly Property DESC1Column() As Global.System.Data.DataColumn Get Return Me.columnDESC1 End Get End Property _ Public ReadOnly Property USAGEColumn() As Global.System.Data.DataColumn Get Return Me.columnUSAGE End Get End Property _ Public ReadOnly Property SPQColumn() As Global.System.Data.DataColumn Get Return Me.columnSPQ End Get End Property _ Public ReadOnly Property OPERATORColumn() As Global.System.Data.DataColumn Get Return Me.columnOPERATOR End Get End Property _ Public ReadOnly Property KITTINGDATEColumn() As Global.System.Data.DataColumn Get Return Me.columnKITTINGDATE End Get End Property _ Public ReadOnly Property QTYColumn() As Global.System.Data.DataColumn Get Return Me.columnQTY End Get End Property _ Public ReadOnly Property FEEDERColumn() As Global.System.Data.DataColumn Get Return Me.columnFEEDER End Get End Property _ Public ReadOnly Property ACCOUNTColumn() As Global.System.Data.DataColumn Get Return Me.columnACCOUNT End Get End Property _ Public ReadOnly Property MACHINEColumn() As Global.System.Data.DataColumn Get Return Me.columnMACHINE End Get End Property _ Public ReadOnly Property MODELColumn() As Global.System.Data.DataColumn Get Return Me.columnMODEL End Get End Property _ Public ReadOnly Property TYPEColumn() As Global.System.Data.DataColumn Get Return Me.columnTYPE End Get End Property _ Public ReadOnly Property LINEColumn() As Global.System.Data.DataColumn Get Return Me.columnLINE End Get End Property _ Public ReadOnly Property EOHColumn() As Global.System.Data.DataColumn Get Return Me.columnEOH End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As KITTINGRow Get Return CType(Me.Rows(index),KITTINGRow) End Get End Property _ Public Event KITTINGRowChanging As KITTINGRowChangeEventHandler _ Public Event KITTINGRowChanged As KITTINGRowChangeEventHandler _ Public Event KITTINGRowDeleting As KITTINGRowChangeEventHandler _ Public Event KITTINGRowDeleted As KITTINGRowChangeEventHandler _ Public Overloads Sub AddKITTINGRow(ByVal row As KITTINGRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddKITTINGRow(ByVal REV As String, ByVal PARTNO As String, ByVal DESC1 As String, ByVal USAGE As Double, ByVal SPQ As Double, ByVal _OPERATOR As String, ByVal KITTINGDATE As Date, ByVal QTY As Double, ByVal FEEDER As String, ByVal ACCOUNT As String, ByVal MACHINE As String, ByVal MODEL As String, ByVal TYPE As String, ByVal LINE As String, ByVal EOH As String) As KITTINGRow Dim rowKITTINGRow As KITTINGRow = CType(Me.NewRow,KITTINGRow) Dim columnValuesArray() As Object = New Object() {REV, PARTNO, DESC1, USAGE, SPQ, _OPERATOR, KITTINGDATE, QTY, FEEDER, ACCOUNT, MACHINE, MODEL, TYPE, LINE, EOH} rowKITTINGRow.ItemArray = columnValuesArray Me.Rows.Add(rowKITTINGRow) Return rowKITTINGRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As KITTINGDataTable = CType(MyBase.Clone,KITTINGDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New KITTINGDataTable() End Function _ Friend Sub InitVars() Me.columnREV = MyBase.Columns("REV") Me.columnPARTNO = MyBase.Columns("PARTNO") Me.columnDESC1 = MyBase.Columns("DESC1") Me.columnUSAGE = MyBase.Columns("USAGE") Me.columnSPQ = MyBase.Columns("SPQ") Me.columnOPERATOR = MyBase.Columns("OPERATOR") Me.columnKITTINGDATE = MyBase.Columns("KITTINGDATE") Me.columnQTY = MyBase.Columns("QTY") Me.columnFEEDER = MyBase.Columns("FEEDER") Me.columnACCOUNT = MyBase.Columns("ACCOUNT") Me.columnMACHINE = MyBase.Columns("MACHINE") Me.columnMODEL = MyBase.Columns("MODEL") Me.columnTYPE = MyBase.Columns("TYPE") Me.columnLINE = MyBase.Columns("LINE") Me.columnEOH = MyBase.Columns("EOH") End Sub _ Private Sub InitClass() Me.columnREV = New Global.System.Data.DataColumn("REV", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnREV) Me.columnPARTNO = New Global.System.Data.DataColumn("PARTNO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPARTNO) Me.columnDESC1 = New Global.System.Data.DataColumn("DESC1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDESC1) Me.columnUSAGE = New Global.System.Data.DataColumn("USAGE", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUSAGE) Me.columnSPQ = New Global.System.Data.DataColumn("SPQ", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSPQ) Me.columnOPERATOR = New Global.System.Data.DataColumn("OPERATOR", GetType(String), Nothing, Global.System.Data.MappingType.Element) Me.columnOPERATOR.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "OPERATORColumn") Me.columnOPERATOR.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "columnOPERATOR") Me.columnOPERATOR.ExtendedProperties.Add("Generator_UserColumnName", "OPERATOR") MyBase.Columns.Add(Me.columnOPERATOR) Me.columnKITTINGDATE = New Global.System.Data.DataColumn("KITTINGDATE", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKITTINGDATE) Me.columnQTY = New Global.System.Data.DataColumn("QTY", GetType(Double), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnQTY) Me.columnFEEDER = New Global.System.Data.DataColumn("FEEDER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFEEDER) Me.columnACCOUNT = New Global.System.Data.DataColumn("ACCOUNT", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnACCOUNT) Me.columnMACHINE = New Global.System.Data.DataColumn("MACHINE", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMACHINE) Me.columnMODEL = New Global.System.Data.DataColumn("MODEL", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMODEL) Me.columnTYPE = New Global.System.Data.DataColumn("TYPE", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTYPE) Me.columnLINE = New Global.System.Data.DataColumn("LINE", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLINE) Me.columnEOH = New Global.System.Data.DataColumn("EOH", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnEOH) Me.columnREV.AllowDBNull = false Me.columnREV.MaxLength = 50 Me.columnPARTNO.AllowDBNull = false Me.columnPARTNO.MaxLength = 50 Me.columnDESC1.AllowDBNull = false Me.columnDESC1.MaxLength = 2147483647 Me.columnOPERATOR.AllowDBNull = false Me.columnOPERATOR.MaxLength = 50 Me.columnKITTINGDATE.AllowDBNull = false Me.columnFEEDER.MaxLength = 50 Me.columnACCOUNT.MaxLength = 50 Me.columnMACHINE.MaxLength = 50 Me.columnMODEL.MaxLength = 50 Me.columnTYPE.MaxLength = 50 Me.columnLINE.MaxLength = 50 Me.columnEOH.MaxLength = 50 End Sub _ Public Function NewKITTINGRow() As KITTINGRow Return CType(Me.NewRow,KITTINGRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New KITTINGRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(KITTINGRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.KITTINGRowChangedEvent) Is Nothing) Then RaiseEvent KITTINGRowChanged(Me, New KITTINGRowChangeEvent(CType(e.Row,KITTINGRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.KITTINGRowChangingEvent) Is Nothing) Then RaiseEvent KITTINGRowChanging(Me, New KITTINGRowChangeEvent(CType(e.Row,KITTINGRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.KITTINGRowDeletedEvent) Is Nothing) Then RaiseEvent KITTINGRowDeleted(Me, New KITTINGRowChangeEvent(CType(e.Row,KITTINGRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.KITTINGRowDeletingEvent) Is Nothing) Then RaiseEvent KITTINGRowDeleting(Me, New KITTINGRowChangeEvent(CType(e.Row,KITTINGRow), e.Action)) End If End Sub _ Public Sub RemoveKITTINGRow(ByVal row As KITTINGRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "KITTINGDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class KMOUNTINGDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnKMTDATE As Global.System.Data.DataColumn Private columnKMTMACHINE As Global.System.Data.DataColumn Private columnKMTREVISION As Global.System.Data.DataColumn Private columnKMTFEEDER As Global.System.Data.DataColumn Private columnKMTPARTNO As Global.System.Data.DataColumn Private columnKMTQTY As Global.System.Data.DataColumn Private columnKMTLOT As Global.System.Data.DataColumn Private columnKMTOPERATOR As Global.System.Data.DataColumn Private columnKMTVERIFY As Global.System.Data.DataColumn Private columnKMT3PL As Global.System.Data.DataColumn Private columnKSEQUENCENO As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "KMOUNTING" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property KMTDATEColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTDATE End Get End Property _ Public ReadOnly Property KMTMACHINEColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTMACHINE End Get End Property _ Public ReadOnly Property KMTREVISIONColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTREVISION End Get End Property _ Public ReadOnly Property KMTFEEDERColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTFEEDER End Get End Property _ Public ReadOnly Property KMTPARTNOColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTPARTNO End Get End Property _ Public ReadOnly Property KMTQTYColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTQTY End Get End Property _ Public ReadOnly Property KMTLOTColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTLOT End Get End Property _ Public ReadOnly Property KMTOPERATORColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTOPERATOR End Get End Property _ Public ReadOnly Property KMTVERIFYColumn() As Global.System.Data.DataColumn Get Return Me.columnKMTVERIFY End Get End Property _ Public ReadOnly Property KMT3PLColumn() As Global.System.Data.DataColumn Get Return Me.columnKMT3PL End Get End Property _ Public ReadOnly Property KSEQUENCENOColumn() As Global.System.Data.DataColumn Get Return Me.columnKSEQUENCENO End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As KMOUNTINGRow Get Return CType(Me.Rows(index),KMOUNTINGRow) End Get End Property _ Public Event KMOUNTINGRowChanging As KMOUNTINGRowChangeEventHandler _ Public Event KMOUNTINGRowChanged As KMOUNTINGRowChangeEventHandler _ Public Event KMOUNTINGRowDeleting As KMOUNTINGRowChangeEventHandler _ Public Event KMOUNTINGRowDeleted As KMOUNTINGRowChangeEventHandler _ Public Overloads Sub AddKMOUNTINGRow(ByVal row As KMOUNTINGRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddKMOUNTINGRow(ByVal KMTDATE As Date, ByVal KMTMACHINE As String, ByVal KMTREVISION As String, ByVal KMTFEEDER As String, ByVal KMTPARTNO As String, ByVal KMTQTY As Integer, ByVal KMTLOT As String, ByVal KMTOPERATOR As String, ByVal KMTVERIFY As Integer, ByVal KMT3PL As String, ByVal KSEQUENCENO As String) As KMOUNTINGRow Dim rowKMOUNTINGRow As KMOUNTINGRow = CType(Me.NewRow,KMOUNTINGRow) Dim columnValuesArray() As Object = New Object() {KMTDATE, KMTMACHINE, KMTREVISION, KMTFEEDER, KMTPARTNO, KMTQTY, KMTLOT, KMTOPERATOR, KMTVERIFY, KMT3PL, KSEQUENCENO} rowKMOUNTINGRow.ItemArray = columnValuesArray Me.Rows.Add(rowKMOUNTINGRow) Return rowKMOUNTINGRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As KMOUNTINGDataTable = CType(MyBase.Clone,KMOUNTINGDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New KMOUNTINGDataTable() End Function _ Friend Sub InitVars() Me.columnKMTDATE = MyBase.Columns("KMTDATE") Me.columnKMTMACHINE = MyBase.Columns("KMTMACHINE") Me.columnKMTREVISION = MyBase.Columns("KMTREVISION") Me.columnKMTFEEDER = MyBase.Columns("KMTFEEDER") Me.columnKMTPARTNO = MyBase.Columns("KMTPARTNO") Me.columnKMTQTY = MyBase.Columns("KMTQTY") Me.columnKMTLOT = MyBase.Columns("KMTLOT") Me.columnKMTOPERATOR = MyBase.Columns("KMTOPERATOR") Me.columnKMTVERIFY = MyBase.Columns("KMTVERIFY") Me.columnKMT3PL = MyBase.Columns("KMT3PL") Me.columnKSEQUENCENO = MyBase.Columns("KSEQUENCENO") End Sub _ Private Sub InitClass() Me.columnKMTDATE = New Global.System.Data.DataColumn("KMTDATE", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTDATE) Me.columnKMTMACHINE = New Global.System.Data.DataColumn("KMTMACHINE", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTMACHINE) Me.columnKMTREVISION = New Global.System.Data.DataColumn("KMTREVISION", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTREVISION) Me.columnKMTFEEDER = New Global.System.Data.DataColumn("KMTFEEDER", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTFEEDER) Me.columnKMTPARTNO = New Global.System.Data.DataColumn("KMTPARTNO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTPARTNO) Me.columnKMTQTY = New Global.System.Data.DataColumn("KMTQTY", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTQTY) Me.columnKMTLOT = New Global.System.Data.DataColumn("KMTLOT", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTLOT) Me.columnKMTOPERATOR = New Global.System.Data.DataColumn("KMTOPERATOR", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTOPERATOR) Me.columnKMTVERIFY = New Global.System.Data.DataColumn("KMTVERIFY", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMTVERIFY) Me.columnKMT3PL = New Global.System.Data.DataColumn("KMT3PL", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKMT3PL) Me.columnKSEQUENCENO = New Global.System.Data.DataColumn("KSEQUENCENO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSEQUENCENO) Me.columnKMTMACHINE.MaxLength = 2147483647 Me.columnKMTREVISION.MaxLength = 2147483647 Me.columnKMTFEEDER.MaxLength = 2147483647 Me.columnKMTPARTNO.MaxLength = 2147483647 Me.columnKMTLOT.MaxLength = 2147483647 Me.columnKMTOPERATOR.MaxLength = 2147483647 Me.columnKMT3PL.MaxLength = 2147483647 Me.columnKSEQUENCENO.MaxLength = 50 End Sub _ Public Function NewKMOUNTINGRow() As KMOUNTINGRow Return CType(Me.NewRow,KMOUNTINGRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New KMOUNTINGRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(KMOUNTINGRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.KMOUNTINGRowChangedEvent) Is Nothing) Then RaiseEvent KMOUNTINGRowChanged(Me, New KMOUNTINGRowChangeEvent(CType(e.Row,KMOUNTINGRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.KMOUNTINGRowChangingEvent) Is Nothing) Then RaiseEvent KMOUNTINGRowChanging(Me, New KMOUNTINGRowChangeEvent(CType(e.Row,KMOUNTINGRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.KMOUNTINGRowDeletedEvent) Is Nothing) Then RaiseEvent KMOUNTINGRowDeleted(Me, New KMOUNTINGRowChangeEvent(CType(e.Row,KMOUNTINGRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.KMOUNTINGRowDeletingEvent) Is Nothing) Then RaiseEvent KMOUNTINGRowDeleting(Me, New KMOUNTINGRowChangeEvent(CType(e.Row,KMOUNTINGRow), e.Action)) End If End Sub _ Public Sub RemoveKMOUNTINGRow(ByVal row As KMOUNTINGRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "KMOUNTINGDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class KSEQUENCE_DETAILDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnKSQMODULE As Global.System.Data.DataColumn Private columnKSQFEEDERNO As Global.System.Data.DataColumn Private columnKSQFEEDERTYP As Global.System.Data.DataColumn Private columnKSQPARTNO As Global.System.Data.DataColumn Private columnKSQTOPSDLOC As Global.System.Data.DataColumn Private columnKSQFSBSQTY As Global.System.Data.DataColumn Private columnKSQDESC1 As Global.System.Data.DataColumn Private columnKSQDESC2 As Global.System.Data.DataColumn Private columnKSQTOPMARK As Global.System.Data.DataColumn Private columnKSQREMARKS As Global.System.Data.DataColumn Private columnKSEQUENCENO As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "KSEQUENCE_DETAIL" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property KSQMODULEColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQMODULE End Get End Property _ Public ReadOnly Property KSQFEEDERNOColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQFEEDERNO End Get End Property _ Public ReadOnly Property KSQFEEDERTYPColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQFEEDERTYP End Get End Property _ Public ReadOnly Property KSQPARTNOColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQPARTNO End Get End Property _ Public ReadOnly Property KSQTOPSDLOCColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQTOPSDLOC End Get End Property _ Public ReadOnly Property KSQFSBSQTYColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQFSBSQTY End Get End Property _ Public ReadOnly Property KSQDESC1Column() As Global.System.Data.DataColumn Get Return Me.columnKSQDESC1 End Get End Property _ Public ReadOnly Property KSQDESC2Column() As Global.System.Data.DataColumn Get Return Me.columnKSQDESC2 End Get End Property _ Public ReadOnly Property KSQTOPMARKColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQTOPMARK End Get End Property _ Public ReadOnly Property KSQREMARKSColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQREMARKS End Get End Property _ Public ReadOnly Property KSEQUENCENOColumn() As Global.System.Data.DataColumn Get Return Me.columnKSEQUENCENO End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As KSEQUENCE_DETAILRow Get Return CType(Me.Rows(index),KSEQUENCE_DETAILRow) End Get End Property _ Public Event KSEQUENCE_DETAILRowChanging As KSEQUENCE_DETAILRowChangeEventHandler _ Public Event KSEQUENCE_DETAILRowChanged As KSEQUENCE_DETAILRowChangeEventHandler _ Public Event KSEQUENCE_DETAILRowDeleting As KSEQUENCE_DETAILRowChangeEventHandler _ Public Event KSEQUENCE_DETAILRowDeleted As KSEQUENCE_DETAILRowChangeEventHandler _ Public Overloads Sub AddKSEQUENCE_DETAILRow(ByVal row As KSEQUENCE_DETAILRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddKSEQUENCE_DETAILRow(ByVal KSQMODULE As String, ByVal KSQFEEDERNO As String, ByVal KSQFEEDERTYP As String, ByVal KSQPARTNO As String, ByVal KSQTOPSDLOC As String, ByVal KSQFSBSQTY As Integer, ByVal KSQDESC1 As String, ByVal KSQDESC2 As String, ByVal KSQTOPMARK As String, ByVal KSQREMARKS As String, ByVal KSEQUENCENO As String) As KSEQUENCE_DETAILRow Dim rowKSEQUENCE_DETAILRow As KSEQUENCE_DETAILRow = CType(Me.NewRow,KSEQUENCE_DETAILRow) Dim columnValuesArray() As Object = New Object() {KSQMODULE, KSQFEEDERNO, KSQFEEDERTYP, KSQPARTNO, KSQTOPSDLOC, KSQFSBSQTY, KSQDESC1, KSQDESC2, KSQTOPMARK, KSQREMARKS, KSEQUENCENO} rowKSEQUENCE_DETAILRow.ItemArray = columnValuesArray Me.Rows.Add(rowKSEQUENCE_DETAILRow) Return rowKSEQUENCE_DETAILRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As KSEQUENCE_DETAILDataTable = CType(MyBase.Clone,KSEQUENCE_DETAILDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New KSEQUENCE_DETAILDataTable() End Function _ Friend Sub InitVars() Me.columnKSQMODULE = MyBase.Columns("KSQMODULE") Me.columnKSQFEEDERNO = MyBase.Columns("KSQFEEDERNO") Me.columnKSQFEEDERTYP = MyBase.Columns("KSQFEEDERTYP") Me.columnKSQPARTNO = MyBase.Columns("KSQPARTNO") Me.columnKSQTOPSDLOC = MyBase.Columns("KSQTOPSDLOC") Me.columnKSQFSBSQTY = MyBase.Columns("KSQFSBSQTY") Me.columnKSQDESC1 = MyBase.Columns("KSQDESC1") Me.columnKSQDESC2 = MyBase.Columns("KSQDESC2") Me.columnKSQTOPMARK = MyBase.Columns("KSQTOPMARK") Me.columnKSQREMARKS = MyBase.Columns("KSQREMARKS") Me.columnKSEQUENCENO = MyBase.Columns("KSEQUENCENO") End Sub _ Private Sub InitClass() Me.columnKSQMODULE = New Global.System.Data.DataColumn("KSQMODULE", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQMODULE) Me.columnKSQFEEDERNO = New Global.System.Data.DataColumn("KSQFEEDERNO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQFEEDERNO) Me.columnKSQFEEDERTYP = New Global.System.Data.DataColumn("KSQFEEDERTYP", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQFEEDERTYP) Me.columnKSQPARTNO = New Global.System.Data.DataColumn("KSQPARTNO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQPARTNO) Me.columnKSQTOPSDLOC = New Global.System.Data.DataColumn("KSQTOPSDLOC", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQTOPSDLOC) Me.columnKSQFSBSQTY = New Global.System.Data.DataColumn("KSQFSBSQTY", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQFSBSQTY) Me.columnKSQDESC1 = New Global.System.Data.DataColumn("KSQDESC1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQDESC1) Me.columnKSQDESC2 = New Global.System.Data.DataColumn("KSQDESC2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQDESC2) Me.columnKSQTOPMARK = New Global.System.Data.DataColumn("KSQTOPMARK", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQTOPMARK) Me.columnKSQREMARKS = New Global.System.Data.DataColumn("KSQREMARKS", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQREMARKS) Me.columnKSEQUENCENO = New Global.System.Data.DataColumn("KSEQUENCENO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSEQUENCENO) Me.columnKSQMODULE.MaxLength = 2147483647 Me.columnKSQFEEDERNO.MaxLength = 2147483647 Me.columnKSQFEEDERTYP.MaxLength = 2147483647 Me.columnKSQPARTNO.MaxLength = 2147483647 Me.columnKSQTOPSDLOC.MaxLength = 2147483647 Me.columnKSQDESC1.MaxLength = 2147483647 Me.columnKSQDESC2.MaxLength = 2147483647 Me.columnKSQTOPMARK.MaxLength = 2147483647 Me.columnKSQREMARKS.MaxLength = 2147483647 Me.columnKSEQUENCENO.MaxLength = 2147483647 End Sub _ Public Function NewKSEQUENCE_DETAILRow() As KSEQUENCE_DETAILRow Return CType(Me.NewRow,KSEQUENCE_DETAILRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New KSEQUENCE_DETAILRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(KSEQUENCE_DETAILRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.KSEQUENCE_DETAILRowChangedEvent) Is Nothing) Then RaiseEvent KSEQUENCE_DETAILRowChanged(Me, New KSEQUENCE_DETAILRowChangeEvent(CType(e.Row,KSEQUENCE_DETAILRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.KSEQUENCE_DETAILRowChangingEvent) Is Nothing) Then RaiseEvent KSEQUENCE_DETAILRowChanging(Me, New KSEQUENCE_DETAILRowChangeEvent(CType(e.Row,KSEQUENCE_DETAILRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.KSEQUENCE_DETAILRowDeletedEvent) Is Nothing) Then RaiseEvent KSEQUENCE_DETAILRowDeleted(Me, New KSEQUENCE_DETAILRowChangeEvent(CType(e.Row,KSEQUENCE_DETAILRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.KSEQUENCE_DETAILRowDeletingEvent) Is Nothing) Then RaiseEvent KSEQUENCE_DETAILRowDeleting(Me, New KSEQUENCE_DETAILRowChangeEvent(CType(e.Row,KSEQUENCE_DETAILRow), e.Action)) End If End Sub _ Public Sub RemoveKSEQUENCE_DETAILRow(ByVal row As KSEQUENCE_DETAILRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "KSEQUENCE_DETAILDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class KSEQUENCE_HEADERDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnKSACCOUNT As Global.System.Data.DataColumn Private columnKSQREVISION As Global.System.Data.DataColumn Private columnKSQMACHINE As Global.System.Data.DataColumn Private columnKSQPCBSIDE As Global.System.Data.DataColumn Private columnKSQPREPBY As Global.System.Data.DataColumn Private columnKSQCHECKBY As Global.System.Data.DataColumn Private columnKSQCHKDATE As Global.System.Data.DataColumn Private columnKSQMODEL As Global.System.Data.DataColumn Private columnKUPDTTIME As Global.System.Data.DataColumn Private columnKSQSTATUS As Global.System.Data.DataColumn Private columnKSQLINE As Global.System.Data.DataColumn Private columnKSEQUENCENO As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "KSEQUENCE_HEADER" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property KSACCOUNTColumn() As Global.System.Data.DataColumn Get Return Me.columnKSACCOUNT End Get End Property _ Public ReadOnly Property KSQREVISIONColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQREVISION End Get End Property _ Public ReadOnly Property KSQMACHINEColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQMACHINE End Get End Property _ Public ReadOnly Property KSQPCBSIDEColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQPCBSIDE End Get End Property _ Public ReadOnly Property KSQPREPBYColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQPREPBY End Get End Property _ Public ReadOnly Property KSQCHECKBYColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQCHECKBY End Get End Property _ Public ReadOnly Property KSQCHKDATEColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQCHKDATE End Get End Property _ Public ReadOnly Property KSQMODELColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQMODEL End Get End Property _ Public ReadOnly Property KUPDTTIMEColumn() As Global.System.Data.DataColumn Get Return Me.columnKUPDTTIME End Get End Property _ Public ReadOnly Property KSQSTATUSColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQSTATUS End Get End Property _ Public ReadOnly Property KSQLINEColumn() As Global.System.Data.DataColumn Get Return Me.columnKSQLINE End Get End Property _ Public ReadOnly Property KSEQUENCENOColumn() As Global.System.Data.DataColumn Get Return Me.columnKSEQUENCENO End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As KSEQUENCE_HEADERRow Get Return CType(Me.Rows(index),KSEQUENCE_HEADERRow) End Get End Property _ Public Event KSEQUENCE_HEADERRowChanging As KSEQUENCE_HEADERRowChangeEventHandler _ Public Event KSEQUENCE_HEADERRowChanged As KSEQUENCE_HEADERRowChangeEventHandler _ Public Event KSEQUENCE_HEADERRowDeleting As KSEQUENCE_HEADERRowChangeEventHandler _ Public Event KSEQUENCE_HEADERRowDeleted As KSEQUENCE_HEADERRowChangeEventHandler _ Public Overloads Sub AddKSEQUENCE_HEADERRow(ByVal row As KSEQUENCE_HEADERRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddKSEQUENCE_HEADERRow(ByVal KSACCOUNT As String, ByVal KSQREVISION As String, ByVal KSQMACHINE As String, ByVal KSQPCBSIDE As String, ByVal KSQPREPBY As String, ByVal KSQCHECKBY As String, ByVal KSQCHKDATE As Date, ByVal KSQMODEL As String, ByVal KUPDTTIME As Date, ByVal KSQSTATUS As Integer, ByVal KSQLINE As Integer, ByVal KSEQUENCENO As String) As KSEQUENCE_HEADERRow Dim rowKSEQUENCE_HEADERRow As KSEQUENCE_HEADERRow = CType(Me.NewRow,KSEQUENCE_HEADERRow) Dim columnValuesArray() As Object = New Object() {KSACCOUNT, KSQREVISION, KSQMACHINE, KSQPCBSIDE, KSQPREPBY, KSQCHECKBY, KSQCHKDATE, KSQMODEL, KUPDTTIME, KSQSTATUS, KSQLINE, KSEQUENCENO} rowKSEQUENCE_HEADERRow.ItemArray = columnValuesArray Me.Rows.Add(rowKSEQUENCE_HEADERRow) Return rowKSEQUENCE_HEADERRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As KSEQUENCE_HEADERDataTable = CType(MyBase.Clone,KSEQUENCE_HEADERDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New KSEQUENCE_HEADERDataTable() End Function _ Friend Sub InitVars() Me.columnKSACCOUNT = MyBase.Columns("KSACCOUNT") Me.columnKSQREVISION = MyBase.Columns("KSQREVISION") Me.columnKSQMACHINE = MyBase.Columns("KSQMACHINE") Me.columnKSQPCBSIDE = MyBase.Columns("KSQPCBSIDE") Me.columnKSQPREPBY = MyBase.Columns("KSQPREPBY") Me.columnKSQCHECKBY = MyBase.Columns("KSQCHECKBY") Me.columnKSQCHKDATE = MyBase.Columns("KSQCHKDATE") Me.columnKSQMODEL = MyBase.Columns("KSQMODEL") Me.columnKUPDTTIME = MyBase.Columns("KUPDTTIME") Me.columnKSQSTATUS = MyBase.Columns("KSQSTATUS") Me.columnKSQLINE = MyBase.Columns("KSQLINE") Me.columnKSEQUENCENO = MyBase.Columns("KSEQUENCENO") End Sub _ Private Sub InitClass() Me.columnKSACCOUNT = New Global.System.Data.DataColumn("KSACCOUNT", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSACCOUNT) Me.columnKSQREVISION = New Global.System.Data.DataColumn("KSQREVISION", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQREVISION) Me.columnKSQMACHINE = New Global.System.Data.DataColumn("KSQMACHINE", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQMACHINE) Me.columnKSQPCBSIDE = New Global.System.Data.DataColumn("KSQPCBSIDE", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQPCBSIDE) Me.columnKSQPREPBY = New Global.System.Data.DataColumn("KSQPREPBY", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQPREPBY) Me.columnKSQCHECKBY = New Global.System.Data.DataColumn("KSQCHECKBY", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQCHECKBY) Me.columnKSQCHKDATE = New Global.System.Data.DataColumn("KSQCHKDATE", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQCHKDATE) Me.columnKSQMODEL = New Global.System.Data.DataColumn("KSQMODEL", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQMODEL) Me.columnKUPDTTIME = New Global.System.Data.DataColumn("KUPDTTIME", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKUPDTTIME) Me.columnKSQSTATUS = New Global.System.Data.DataColumn("KSQSTATUS", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQSTATUS) Me.columnKSQLINE = New Global.System.Data.DataColumn("KSQLINE", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSQLINE) Me.columnKSEQUENCENO = New Global.System.Data.DataColumn("KSEQUENCENO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnKSEQUENCENO) Me.columnKSACCOUNT.MaxLength = 2147483647 Me.columnKSQREVISION.MaxLength = 2147483647 Me.columnKSQMACHINE.MaxLength = 2147483647 Me.columnKSQPCBSIDE.MaxLength = 2147483647 Me.columnKSQPREPBY.MaxLength = 2147483647 Me.columnKSQCHECKBY.MaxLength = 2147483647 Me.columnKSQMODEL.MaxLength = 50 Me.columnKSEQUENCENO.MaxLength = 2147483647 End Sub _ Public Function NewKSEQUENCE_HEADERRow() As KSEQUENCE_HEADERRow Return CType(Me.NewRow,KSEQUENCE_HEADERRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New KSEQUENCE_HEADERRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(KSEQUENCE_HEADERRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.KSEQUENCE_HEADERRowChangedEvent) Is Nothing) Then RaiseEvent KSEQUENCE_HEADERRowChanged(Me, New KSEQUENCE_HEADERRowChangeEvent(CType(e.Row,KSEQUENCE_HEADERRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.KSEQUENCE_HEADERRowChangingEvent) Is Nothing) Then RaiseEvent KSEQUENCE_HEADERRowChanging(Me, New KSEQUENCE_HEADERRowChangeEvent(CType(e.Row,KSEQUENCE_HEADERRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.KSEQUENCE_HEADERRowDeletedEvent) Is Nothing) Then RaiseEvent KSEQUENCE_HEADERRowDeleted(Me, New KSEQUENCE_HEADERRowChangeEvent(CType(e.Row,KSEQUENCE_HEADERRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.KSEQUENCE_HEADERRowDeletingEvent) Is Nothing) Then RaiseEvent KSEQUENCE_HEADERRowDeleting(Me, New KSEQUENCE_HEADERRowChangeEvent(CType(e.Row,KSEQUENCE_HEADERRow), e.Action)) End If End Sub _ Public Sub RemoveKSEQUENCE_HEADERRow(ByVal row As KSEQUENCE_HEADERRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "KSEQUENCE_HEADERDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class KSETTINGSDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnset_id As Global.System.Data.DataColumn Private columnline As Global.System.Data.DataColumn Private columnksequence As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "KSETTINGS" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property set_idColumn() As Global.System.Data.DataColumn Get Return Me.columnset_id End Get End Property _ Public ReadOnly Property lineColumn() As Global.System.Data.DataColumn Get Return Me.columnline End Get End Property _ Public ReadOnly Property ksequenceColumn() As Global.System.Data.DataColumn Get Return Me.columnksequence End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As KSETTINGSRow Get Return CType(Me.Rows(index),KSETTINGSRow) End Get End Property _ Public Event KSETTINGSRowChanging As KSETTINGSRowChangeEventHandler _ Public Event KSETTINGSRowChanged As KSETTINGSRowChangeEventHandler _ Public Event KSETTINGSRowDeleting As KSETTINGSRowChangeEventHandler _ Public Event KSETTINGSRowDeleted As KSETTINGSRowChangeEventHandler _ Public Overloads Sub AddKSETTINGSRow(ByVal row As KSETTINGSRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddKSETTINGSRow(ByVal line As Integer, ByVal ksequence As String) As KSETTINGSRow Dim rowKSETTINGSRow As KSETTINGSRow = CType(Me.NewRow,KSETTINGSRow) Dim columnValuesArray() As Object = New Object() {Nothing, line, ksequence} rowKSETTINGSRow.ItemArray = columnValuesArray Me.Rows.Add(rowKSETTINGSRow) Return rowKSETTINGSRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As KSETTINGSDataTable = CType(MyBase.Clone,KSETTINGSDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New KSETTINGSDataTable() End Function _ Friend Sub InitVars() Me.columnset_id = MyBase.Columns("set_id") Me.columnline = MyBase.Columns("line") Me.columnksequence = MyBase.Columns("ksequence") End Sub _ Private Sub InitClass() Me.columnset_id = New Global.System.Data.DataColumn("set_id", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnset_id) Me.columnline = New Global.System.Data.DataColumn("line", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnline) Me.columnksequence = New Global.System.Data.DataColumn("ksequence", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnksequence) Me.columnset_id.AutoIncrement = true Me.columnset_id.AutoIncrementSeed = -1 Me.columnset_id.AutoIncrementStep = -1 Me.columnset_id.AllowDBNull = false Me.columnset_id.ReadOnly = true Me.columnline.AllowDBNull = false Me.columnksequence.AllowDBNull = false Me.columnksequence.MaxLength = 2147483647 End Sub _ Public Function NewKSETTINGSRow() As KSETTINGSRow Return CType(Me.NewRow,KSETTINGSRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New KSETTINGSRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(KSETTINGSRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.KSETTINGSRowChangedEvent) Is Nothing) Then RaiseEvent KSETTINGSRowChanged(Me, New KSETTINGSRowChangeEvent(CType(e.Row,KSETTINGSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.KSETTINGSRowChangingEvent) Is Nothing) Then RaiseEvent KSETTINGSRowChanging(Me, New KSETTINGSRowChangeEvent(CType(e.Row,KSETTINGSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.KSETTINGSRowDeletedEvent) Is Nothing) Then RaiseEvent KSETTINGSRowDeleted(Me, New KSETTINGSRowChangeEvent(CType(e.Row,KSETTINGSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.KSETTINGSRowDeletingEvent) Is Nothing) Then RaiseEvent KSETTINGSRowDeleting(Me, New KSETTINGSRowChangeEvent(CType(e.Row,KSETTINGSRow), e.Action)) End If End Sub _ Public Sub RemoveKSETTINGSRow(ByVal row As KSETTINGSRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "KSETTINGSDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class LabelDefDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlabelFormat1 As Global.System.Data.DataColumn Private columnlabelFormat2 As Global.System.Data.DataColumn Private columnbartenderFile As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "LabelDef" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property labelFormat1Column() As Global.System.Data.DataColumn Get Return Me.columnlabelFormat1 End Get End Property _ Public ReadOnly Property labelFormat2Column() As Global.System.Data.DataColumn Get Return Me.columnlabelFormat2 End Get End Property _ Public ReadOnly Property bartenderFileColumn() As Global.System.Data.DataColumn Get Return Me.columnbartenderFile End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As LabelDefRow Get Return CType(Me.Rows(index),LabelDefRow) End Get End Property _ Public Event LabelDefRowChanging As LabelDefRowChangeEventHandler _ Public Event LabelDefRowChanged As LabelDefRowChangeEventHandler _ Public Event LabelDefRowDeleting As LabelDefRowChangeEventHandler _ Public Event LabelDefRowDeleted As LabelDefRowChangeEventHandler _ Public Overloads Sub AddLabelDefRow(ByVal row As LabelDefRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddLabelDefRow(ByVal labelFormat1 As String, ByVal labelFormat2 As String, ByVal bartenderFile As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As LabelDefRow Dim rowLabelDefRow As LabelDefRow = CType(Me.NewRow,LabelDefRow) Dim columnValuesArray() As Object = New Object() {labelFormat1, labelFormat2, bartenderFile, lastupdate, lastupdatedby} rowLabelDefRow.ItemArray = columnValuesArray Me.Rows.Add(rowLabelDefRow) Return rowLabelDefRow End Function _ Public Function FindBylabelFormat1labelFormat2(ByVal labelFormat1 As String, ByVal labelFormat2 As String) As LabelDefRow Return CType(Me.Rows.Find(New Object() {labelFormat1, labelFormat2}),LabelDefRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As LabelDefDataTable = CType(MyBase.Clone,LabelDefDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New LabelDefDataTable() End Function _ Friend Sub InitVars() Me.columnlabelFormat1 = MyBase.Columns("labelFormat1") Me.columnlabelFormat2 = MyBase.Columns("labelFormat2") Me.columnbartenderFile = MyBase.Columns("bartenderFile") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlabelFormat1 = New Global.System.Data.DataColumn("labelFormat1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlabelFormat1) Me.columnlabelFormat2 = New Global.System.Data.DataColumn("labelFormat2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlabelFormat2) Me.columnbartenderFile = New Global.System.Data.DataColumn("bartenderFile", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbartenderFile) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlabelFormat1, Me.columnlabelFormat2}, true)) Me.columnlabelFormat1.AllowDBNull = false Me.columnlabelFormat1.MaxLength = 50 Me.columnlabelFormat2.AllowDBNull = false Me.columnlabelFormat2.MaxLength = 50 Me.columnbartenderFile.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewLabelDefRow() As LabelDefRow Return CType(Me.NewRow,LabelDefRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New LabelDefRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(LabelDefRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.LabelDefRowChangedEvent) Is Nothing) Then RaiseEvent LabelDefRowChanged(Me, New LabelDefRowChangeEvent(CType(e.Row,LabelDefRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.LabelDefRowChangingEvent) Is Nothing) Then RaiseEvent LabelDefRowChanging(Me, New LabelDefRowChangeEvent(CType(e.Row,LabelDefRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.LabelDefRowDeletedEvent) Is Nothing) Then RaiseEvent LabelDefRowDeleted(Me, New LabelDefRowChangeEvent(CType(e.Row,LabelDefRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.LabelDefRowDeletingEvent) Is Nothing) Then RaiseEvent LabelDefRowDeleting(Me, New LabelDefRowChangeEvent(CType(e.Row,LabelDefRow), e.Action)) End If End Sub _ Public Sub RemoveLabelDefRow(ByVal row As LabelDefRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "LabelDefDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class LabelDefHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnlabelFormat1 As Global.System.Data.DataColumn Private columnlabelFormat2 As Global.System.Data.DataColumn Private columnbartenderFile As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "LabelDefHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property labelFormat1Column() As Global.System.Data.DataColumn Get Return Me.columnlabelFormat1 End Get End Property _ Public ReadOnly Property labelFormat2Column() As Global.System.Data.DataColumn Get Return Me.columnlabelFormat2 End Get End Property _ Public ReadOnly Property bartenderFileColumn() As Global.System.Data.DataColumn Get Return Me.columnbartenderFile End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As LabelDefHistRow Get Return CType(Me.Rows(index),LabelDefHistRow) End Get End Property _ Public Event LabelDefHistRowChanging As LabelDefHistRowChangeEventHandler _ Public Event LabelDefHistRowChanged As LabelDefHistRowChangeEventHandler _ Public Event LabelDefHistRowDeleting As LabelDefHistRowChangeEventHandler _ Public Event LabelDefHistRowDeleted As LabelDefHistRowChangeEventHandler _ Public Overloads Sub AddLabelDefHistRow(ByVal row As LabelDefHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddLabelDefHistRow(ByVal labelFormat1 As String, ByVal labelFormat2 As String, ByVal bartenderFile As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As LabelDefHistRow Dim rowLabelDefHistRow As LabelDefHistRow = CType(Me.NewRow,LabelDefHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, labelFormat1, labelFormat2, bartenderFile, status, lastupdate, lastupdatedby} rowLabelDefHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowLabelDefHistRow) Return rowLabelDefHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As LabelDefHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),LabelDefHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As LabelDefHistDataTable = CType(MyBase.Clone,LabelDefHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New LabelDefHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnlabelFormat1 = MyBase.Columns("labelFormat1") Me.columnlabelFormat2 = MyBase.Columns("labelFormat2") Me.columnbartenderFile = MyBase.Columns("bartenderFile") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnlabelFormat1 = New Global.System.Data.DataColumn("labelFormat1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlabelFormat1) Me.columnlabelFormat2 = New Global.System.Data.DataColumn("labelFormat2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlabelFormat2) Me.columnbartenderFile = New Global.System.Data.DataColumn("bartenderFile", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbartenderFile) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnlabelFormat1.MaxLength = 50 Me.columnlabelFormat2.MaxLength = 50 Me.columnbartenderFile.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewLabelDefHistRow() As LabelDefHistRow Return CType(Me.NewRow,LabelDefHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New LabelDefHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(LabelDefHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.LabelDefHistRowChangedEvent) Is Nothing) Then RaiseEvent LabelDefHistRowChanged(Me, New LabelDefHistRowChangeEvent(CType(e.Row,LabelDefHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.LabelDefHistRowChangingEvent) Is Nothing) Then RaiseEvent LabelDefHistRowChanging(Me, New LabelDefHistRowChangeEvent(CType(e.Row,LabelDefHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.LabelDefHistRowDeletedEvent) Is Nothing) Then RaiseEvent LabelDefHistRowDeleted(Me, New LabelDefHistRowChangeEvent(CType(e.Row,LabelDefHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.LabelDefHistRowDeletingEvent) Is Nothing) Then RaiseEvent LabelDefHistRowDeleting(Me, New LabelDefHistRowChangeEvent(CType(e.Row,LabelDefHistRow), e.Action)) End If End Sub _ Public Sub RemoveLabelDefHistRow(ByVal row As LabelDefHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "LabelDefHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_actionDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columntrackingno As Global.System.Data.DataColumn Private columnreference As Global.System.Data.DataColumn Private columnrefType As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnreason As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_action" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property trackingnoColumn() As Global.System.Data.DataColumn Get Return Me.columntrackingno End Get End Property _ Public ReadOnly Property referenceColumn() As Global.System.Data.DataColumn Get Return Me.columnreference End Get End Property _ Public ReadOnly Property refTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnrefType End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property reasonColumn() As Global.System.Data.DataColumn Get Return Me.columnreason End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_actionRow Get Return CType(Me.Rows(index),log_actionRow) End Get End Property _ Public Event log_actionRowChanging As log_actionRowChangeEventHandler _ Public Event log_actionRowChanged As log_actionRowChangeEventHandler _ Public Event log_actionRowDeleting As log_actionRowChangeEventHandler _ Public Event log_actionRowDeleted As log_actionRowChangeEventHandler _ Public Overloads Sub Addlog_actionRow(ByVal row As log_actionRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_actionRow(ByVal trackingno As String, ByVal reference As String, ByVal refType As String, ByVal serialno As String, ByVal reason As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_actionRow Dim rowlog_actionRow As log_actionRow = CType(Me.NewRow,log_actionRow) Dim columnValuesArray() As Object = New Object() {trackingno, reference, refType, serialno, reason, lastupdate, lastupdatedby} rowlog_actionRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_actionRow) Return rowlog_actionRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_actionDataTable = CType(MyBase.Clone,log_actionDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_actionDataTable() End Function _ Friend Sub InitVars() Me.columntrackingno = MyBase.Columns("trackingno") Me.columnreference = MyBase.Columns("reference") Me.columnrefType = MyBase.Columns("refType") Me.columnserialno = MyBase.Columns("serialno") Me.columnreason = MyBase.Columns("reason") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columntrackingno = New Global.System.Data.DataColumn("trackingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntrackingno) Me.columnreference = New Global.System.Data.DataColumn("reference", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnreference) Me.columnrefType = New Global.System.Data.DataColumn("refType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrefType) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnreason = New Global.System.Data.DataColumn("reason", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnreason) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columntrackingno.MaxLength = 11 Me.columnreference.MaxLength = 100 Me.columnrefType.MaxLength = 100 Me.columnserialno.MaxLength = 50 Me.columnreason.MaxLength = 250 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_actionRow() As log_actionRow Return CType(Me.NewRow,log_actionRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_actionRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_actionRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_actionRowChangedEvent) Is Nothing) Then RaiseEvent log_actionRowChanged(Me, New log_actionRowChangeEvent(CType(e.Row,log_actionRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_actionRowChangingEvent) Is Nothing) Then RaiseEvent log_actionRowChanging(Me, New log_actionRowChangeEvent(CType(e.Row,log_actionRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_actionRowDeletedEvent) Is Nothing) Then RaiseEvent log_actionRowDeleted(Me, New log_actionRowChangeEvent(CType(e.Row,log_actionRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_actionRowDeletingEvent) Is Nothing) Then RaiseEvent log_actionRowDeleting(Me, New log_actionRowChangeEvent(CType(e.Row,log_actionRow), e.Action)) End If End Sub _ Public Sub Removelog_actionRow(ByVal row As log_actionRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_actionDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_alvarion_serialDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnbatchno As Global.System.Data.DataColumn Private columnserialStart As Global.System.Data.DataColumn Private columnserialEnd As Global.System.Data.DataColumn Private columnserialStartHex As Global.System.Data.DataColumn Private columnserialEndHex As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnrevision As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columngenerated As Global.System.Data.DataColumn Private columngeneratedby As Global.System.Data.DataColumn Private columnfamily As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_alvarion_serial" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property batchnoColumn() As Global.System.Data.DataColumn Get Return Me.columnbatchno End Get End Property _ Public ReadOnly Property serialStartColumn() As Global.System.Data.DataColumn Get Return Me.columnserialStart End Get End Property _ Public ReadOnly Property serialEndColumn() As Global.System.Data.DataColumn Get Return Me.columnserialEnd End Get End Property _ Public ReadOnly Property serialStartHexColumn() As Global.System.Data.DataColumn Get Return Me.columnserialStartHex End Get End Property _ Public ReadOnly Property serialEndHexColumn() As Global.System.Data.DataColumn Get Return Me.columnserialEndHex End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property revisionColumn() As Global.System.Data.DataColumn Get Return Me.columnrevision End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property generatedColumn() As Global.System.Data.DataColumn Get Return Me.columngenerated End Get End Property _ Public ReadOnly Property generatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columngeneratedby End Get End Property _ Public ReadOnly Property familyColumn() As Global.System.Data.DataColumn Get Return Me.columnfamily End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_alvarion_serialRow Get Return CType(Me.Rows(index),log_alvarion_serialRow) End Get End Property _ Public Event log_alvarion_serialRowChanging As log_alvarion_serialRowChangeEventHandler _ Public Event log_alvarion_serialRowChanged As log_alvarion_serialRowChangeEventHandler _ Public Event log_alvarion_serialRowDeleting As log_alvarion_serialRowChangeEventHandler _ Public Event log_alvarion_serialRowDeleted As log_alvarion_serialRowChangeEventHandler _ Public Overloads Sub Addlog_alvarion_serialRow(ByVal row As log_alvarion_serialRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_alvarion_serialRow(ByVal batchno As String, ByVal serialStart As String, ByVal serialEnd As String, ByVal serialStartHex As String, ByVal serialEndHex As String, ByVal model As String, ByVal revision As String, ByVal quantity As Integer, ByVal generated As Date, ByVal generatedby As String, ByVal family As String) As log_alvarion_serialRow Dim rowlog_alvarion_serialRow As log_alvarion_serialRow = CType(Me.NewRow,log_alvarion_serialRow) Dim columnValuesArray() As Object = New Object() {batchno, serialStart, serialEnd, serialStartHex, serialEndHex, model, revision, quantity, generated, generatedby, family} rowlog_alvarion_serialRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_alvarion_serialRow) Return rowlog_alvarion_serialRow End Function _ Public Function FindBybatchno(ByVal batchno As String) As log_alvarion_serialRow Return CType(Me.Rows.Find(New Object() {batchno}),log_alvarion_serialRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_alvarion_serialDataTable = CType(MyBase.Clone,log_alvarion_serialDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_alvarion_serialDataTable() End Function _ Friend Sub InitVars() Me.columnbatchno = MyBase.Columns("batchno") Me.columnserialStart = MyBase.Columns("serialStart") Me.columnserialEnd = MyBase.Columns("serialEnd") Me.columnserialStartHex = MyBase.Columns("serialStartHex") Me.columnserialEndHex = MyBase.Columns("serialEndHex") Me.columnmodel = MyBase.Columns("model") Me.columnrevision = MyBase.Columns("revision") Me.columnquantity = MyBase.Columns("quantity") Me.columngenerated = MyBase.Columns("generated") Me.columngeneratedby = MyBase.Columns("generatedby") Me.columnfamily = MyBase.Columns("family") End Sub _ Private Sub InitClass() Me.columnbatchno = New Global.System.Data.DataColumn("batchno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatchno) Me.columnserialStart = New Global.System.Data.DataColumn("serialStart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialStart) Me.columnserialEnd = New Global.System.Data.DataColumn("serialEnd", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialEnd) Me.columnserialStartHex = New Global.System.Data.DataColumn("serialStartHex", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialStartHex) Me.columnserialEndHex = New Global.System.Data.DataColumn("serialEndHex", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialEndHex) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnrevision = New Global.System.Data.DataColumn("revision", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrevision) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columngenerated = New Global.System.Data.DataColumn("generated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columngenerated) Me.columngeneratedby = New Global.System.Data.DataColumn("generatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columngeneratedby) Me.columnfamily = New Global.System.Data.DataColumn("family", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnfamily) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnbatchno}, true)) Me.columnbatchno.AllowDBNull = false Me.columnbatchno.Unique = true Me.columnbatchno.MaxLength = 50 Me.columnserialStart.MaxLength = 50 Me.columnserialEnd.MaxLength = 50 Me.columnserialStartHex.MaxLength = 50 Me.columnserialEndHex.MaxLength = 50 Me.columnmodel.MaxLength = 50 Me.columnrevision.MaxLength = 10 Me.columngeneratedby.MaxLength = 50 Me.columnfamily.MaxLength = 50 End Sub _ Public Function Newlog_alvarion_serialRow() As log_alvarion_serialRow Return CType(Me.NewRow,log_alvarion_serialRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_alvarion_serialRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_alvarion_serialRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_alvarion_serialRowChangedEvent) Is Nothing) Then RaiseEvent log_alvarion_serialRowChanged(Me, New log_alvarion_serialRowChangeEvent(CType(e.Row,log_alvarion_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_alvarion_serialRowChangingEvent) Is Nothing) Then RaiseEvent log_alvarion_serialRowChanging(Me, New log_alvarion_serialRowChangeEvent(CType(e.Row,log_alvarion_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_alvarion_serialRowDeletedEvent) Is Nothing) Then RaiseEvent log_alvarion_serialRowDeleted(Me, New log_alvarion_serialRowChangeEvent(CType(e.Row,log_alvarion_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_alvarion_serialRowDeletingEvent) Is Nothing) Then RaiseEvent log_alvarion_serialRowDeleting(Me, New log_alvarion_serialRowChangeEvent(CType(e.Row,log_alvarion_serialRow), e.Action)) End If End Sub _ Public Sub Removelog_alvarion_serialRow(ByVal row As log_alvarion_serialRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_alvarion_serialDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_ATE_errorDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnserialno As Global.System.Data.DataColumn Private columnresult As Global.System.Data.DataColumn Private columnstation As Global.System.Data.DataColumn Private columnpc_name As Global.System.Data.DataColumn Private columnerrormsg As Global.System.Data.DataColumn Private columnchecked_pn As Global.System.Data.DataColumn Private columnmac As Global.System.Data.DataColumn Private columntimestamp As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_ATE_error" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property resultColumn() As Global.System.Data.DataColumn Get Return Me.columnresult End Get End Property _ Public ReadOnly Property stationColumn() As Global.System.Data.DataColumn Get Return Me.columnstation End Get End Property _ Public ReadOnly Property pc_nameColumn() As Global.System.Data.DataColumn Get Return Me.columnpc_name End Get End Property _ Public ReadOnly Property errormsgColumn() As Global.System.Data.DataColumn Get Return Me.columnerrormsg End Get End Property _ Public ReadOnly Property checked_pnColumn() As Global.System.Data.DataColumn Get Return Me.columnchecked_pn End Get End Property _ Public ReadOnly Property macColumn() As Global.System.Data.DataColumn Get Return Me.columnmac End Get End Property _ Public ReadOnly Property timestampColumn() As Global.System.Data.DataColumn Get Return Me.columntimestamp End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_ATE_errorRow Get Return CType(Me.Rows(index),log_ATE_errorRow) End Get End Property _ Public Event log_ATE_errorRowChanging As log_ATE_errorRowChangeEventHandler _ Public Event log_ATE_errorRowChanged As log_ATE_errorRowChangeEventHandler _ Public Event log_ATE_errorRowDeleting As log_ATE_errorRowChangeEventHandler _ Public Event log_ATE_errorRowDeleted As log_ATE_errorRowChangeEventHandler _ Public Overloads Sub Addlog_ATE_errorRow(ByVal row As log_ATE_errorRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_ATE_errorRow(ByVal serialno As String, ByVal result As String, ByVal station As String, ByVal pc_name As String, ByVal errormsg As String, ByVal checked_pn As String, ByVal mac As String, ByVal timestamp As Date) As log_ATE_errorRow Dim rowlog_ATE_errorRow As log_ATE_errorRow = CType(Me.NewRow,log_ATE_errorRow) Dim columnValuesArray() As Object = New Object() {serialno, result, station, pc_name, errormsg, checked_pn, mac, timestamp} rowlog_ATE_errorRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_ATE_errorRow) Return rowlog_ATE_errorRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_ATE_errorDataTable = CType(MyBase.Clone,log_ATE_errorDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_ATE_errorDataTable() End Function _ Friend Sub InitVars() Me.columnserialno = MyBase.Columns("serialno") Me.columnresult = MyBase.Columns("result") Me.columnstation = MyBase.Columns("station") Me.columnpc_name = MyBase.Columns("pc_name") Me.columnerrormsg = MyBase.Columns("errormsg") Me.columnchecked_pn = MyBase.Columns("checked_pn") Me.columnmac = MyBase.Columns("mac") Me.columntimestamp = MyBase.Columns("timestamp") End Sub _ Private Sub InitClass() Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnresult = New Global.System.Data.DataColumn("result", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnresult) Me.columnstation = New Global.System.Data.DataColumn("station", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation) Me.columnpc_name = New Global.System.Data.DataColumn("pc_name", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpc_name) Me.columnerrormsg = New Global.System.Data.DataColumn("errormsg", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnerrormsg) Me.columnchecked_pn = New Global.System.Data.DataColumn("checked_pn", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnchecked_pn) Me.columnmac = New Global.System.Data.DataColumn("mac", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmac) Me.columntimestamp = New Global.System.Data.DataColumn("timestamp", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntimestamp) Me.columnserialno.MaxLength = 50 Me.columnresult.MaxLength = 10 Me.columnstation.MaxLength = 10 Me.columnpc_name.MaxLength = 10 Me.columnerrormsg.MaxLength = 50 Me.columnchecked_pn.MaxLength = 50 Me.columnmac.MaxLength = 50 End Sub _ Public Function Newlog_ATE_errorRow() As log_ATE_errorRow Return CType(Me.NewRow,log_ATE_errorRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_ATE_errorRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_ATE_errorRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_ATE_errorRowChangedEvent) Is Nothing) Then RaiseEvent log_ATE_errorRowChanged(Me, New log_ATE_errorRowChangeEvent(CType(e.Row,log_ATE_errorRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_ATE_errorRowChangingEvent) Is Nothing) Then RaiseEvent log_ATE_errorRowChanging(Me, New log_ATE_errorRowChangeEvent(CType(e.Row,log_ATE_errorRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_ATE_errorRowDeletedEvent) Is Nothing) Then RaiseEvent log_ATE_errorRowDeleted(Me, New log_ATE_errorRowChangeEvent(CType(e.Row,log_ATE_errorRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_ATE_errorRowDeletingEvent) Is Nothing) Then RaiseEvent log_ATE_errorRowDeleting(Me, New log_ATE_errorRowChangeEvent(CType(e.Row,log_ATE_errorRow), e.Action)) End If End Sub _ Public Sub Removelog_ATE_errorRow(ByVal row As log_ATE_errorRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_ATE_errorDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_BL_DetailDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnboxno As Global.System.Data.DataColumn Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnqty As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnmodelWt As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_BL_Detail" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property boxnoColumn() As Global.System.Data.DataColumn Get Return Me.columnboxno End Get End Property _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property qtyColumn() As Global.System.Data.DataColumn Get Return Me.columnqty End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property modelWtColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelWt End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_BL_DetailRow Get Return CType(Me.Rows(index),log_BL_DetailRow) End Get End Property _ Public Event log_BL_DetailRowChanging As log_BL_DetailRowChangeEventHandler _ Public Event log_BL_DetailRowChanged As log_BL_DetailRowChangeEventHandler _ Public Event log_BL_DetailRowDeleting As log_BL_DetailRowChangeEventHandler _ Public Event log_BL_DetailRowDeleted As log_BL_DetailRowChangeEventHandler _ Public Overloads Sub Addlog_BL_DetailRow(ByVal row As log_BL_DetailRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_BL_DetailRow(ByVal boxno As String, ByVal cardno As String, ByVal serialno As String, ByVal qty As Integer, ByVal model As String, ByVal modelWt As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_BL_DetailRow Dim rowlog_BL_DetailRow As log_BL_DetailRow = CType(Me.NewRow,log_BL_DetailRow) Dim columnValuesArray() As Object = New Object() {boxno, cardno, serialno, qty, model, modelWt, lastupdate, lastupdatedby} rowlog_BL_DetailRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_BL_DetailRow) Return rowlog_BL_DetailRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_BL_DetailDataTable = CType(MyBase.Clone,log_BL_DetailDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_BL_DetailDataTable() End Function _ Friend Sub InitVars() Me.columnboxno = MyBase.Columns("boxno") Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnqty = MyBase.Columns("qty") Me.columnmodel = MyBase.Columns("model") Me.columnmodelWt = MyBase.Columns("modelWt") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnboxno = New Global.System.Data.DataColumn("boxno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxno) Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnqty = New Global.System.Data.DataColumn("qty", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnqty) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnmodelWt = New Global.System.Data.DataColumn("modelWt", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelWt) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnboxno.MaxLength = 50 Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnmodel.MaxLength = 50 Me.columnmodelWt.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_BL_DetailRow() As log_BL_DetailRow Return CType(Me.NewRow,log_BL_DetailRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_BL_DetailRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_BL_DetailRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_BL_DetailRowChangedEvent) Is Nothing) Then RaiseEvent log_BL_DetailRowChanged(Me, New log_BL_DetailRowChangeEvent(CType(e.Row,log_BL_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_BL_DetailRowChangingEvent) Is Nothing) Then RaiseEvent log_BL_DetailRowChanging(Me, New log_BL_DetailRowChangeEvent(CType(e.Row,log_BL_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_BL_DetailRowDeletedEvent) Is Nothing) Then RaiseEvent log_BL_DetailRowDeleted(Me, New log_BL_DetailRowChangeEvent(CType(e.Row,log_BL_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_BL_DetailRowDeletingEvent) Is Nothing) Then RaiseEvent log_BL_DetailRowDeleting(Me, New log_BL_DetailRowChangeEvent(CType(e.Row,log_BL_DetailRow), e.Action)) End If End Sub _ Public Sub Removelog_BL_DetailRow(ByVal row As log_BL_DetailRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_BL_DetailDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_BL_Detail_HistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnboxno As Global.System.Data.DataColumn Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnqty As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnmodelWt As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_BL_Detail_Hist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property boxnoColumn() As Global.System.Data.DataColumn Get Return Me.columnboxno End Get End Property _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property qtyColumn() As Global.System.Data.DataColumn Get Return Me.columnqty End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property modelWtColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelWt End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_BL_Detail_HistRow Get Return CType(Me.Rows(index),log_BL_Detail_HistRow) End Get End Property _ Public Event log_BL_Detail_HistRowChanging As log_BL_Detail_HistRowChangeEventHandler _ Public Event log_BL_Detail_HistRowChanged As log_BL_Detail_HistRowChangeEventHandler _ Public Event log_BL_Detail_HistRowDeleting As log_BL_Detail_HistRowChangeEventHandler _ Public Event log_BL_Detail_HistRowDeleted As log_BL_Detail_HistRowChangeEventHandler _ Public Overloads Sub Addlog_BL_Detail_HistRow(ByVal row As log_BL_Detail_HistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_BL_Detail_HistRow(ByVal boxno As String, ByVal cardno As String, ByVal serialno As String, ByVal qty As Integer, ByVal model As String, ByVal modelWt As Single, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_BL_Detail_HistRow Dim rowlog_BL_Detail_HistRow As log_BL_Detail_HistRow = CType(Me.NewRow,log_BL_Detail_HistRow) Dim columnValuesArray() As Object = New Object() {Nothing, boxno, cardno, serialno, qty, model, modelWt, status, lastupdate, lastupdatedby} rowlog_BL_Detail_HistRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_BL_Detail_HistRow) Return rowlog_BL_Detail_HistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As log_BL_Detail_HistRow Return CType(Me.Rows.Find(New Object() {lineNum}),log_BL_Detail_HistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_BL_Detail_HistDataTable = CType(MyBase.Clone,log_BL_Detail_HistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_BL_Detail_HistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnboxno = MyBase.Columns("boxno") Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnqty = MyBase.Columns("qty") Me.columnmodel = MyBase.Columns("model") Me.columnmodelWt = MyBase.Columns("modelWt") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnboxno = New Global.System.Data.DataColumn("boxno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxno) Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnqty = New Global.System.Data.DataColumn("qty", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnqty) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnmodelWt = New Global.System.Data.DataColumn("modelWt", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelWt) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnboxno.MaxLength = 50 Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnmodel.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_BL_Detail_HistRow() As log_BL_Detail_HistRow Return CType(Me.NewRow,log_BL_Detail_HistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_BL_Detail_HistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_BL_Detail_HistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_BL_Detail_HistRowChangedEvent) Is Nothing) Then RaiseEvent log_BL_Detail_HistRowChanged(Me, New log_BL_Detail_HistRowChangeEvent(CType(e.Row,log_BL_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_BL_Detail_HistRowChangingEvent) Is Nothing) Then RaiseEvent log_BL_Detail_HistRowChanging(Me, New log_BL_Detail_HistRowChangeEvent(CType(e.Row,log_BL_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_BL_Detail_HistRowDeletedEvent) Is Nothing) Then RaiseEvent log_BL_Detail_HistRowDeleted(Me, New log_BL_Detail_HistRowChangeEvent(CType(e.Row,log_BL_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_BL_Detail_HistRowDeletingEvent) Is Nothing) Then RaiseEvent log_BL_Detail_HistRowDeleting(Me, New log_BL_Detail_HistRowChangeEvent(CType(e.Row,log_BL_Detail_HistRow), e.Action)) End If End Sub _ Public Sub Removelog_BL_Detail_HistRow(ByVal row As log_BL_Detail_HistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_BL_Detail_HistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_BL_HeaderDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnboxno As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnpo As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columnpkType As Global.System.Data.DataColumn Private columnmaxQty As Global.System.Data.DataColumn Private columnboxWt As Global.System.Data.DataColumn Private columnboxDim As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_BL_Header" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property boxnoColumn() As Global.System.Data.DataColumn Get Return Me.columnboxno End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property poColumn() As Global.System.Data.DataColumn Get Return Me.columnpo End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property pkTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnpkType End Get End Property _ Public ReadOnly Property maxQtyColumn() As Global.System.Data.DataColumn Get Return Me.columnmaxQty End Get End Property _ Public ReadOnly Property boxWtColumn() As Global.System.Data.DataColumn Get Return Me.columnboxWt End Get End Property _ Public ReadOnly Property boxDimColumn() As Global.System.Data.DataColumn Get Return Me.columnboxDim End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_BL_HeaderRow Get Return CType(Me.Rows(index),log_BL_HeaderRow) End Get End Property _ Public Event log_BL_HeaderRowChanging As log_BL_HeaderRowChangeEventHandler _ Public Event log_BL_HeaderRowChanged As log_BL_HeaderRowChangeEventHandler _ Public Event log_BL_HeaderRowDeleting As log_BL_HeaderRowChangeEventHandler _ Public Event log_BL_HeaderRowDeleted As log_BL_HeaderRowChangeEventHandler _ Public Overloads Sub Addlog_BL_HeaderRow(ByVal row As log_BL_HeaderRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_BL_HeaderRow(ByVal boxno As String, ByVal model As String, ByVal po As String, ByVal poLine As String, ByVal pkType As String, ByVal maxQty As Integer, ByVal boxWt As Single, ByVal boxDim As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_BL_HeaderRow Dim rowlog_BL_HeaderRow As log_BL_HeaderRow = CType(Me.NewRow,log_BL_HeaderRow) Dim columnValuesArray() As Object = New Object() {boxno, model, po, poLine, pkType, maxQty, boxWt, boxDim, lastupdate, lastupdatedby} rowlog_BL_HeaderRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_BL_HeaderRow) Return rowlog_BL_HeaderRow End Function _ Public Function FindByboxno(ByVal boxno As String) As log_BL_HeaderRow Return CType(Me.Rows.Find(New Object() {boxno}),log_BL_HeaderRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_BL_HeaderDataTable = CType(MyBase.Clone,log_BL_HeaderDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_BL_HeaderDataTable() End Function _ Friend Sub InitVars() Me.columnboxno = MyBase.Columns("boxno") Me.columnmodel = MyBase.Columns("model") Me.columnpo = MyBase.Columns("po") Me.columnpoLine = MyBase.Columns("poLine") Me.columnpkType = MyBase.Columns("pkType") Me.columnmaxQty = MyBase.Columns("maxQty") Me.columnboxWt = MyBase.Columns("boxWt") Me.columnboxDim = MyBase.Columns("boxDim") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnboxno = New Global.System.Data.DataColumn("boxno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxno) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnpo = New Global.System.Data.DataColumn("po", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpo) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columnpkType = New Global.System.Data.DataColumn("pkType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpkType) Me.columnmaxQty = New Global.System.Data.DataColumn("maxQty", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmaxQty) Me.columnboxWt = New Global.System.Data.DataColumn("boxWt", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxWt) Me.columnboxDim = New Global.System.Data.DataColumn("boxDim", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxDim) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnboxno}, true)) Me.columnboxno.AllowDBNull = false Me.columnboxno.Unique = true Me.columnboxno.MaxLength = 50 Me.columnmodel.MaxLength = 50 Me.columnpo.MaxLength = 50 Me.columnpoLine.MaxLength = 15 Me.columnpkType.MaxLength = 50 Me.columnboxDim.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_BL_HeaderRow() As log_BL_HeaderRow Return CType(Me.NewRow,log_BL_HeaderRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_BL_HeaderRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_BL_HeaderRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_BL_HeaderRowChangedEvent) Is Nothing) Then RaiseEvent log_BL_HeaderRowChanged(Me, New log_BL_HeaderRowChangeEvent(CType(e.Row,log_BL_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_BL_HeaderRowChangingEvent) Is Nothing) Then RaiseEvent log_BL_HeaderRowChanging(Me, New log_BL_HeaderRowChangeEvent(CType(e.Row,log_BL_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_BL_HeaderRowDeletedEvent) Is Nothing) Then RaiseEvent log_BL_HeaderRowDeleted(Me, New log_BL_HeaderRowChangeEvent(CType(e.Row,log_BL_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_BL_HeaderRowDeletingEvent) Is Nothing) Then RaiseEvent log_BL_HeaderRowDeleting(Me, New log_BL_HeaderRowChangeEvent(CType(e.Row,log_BL_HeaderRow), e.Action)) End If End Sub _ Public Sub Removelog_BL_HeaderRow(ByVal row As log_BL_HeaderRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_BL_HeaderDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_BL_Header_HistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnboxno As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnpo As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columnpkType As Global.System.Data.DataColumn Private columnmaxQty As Global.System.Data.DataColumn Private columnboxWt As Global.System.Data.DataColumn Private columnboxDim As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_BL_Header_Hist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property boxnoColumn() As Global.System.Data.DataColumn Get Return Me.columnboxno End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property poColumn() As Global.System.Data.DataColumn Get Return Me.columnpo End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property pkTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnpkType End Get End Property _ Public ReadOnly Property maxQtyColumn() As Global.System.Data.DataColumn Get Return Me.columnmaxQty End Get End Property _ Public ReadOnly Property boxWtColumn() As Global.System.Data.DataColumn Get Return Me.columnboxWt End Get End Property _ Public ReadOnly Property boxDimColumn() As Global.System.Data.DataColumn Get Return Me.columnboxDim End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_BL_Header_HistRow Get Return CType(Me.Rows(index),log_BL_Header_HistRow) End Get End Property _ Public Event log_BL_Header_HistRowChanging As log_BL_Header_HistRowChangeEventHandler _ Public Event log_BL_Header_HistRowChanged As log_BL_Header_HistRowChangeEventHandler _ Public Event log_BL_Header_HistRowDeleting As log_BL_Header_HistRowChangeEventHandler _ Public Event log_BL_Header_HistRowDeleted As log_BL_Header_HistRowChangeEventHandler _ Public Overloads Sub Addlog_BL_Header_HistRow(ByVal row As log_BL_Header_HistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_BL_Header_HistRow(ByVal boxno As String, ByVal model As String, ByVal po As String, ByVal poLine As String, ByVal pkType As String, ByVal maxQty As Integer, ByVal boxWt As Single, ByVal boxDim As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_BL_Header_HistRow Dim rowlog_BL_Header_HistRow As log_BL_Header_HistRow = CType(Me.NewRow,log_BL_Header_HistRow) Dim columnValuesArray() As Object = New Object() {Nothing, boxno, model, po, poLine, pkType, maxQty, boxWt, boxDim, status, lastupdate, lastupdatedby} rowlog_BL_Header_HistRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_BL_Header_HistRow) Return rowlog_BL_Header_HistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As log_BL_Header_HistRow Return CType(Me.Rows.Find(New Object() {lineNum}),log_BL_Header_HistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_BL_Header_HistDataTable = CType(MyBase.Clone,log_BL_Header_HistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_BL_Header_HistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnboxno = MyBase.Columns("boxno") Me.columnmodel = MyBase.Columns("model") Me.columnpo = MyBase.Columns("po") Me.columnpoLine = MyBase.Columns("poLine") Me.columnpkType = MyBase.Columns("pkType") Me.columnmaxQty = MyBase.Columns("maxQty") Me.columnboxWt = MyBase.Columns("boxWt") Me.columnboxDim = MyBase.Columns("boxDim") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnboxno = New Global.System.Data.DataColumn("boxno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxno) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnpo = New Global.System.Data.DataColumn("po", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpo) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columnpkType = New Global.System.Data.DataColumn("pkType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpkType) Me.columnmaxQty = New Global.System.Data.DataColumn("maxQty", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmaxQty) Me.columnboxWt = New Global.System.Data.DataColumn("boxWt", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxWt) Me.columnboxDim = New Global.System.Data.DataColumn("boxDim", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxDim) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnboxno.MaxLength = 50 Me.columnmodel.MaxLength = 50 Me.columnpo.MaxLength = 50 Me.columnpoLine.MaxLength = 15 Me.columnpkType.MaxLength = 50 Me.columnboxDim.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_BL_Header_HistRow() As log_BL_Header_HistRow Return CType(Me.NewRow,log_BL_Header_HistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_BL_Header_HistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_BL_Header_HistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_BL_Header_HistRowChangedEvent) Is Nothing) Then RaiseEvent log_BL_Header_HistRowChanged(Me, New log_BL_Header_HistRowChangeEvent(CType(e.Row,log_BL_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_BL_Header_HistRowChangingEvent) Is Nothing) Then RaiseEvent log_BL_Header_HistRowChanging(Me, New log_BL_Header_HistRowChangeEvent(CType(e.Row,log_BL_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_BL_Header_HistRowDeletedEvent) Is Nothing) Then RaiseEvent log_BL_Header_HistRowDeleted(Me, New log_BL_Header_HistRowChangeEvent(CType(e.Row,log_BL_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_BL_Header_HistRowDeletingEvent) Is Nothing) Then RaiseEvent log_BL_Header_HistRowDeleting(Me, New log_BL_Header_HistRowChangeEvent(CType(e.Row,log_BL_Header_HistRow), e.Action)) End If End Sub _ Public Sub Removelog_BL_Header_HistRow(ByVal row As log_BL_Header_HistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_BL_Header_HistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_CAPADataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnpoNumber As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columncause As Global.System.Data.DataColumn Private columncorrectiveAction As Global.System.Data.DataColumn Private columncategory As Global.System.Data.DataColumn Private columnrejectdate As Global.System.Data.DataColumn Private columnrejectLocation As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_CAPA" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property poNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnpoNumber End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property causeColumn() As Global.System.Data.DataColumn Get Return Me.columncause End Get End Property _ Public ReadOnly Property correctiveActionColumn() As Global.System.Data.DataColumn Get Return Me.columncorrectiveAction End Get End Property _ Public ReadOnly Property categoryColumn() As Global.System.Data.DataColumn Get Return Me.columncategory End Get End Property _ Public ReadOnly Property rejectdateColumn() As Global.System.Data.DataColumn Get Return Me.columnrejectdate End Get End Property _ Public ReadOnly Property rejectLocationColumn() As Global.System.Data.DataColumn Get Return Me.columnrejectLocation End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_CAPARow Get Return CType(Me.Rows(index),log_CAPARow) End Get End Property _ Public Event log_CAPARowChanging As log_CAPARowChangeEventHandler _ Public Event log_CAPARowChanged As log_CAPARowChangeEventHandler _ Public Event log_CAPARowDeleting As log_CAPARowChangeEventHandler _ Public Event log_CAPARowDeleted As log_CAPARowChangeEventHandler _ Public Overloads Sub Addlog_CAPARow(ByVal row As log_CAPARow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_CAPARow(ByVal poNumber As String, ByVal poLine As String, ByVal cause As String, ByVal correctiveAction As String, ByVal category As String, ByVal rejectdate As Date, ByVal rejectLocation As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_CAPARow Dim rowlog_CAPARow As log_CAPARow = CType(Me.NewRow,log_CAPARow) Dim columnValuesArray() As Object = New Object() {poNumber, poLine, cause, correctiveAction, category, rejectdate, rejectLocation, lastupdate, lastupdatedby} rowlog_CAPARow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_CAPARow) Return rowlog_CAPARow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_CAPADataTable = CType(MyBase.Clone,log_CAPADataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_CAPADataTable() End Function _ Friend Sub InitVars() Me.columnpoNumber = MyBase.Columns("poNumber") Me.columnpoLine = MyBase.Columns("poLine") Me.columncause = MyBase.Columns("cause") Me.columncorrectiveAction = MyBase.Columns("correctiveAction") Me.columncategory = MyBase.Columns("category") Me.columnrejectdate = MyBase.Columns("rejectdate") Me.columnrejectLocation = MyBase.Columns("rejectLocation") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnpoNumber = New Global.System.Data.DataColumn("poNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoNumber) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columncause = New Global.System.Data.DataColumn("cause", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncause) Me.columncorrectiveAction = New Global.System.Data.DataColumn("correctiveAction", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncorrectiveAction) Me.columncategory = New Global.System.Data.DataColumn("category", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncategory) Me.columnrejectdate = New Global.System.Data.DataColumn("rejectdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrejectdate) Me.columnrejectLocation = New Global.System.Data.DataColumn("rejectLocation", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrejectLocation) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnpoNumber.MaxLength = 50 Me.columnpoLine.MaxLength = 50 Me.columncause.MaxLength = 200 Me.columncorrectiveAction.MaxLength = 200 Me.columncategory.MaxLength = 50 Me.columnrejectLocation.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_CAPARow() As log_CAPARow Return CType(Me.NewRow,log_CAPARow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_CAPARow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_CAPARow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_CAPARowChangedEvent) Is Nothing) Then RaiseEvent log_CAPARowChanged(Me, New log_CAPARowChangeEvent(CType(e.Row,log_CAPARow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_CAPARowChangingEvent) Is Nothing) Then RaiseEvent log_CAPARowChanging(Me, New log_CAPARowChangeEvent(CType(e.Row,log_CAPARow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_CAPARowDeletedEvent) Is Nothing) Then RaiseEvent log_CAPARowDeleted(Me, New log_CAPARowChangeEvent(CType(e.Row,log_CAPARow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_CAPARowDeletingEvent) Is Nothing) Then RaiseEvent log_CAPARowDeleting(Me, New log_CAPARowChangeEvent(CType(e.Row,log_CAPARow), e.Action)) End If End Sub _ Public Sub Removelog_CAPARow(ByVal row As log_CAPARow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_CAPADataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_cardDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_card" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_cardRow Get Return CType(Me.Rows(index),log_cardRow) End Get End Property _ Public Event log_cardRowChanging As log_cardRowChangeEventHandler _ Public Event log_cardRowChanged As log_cardRowChangeEventHandler _ Public Event log_cardRowDeleting As log_cardRowChangeEventHandler _ Public Event log_cardRowDeleted As log_cardRowChangeEventHandler _ Public Overloads Sub Addlog_cardRow(ByVal row As log_cardRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_cardRow(ByVal cardno As String, ByVal serialno As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_cardRow Dim rowlog_cardRow As log_cardRow = CType(Me.NewRow,log_cardRow) Dim columnValuesArray() As Object = New Object() {cardno, serialno, status, lastupdate, lastupdatedby} rowlog_cardRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_cardRow) Return rowlog_cardRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_cardDataTable = CType(MyBase.Clone,log_cardDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_cardDataTable() End Function _ Friend Sub InitVars() Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_cardRow() As log_cardRow Return CType(Me.NewRow,log_cardRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_cardRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_cardRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_cardRowChangedEvent) Is Nothing) Then RaiseEvent log_cardRowChanged(Me, New log_cardRowChangeEvent(CType(e.Row,log_cardRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_cardRowChangingEvent) Is Nothing) Then RaiseEvent log_cardRowChanging(Me, New log_cardRowChangeEvent(CType(e.Row,log_cardRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_cardRowDeletedEvent) Is Nothing) Then RaiseEvent log_cardRowDeleted(Me, New log_cardRowChangeEvent(CType(e.Row,log_cardRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_cardRowDeletingEvent) Is Nothing) Then RaiseEvent log_cardRowDeleting(Me, New log_cardRowChangeEvent(CType(e.Row,log_cardRow), e.Action)) End If End Sub _ Public Sub Removelog_cardRow(ByVal row As log_cardRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_cardDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_CT_DetailDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnCNno As Global.System.Data.DataColumn Private columnboxno As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_CT_Detail" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property CNnoColumn() As Global.System.Data.DataColumn Get Return Me.columnCNno End Get End Property _ Public ReadOnly Property boxnoColumn() As Global.System.Data.DataColumn Get Return Me.columnboxno End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_CT_DetailRow Get Return CType(Me.Rows(index),log_CT_DetailRow) End Get End Property _ Public Event log_CT_DetailRowChanging As log_CT_DetailRowChangeEventHandler _ Public Event log_CT_DetailRowChanged As log_CT_DetailRowChangeEventHandler _ Public Event log_CT_DetailRowDeleting As log_CT_DetailRowChangeEventHandler _ Public Event log_CT_DetailRowDeleted As log_CT_DetailRowChangeEventHandler _ Public Overloads Sub Addlog_CT_DetailRow(ByVal row As log_CT_DetailRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_CT_DetailRow(ByVal CNno As String, ByVal boxno As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_CT_DetailRow Dim rowlog_CT_DetailRow As log_CT_DetailRow = CType(Me.NewRow,log_CT_DetailRow) Dim columnValuesArray() As Object = New Object() {CNno, boxno, lastupdate, lastupdatedby} rowlog_CT_DetailRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_CT_DetailRow) Return rowlog_CT_DetailRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_CT_DetailDataTable = CType(MyBase.Clone,log_CT_DetailDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_CT_DetailDataTable() End Function _ Friend Sub InitVars() Me.columnCNno = MyBase.Columns("CNno") Me.columnboxno = MyBase.Columns("boxno") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnCNno = New Global.System.Data.DataColumn("CNno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCNno) Me.columnboxno = New Global.System.Data.DataColumn("boxno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxno) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnCNno.MaxLength = 50 Me.columnboxno.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_CT_DetailRow() As log_CT_DetailRow Return CType(Me.NewRow,log_CT_DetailRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_CT_DetailRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_CT_DetailRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_CT_DetailRowChangedEvent) Is Nothing) Then RaiseEvent log_CT_DetailRowChanged(Me, New log_CT_DetailRowChangeEvent(CType(e.Row,log_CT_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_CT_DetailRowChangingEvent) Is Nothing) Then RaiseEvent log_CT_DetailRowChanging(Me, New log_CT_DetailRowChangeEvent(CType(e.Row,log_CT_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_CT_DetailRowDeletedEvent) Is Nothing) Then RaiseEvent log_CT_DetailRowDeleted(Me, New log_CT_DetailRowChangeEvent(CType(e.Row,log_CT_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_CT_DetailRowDeletingEvent) Is Nothing) Then RaiseEvent log_CT_DetailRowDeleting(Me, New log_CT_DetailRowChangeEvent(CType(e.Row,log_CT_DetailRow), e.Action)) End If End Sub _ Public Sub Removelog_CT_DetailRow(ByVal row As log_CT_DetailRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_CT_DetailDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_CT_Detail_HistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnCNno As Global.System.Data.DataColumn Private columnboxno As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_CT_Detail_Hist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property CNnoColumn() As Global.System.Data.DataColumn Get Return Me.columnCNno End Get End Property _ Public ReadOnly Property boxnoColumn() As Global.System.Data.DataColumn Get Return Me.columnboxno End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_CT_Detail_HistRow Get Return CType(Me.Rows(index),log_CT_Detail_HistRow) End Get End Property _ Public Event log_CT_Detail_HistRowChanging As log_CT_Detail_HistRowChangeEventHandler _ Public Event log_CT_Detail_HistRowChanged As log_CT_Detail_HistRowChangeEventHandler _ Public Event log_CT_Detail_HistRowDeleting As log_CT_Detail_HistRowChangeEventHandler _ Public Event log_CT_Detail_HistRowDeleted As log_CT_Detail_HistRowChangeEventHandler _ Public Overloads Sub Addlog_CT_Detail_HistRow(ByVal row As log_CT_Detail_HistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_CT_Detail_HistRow(ByVal CNno As String, ByVal boxno As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_CT_Detail_HistRow Dim rowlog_CT_Detail_HistRow As log_CT_Detail_HistRow = CType(Me.NewRow,log_CT_Detail_HistRow) Dim columnValuesArray() As Object = New Object() {Nothing, CNno, boxno, status, lastupdate, lastupdatedby} rowlog_CT_Detail_HistRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_CT_Detail_HistRow) Return rowlog_CT_Detail_HistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As log_CT_Detail_HistRow Return CType(Me.Rows.Find(New Object() {lineNum}),log_CT_Detail_HistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_CT_Detail_HistDataTable = CType(MyBase.Clone,log_CT_Detail_HistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_CT_Detail_HistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnCNno = MyBase.Columns("CNno") Me.columnboxno = MyBase.Columns("boxno") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnCNno = New Global.System.Data.DataColumn("CNno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCNno) Me.columnboxno = New Global.System.Data.DataColumn("boxno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxno) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnCNno.MaxLength = 50 Me.columnboxno.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_CT_Detail_HistRow() As log_CT_Detail_HistRow Return CType(Me.NewRow,log_CT_Detail_HistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_CT_Detail_HistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_CT_Detail_HistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_CT_Detail_HistRowChangedEvent) Is Nothing) Then RaiseEvent log_CT_Detail_HistRowChanged(Me, New log_CT_Detail_HistRowChangeEvent(CType(e.Row,log_CT_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_CT_Detail_HistRowChangingEvent) Is Nothing) Then RaiseEvent log_CT_Detail_HistRowChanging(Me, New log_CT_Detail_HistRowChangeEvent(CType(e.Row,log_CT_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_CT_Detail_HistRowDeletedEvent) Is Nothing) Then RaiseEvent log_CT_Detail_HistRowDeleted(Me, New log_CT_Detail_HistRowChangeEvent(CType(e.Row,log_CT_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_CT_Detail_HistRowDeletingEvent) Is Nothing) Then RaiseEvent log_CT_Detail_HistRowDeleting(Me, New log_CT_Detail_HistRowChangeEvent(CType(e.Row,log_CT_Detail_HistRow), e.Action)) End If End Sub _ Public Sub Removelog_CT_Detail_HistRow(ByVal row As log_CT_Detail_HistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_CT_Detail_HistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_CT_HeaderDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnCNno As Global.System.Data.DataColumn Private columnlayer As Global.System.Data.DataColumn Private columndimension As Global.System.Data.DataColumn Private columntype As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_CT_Header" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property CNnoColumn() As Global.System.Data.DataColumn Get Return Me.columnCNno End Get End Property _ Public ReadOnly Property layerColumn() As Global.System.Data.DataColumn Get Return Me.columnlayer End Get End Property _ Public ReadOnly Property dimensionColumn() As Global.System.Data.DataColumn Get Return Me.columndimension End Get End Property _ Public ReadOnly Property typeColumn() As Global.System.Data.DataColumn Get Return Me.columntype End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_CT_HeaderRow Get Return CType(Me.Rows(index),log_CT_HeaderRow) End Get End Property _ Public Event log_CT_HeaderRowChanging As log_CT_HeaderRowChangeEventHandler _ Public Event log_CT_HeaderRowChanged As log_CT_HeaderRowChangeEventHandler _ Public Event log_CT_HeaderRowDeleting As log_CT_HeaderRowChangeEventHandler _ Public Event log_CT_HeaderRowDeleted As log_CT_HeaderRowChangeEventHandler _ Public Overloads Sub Addlog_CT_HeaderRow(ByVal row As log_CT_HeaderRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_CT_HeaderRow(ByVal CNno As String, ByVal layer As Single, ByVal dimension As String, ByVal type As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_CT_HeaderRow Dim rowlog_CT_HeaderRow As log_CT_HeaderRow = CType(Me.NewRow,log_CT_HeaderRow) Dim columnValuesArray() As Object = New Object() {CNno, layer, dimension, type, lastupdate, lastupdatedby} rowlog_CT_HeaderRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_CT_HeaderRow) Return rowlog_CT_HeaderRow End Function _ Public Function FindByCNno(ByVal CNno As String) As log_CT_HeaderRow Return CType(Me.Rows.Find(New Object() {CNno}),log_CT_HeaderRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_CT_HeaderDataTable = CType(MyBase.Clone,log_CT_HeaderDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_CT_HeaderDataTable() End Function _ Friend Sub InitVars() Me.columnCNno = MyBase.Columns("CNno") Me.columnlayer = MyBase.Columns("layer") Me.columndimension = MyBase.Columns("dimension") Me.columntype = MyBase.Columns("type") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnCNno = New Global.System.Data.DataColumn("CNno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCNno) Me.columnlayer = New Global.System.Data.DataColumn("layer", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayer) Me.columndimension = New Global.System.Data.DataColumn("dimension", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimension) Me.columntype = New Global.System.Data.DataColumn("type", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntype) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCNno}, true)) Me.columnCNno.AllowDBNull = false Me.columnCNno.Unique = true Me.columnCNno.MaxLength = 50 Me.columndimension.MaxLength = 50 Me.columntype.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_CT_HeaderRow() As log_CT_HeaderRow Return CType(Me.NewRow,log_CT_HeaderRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_CT_HeaderRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_CT_HeaderRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_CT_HeaderRowChangedEvent) Is Nothing) Then RaiseEvent log_CT_HeaderRowChanged(Me, New log_CT_HeaderRowChangeEvent(CType(e.Row,log_CT_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_CT_HeaderRowChangingEvent) Is Nothing) Then RaiseEvent log_CT_HeaderRowChanging(Me, New log_CT_HeaderRowChangeEvent(CType(e.Row,log_CT_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_CT_HeaderRowDeletedEvent) Is Nothing) Then RaiseEvent log_CT_HeaderRowDeleted(Me, New log_CT_HeaderRowChangeEvent(CType(e.Row,log_CT_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_CT_HeaderRowDeletingEvent) Is Nothing) Then RaiseEvent log_CT_HeaderRowDeleting(Me, New log_CT_HeaderRowChangeEvent(CType(e.Row,log_CT_HeaderRow), e.Action)) End If End Sub _ Public Sub Removelog_CT_HeaderRow(ByVal row As log_CT_HeaderRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_CT_HeaderDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_CT_Header_HistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnCNno As Global.System.Data.DataColumn Private columnlayer As Global.System.Data.DataColumn Private columndimension As Global.System.Data.DataColumn Private columntype As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_CT_Header_Hist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property CNnoColumn() As Global.System.Data.DataColumn Get Return Me.columnCNno End Get End Property _ Public ReadOnly Property layerColumn() As Global.System.Data.DataColumn Get Return Me.columnlayer End Get End Property _ Public ReadOnly Property dimensionColumn() As Global.System.Data.DataColumn Get Return Me.columndimension End Get End Property _ Public ReadOnly Property typeColumn() As Global.System.Data.DataColumn Get Return Me.columntype End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_CT_Header_HistRow Get Return CType(Me.Rows(index),log_CT_Header_HistRow) End Get End Property _ Public Event log_CT_Header_HistRowChanging As log_CT_Header_HistRowChangeEventHandler _ Public Event log_CT_Header_HistRowChanged As log_CT_Header_HistRowChangeEventHandler _ Public Event log_CT_Header_HistRowDeleting As log_CT_Header_HistRowChangeEventHandler _ Public Event log_CT_Header_HistRowDeleted As log_CT_Header_HistRowChangeEventHandler _ Public Overloads Sub Addlog_CT_Header_HistRow(ByVal row As log_CT_Header_HistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_CT_Header_HistRow(ByVal CNno As String, ByVal layer As Integer, ByVal dimension As String, ByVal type As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_CT_Header_HistRow Dim rowlog_CT_Header_HistRow As log_CT_Header_HistRow = CType(Me.NewRow,log_CT_Header_HistRow) Dim columnValuesArray() As Object = New Object() {Nothing, CNno, layer, dimension, type, status, lastupdate, lastupdatedby} rowlog_CT_Header_HistRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_CT_Header_HistRow) Return rowlog_CT_Header_HistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As log_CT_Header_HistRow Return CType(Me.Rows.Find(New Object() {lineNum}),log_CT_Header_HistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_CT_Header_HistDataTable = CType(MyBase.Clone,log_CT_Header_HistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_CT_Header_HistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnCNno = MyBase.Columns("CNno") Me.columnlayer = MyBase.Columns("layer") Me.columndimension = MyBase.Columns("dimension") Me.columntype = MyBase.Columns("type") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnCNno = New Global.System.Data.DataColumn("CNno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCNno) Me.columnlayer = New Global.System.Data.DataColumn("layer", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayer) Me.columndimension = New Global.System.Data.DataColumn("dimension", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimension) Me.columntype = New Global.System.Data.DataColumn("type", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntype) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnCNno.MaxLength = 50 Me.columndimension.MaxLength = 50 Me.columntype.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_CT_Header_HistRow() As log_CT_Header_HistRow Return CType(Me.NewRow,log_CT_Header_HistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_CT_Header_HistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_CT_Header_HistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_CT_Header_HistRowChangedEvent) Is Nothing) Then RaiseEvent log_CT_Header_HistRowChanged(Me, New log_CT_Header_HistRowChangeEvent(CType(e.Row,log_CT_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_CT_Header_HistRowChangingEvent) Is Nothing) Then RaiseEvent log_CT_Header_HistRowChanging(Me, New log_CT_Header_HistRowChangeEvent(CType(e.Row,log_CT_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_CT_Header_HistRowDeletedEvent) Is Nothing) Then RaiseEvent log_CT_Header_HistRowDeleted(Me, New log_CT_Header_HistRowChangeEvent(CType(e.Row,log_CT_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_CT_Header_HistRowDeletingEvent) Is Nothing) Then RaiseEvent log_CT_Header_HistRowDeleting(Me, New log_CT_Header_HistRowChangeEvent(CType(e.Row,log_CT_Header_HistRow), e.Action)) End If End Sub _ Public Sub Removelog_CT_Header_HistRow(ByVal row As log_CT_Header_HistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_CT_Header_HistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_ct_header_tempDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnCNno As Global.System.Data.DataColumn Private columnlayer As Global.System.Data.DataColumn Private columndimension As Global.System.Data.DataColumn Private columntype As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_ct_header_temp" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property CNnoColumn() As Global.System.Data.DataColumn Get Return Me.columnCNno End Get End Property _ Public ReadOnly Property layerColumn() As Global.System.Data.DataColumn Get Return Me.columnlayer End Get End Property _ Public ReadOnly Property dimensionColumn() As Global.System.Data.DataColumn Get Return Me.columndimension End Get End Property _ Public ReadOnly Property typeColumn() As Global.System.Data.DataColumn Get Return Me.columntype End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_ct_header_tempRow Get Return CType(Me.Rows(index),log_ct_header_tempRow) End Get End Property _ Public Event log_ct_header_tempRowChanging As log_ct_header_tempRowChangeEventHandler _ Public Event log_ct_header_tempRowChanged As log_ct_header_tempRowChangeEventHandler _ Public Event log_ct_header_tempRowDeleting As log_ct_header_tempRowChangeEventHandler _ Public Event log_ct_header_tempRowDeleted As log_ct_header_tempRowChangeEventHandler _ Public Overloads Sub Addlog_ct_header_tempRow(ByVal row As log_ct_header_tempRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_ct_header_tempRow(ByVal CNno As String, ByVal layer As Integer, ByVal dimension As String, ByVal type As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_ct_header_tempRow Dim rowlog_ct_header_tempRow As log_ct_header_tempRow = CType(Me.NewRow,log_ct_header_tempRow) Dim columnValuesArray() As Object = New Object() {CNno, layer, dimension, type, lastupdate, lastupdatedby} rowlog_ct_header_tempRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_ct_header_tempRow) Return rowlog_ct_header_tempRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_ct_header_tempDataTable = CType(MyBase.Clone,log_ct_header_tempDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_ct_header_tempDataTable() End Function _ Friend Sub InitVars() Me.columnCNno = MyBase.Columns("CNno") Me.columnlayer = MyBase.Columns("layer") Me.columndimension = MyBase.Columns("dimension") Me.columntype = MyBase.Columns("type") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnCNno = New Global.System.Data.DataColumn("CNno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCNno) Me.columnlayer = New Global.System.Data.DataColumn("layer", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayer) Me.columndimension = New Global.System.Data.DataColumn("dimension", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimension) Me.columntype = New Global.System.Data.DataColumn("type", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntype) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnCNno.AllowDBNull = false Me.columnCNno.MaxLength = 50 Me.columndimension.MaxLength = 50 Me.columntype.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_ct_header_tempRow() As log_ct_header_tempRow Return CType(Me.NewRow,log_ct_header_tempRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_ct_header_tempRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_ct_header_tempRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_ct_header_tempRowChangedEvent) Is Nothing) Then RaiseEvent log_ct_header_tempRowChanged(Me, New log_ct_header_tempRowChangeEvent(CType(e.Row,log_ct_header_tempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_ct_header_tempRowChangingEvent) Is Nothing) Then RaiseEvent log_ct_header_tempRowChanging(Me, New log_ct_header_tempRowChangeEvent(CType(e.Row,log_ct_header_tempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_ct_header_tempRowDeletedEvent) Is Nothing) Then RaiseEvent log_ct_header_tempRowDeleted(Me, New log_ct_header_tempRowChangeEvent(CType(e.Row,log_ct_header_tempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_ct_header_tempRowDeletingEvent) Is Nothing) Then RaiseEvent log_ct_header_tempRowDeleting(Me, New log_ct_header_tempRowChangeEvent(CType(e.Row,log_ct_header_tempRow), e.Action)) End If End Sub _ Public Sub Removelog_ct_header_tempRow(ByVal row As log_ct_header_tempRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_ct_header_tempDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_DADataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columntrackingno As Global.System.Data.DataColumn Private columninputType As Global.System.Data.DataColumn Private columnserial As Global.System.Data.DataColumn Private columnserialFrom As Global.System.Data.DataColumn Private columnserialTo As Global.System.Data.DataColumn Private columnbatchNo As Global.System.Data.DataColumn Private columndaNumber As Global.System.Data.DataColumn Private columndaDesc As Global.System.Data.DataColumn Private columndaRemarks As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_DA" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property trackingnoColumn() As Global.System.Data.DataColumn Get Return Me.columntrackingno End Get End Property _ Public ReadOnly Property inputTypeColumn() As Global.System.Data.DataColumn Get Return Me.columninputType End Get End Property _ Public ReadOnly Property serialColumn() As Global.System.Data.DataColumn Get Return Me.columnserial End Get End Property _ Public ReadOnly Property serialFromColumn() As Global.System.Data.DataColumn Get Return Me.columnserialFrom End Get End Property _ Public ReadOnly Property serialToColumn() As Global.System.Data.DataColumn Get Return Me.columnserialTo End Get End Property _ Public ReadOnly Property batchNoColumn() As Global.System.Data.DataColumn Get Return Me.columnbatchNo End Get End Property _ Public ReadOnly Property daNumberColumn() As Global.System.Data.DataColumn Get Return Me.columndaNumber End Get End Property _ Public ReadOnly Property daDescColumn() As Global.System.Data.DataColumn Get Return Me.columndaDesc End Get End Property _ Public ReadOnly Property daRemarksColumn() As Global.System.Data.DataColumn Get Return Me.columndaRemarks End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_DARow Get Return CType(Me.Rows(index),log_DARow) End Get End Property _ Public Event log_DARowChanging As log_DARowChangeEventHandler _ Public Event log_DARowChanged As log_DARowChangeEventHandler _ Public Event log_DARowDeleting As log_DARowChangeEventHandler _ Public Event log_DARowDeleted As log_DARowChangeEventHandler _ Public Overloads Sub Addlog_DARow(ByVal row As log_DARow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_DARow(ByVal trackingno As String, ByVal inputType As String, ByVal serial As String, ByVal serialFrom As String, ByVal serialTo As String, ByVal batchNo As String, ByVal daNumber As String, ByVal daDesc As String, ByVal daRemarks As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_DARow Dim rowlog_DARow As log_DARow = CType(Me.NewRow,log_DARow) Dim columnValuesArray() As Object = New Object() {trackingno, inputType, serial, serialFrom, serialTo, batchNo, daNumber, daDesc, daRemarks, lastupdate, lastupdatedby} rowlog_DARow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_DARow) Return rowlog_DARow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_DADataTable = CType(MyBase.Clone,log_DADataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_DADataTable() End Function _ Friend Sub InitVars() Me.columntrackingno = MyBase.Columns("trackingno") Me.columninputType = MyBase.Columns("inputType") Me.columnserial = MyBase.Columns("serial") Me.columnserialFrom = MyBase.Columns("serialFrom") Me.columnserialTo = MyBase.Columns("serialTo") Me.columnbatchNo = MyBase.Columns("batchNo") Me.columndaNumber = MyBase.Columns("daNumber") Me.columndaDesc = MyBase.Columns("daDesc") Me.columndaRemarks = MyBase.Columns("daRemarks") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columntrackingno = New Global.System.Data.DataColumn("trackingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntrackingno) Me.columninputType = New Global.System.Data.DataColumn("inputType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columninputType) Me.columnserial = New Global.System.Data.DataColumn("serial", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserial) Me.columnserialFrom = New Global.System.Data.DataColumn("serialFrom", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialFrom) Me.columnserialTo = New Global.System.Data.DataColumn("serialTo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialTo) Me.columnbatchNo = New Global.System.Data.DataColumn("batchNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatchNo) Me.columndaNumber = New Global.System.Data.DataColumn("daNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndaNumber) Me.columndaDesc = New Global.System.Data.DataColumn("daDesc", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndaDesc) Me.columndaRemarks = New Global.System.Data.DataColumn("daRemarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndaRemarks) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columntrackingno.MaxLength = 11 Me.columninputType.MaxLength = 50 Me.columnserial.MaxLength = 50 Me.columnserialFrom.MaxLength = 50 Me.columnserialTo.MaxLength = 50 Me.columnbatchNo.MaxLength = 50 Me.columndaNumber.MaxLength = 100 Me.columndaDesc.MaxLength = 200 Me.columndaRemarks.MaxLength = 500 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_DARow() As log_DARow Return CType(Me.NewRow,log_DARow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_DARow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_DARow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_DARowChangedEvent) Is Nothing) Then RaiseEvent log_DARowChanged(Me, New log_DARowChangeEvent(CType(e.Row,log_DARow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_DARowChangingEvent) Is Nothing) Then RaiseEvent log_DARowChanging(Me, New log_DARowChangeEvent(CType(e.Row,log_DARow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_DARowDeletedEvent) Is Nothing) Then RaiseEvent log_DARowDeleted(Me, New log_DARowChangeEvent(CType(e.Row,log_DARow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_DARowDeletingEvent) Is Nothing) Then RaiseEvent log_DARowDeleting(Me, New log_DARowChangeEvent(CType(e.Row,log_DARow), e.Action)) End If End Sub _ Public Sub Removelog_DARow(ByVal row As log_DARow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_DADataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_labelDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnso As Global.System.Data.DataColumn Private columnline As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_label" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property soColumn() As Global.System.Data.DataColumn Get Return Me.columnso End Get End Property _ Public ReadOnly Property lineColumn() As Global.System.Data.DataColumn Get Return Me.columnline End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_labelRow Get Return CType(Me.Rows(index),log_labelRow) End Get End Property _ Public Event log_labelRowChanging As log_labelRowChangeEventHandler _ Public Event log_labelRowChanged As log_labelRowChangeEventHandler _ Public Event log_labelRowDeleting As log_labelRowChangeEventHandler _ Public Event log_labelRowDeleted As log_labelRowChangeEventHandler _ Public Overloads Sub Addlog_labelRow(ByVal row As log_labelRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_labelRow(ByVal cardno As String, ByVal serialno As String, ByVal so As String, ByVal line As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_labelRow Dim rowlog_labelRow As log_labelRow = CType(Me.NewRow,log_labelRow) Dim columnValuesArray() As Object = New Object() {cardno, serialno, so, line, lastupdate, lastupdatedby} rowlog_labelRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_labelRow) Return rowlog_labelRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_labelDataTable = CType(MyBase.Clone,log_labelDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_labelDataTable() End Function _ Friend Sub InitVars() Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnso = MyBase.Columns("so") Me.columnline = MyBase.Columns("line") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnso = New Global.System.Data.DataColumn("so", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnso) Me.columnline = New Global.System.Data.DataColumn("line", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnline) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnso.MaxLength = 50 Me.columnline.MaxLength = 10 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_labelRow() As log_labelRow Return CType(Me.NewRow,log_labelRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_labelRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_labelRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_labelRowChangedEvent) Is Nothing) Then RaiseEvent log_labelRowChanged(Me, New log_labelRowChangeEvent(CType(e.Row,log_labelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_labelRowChangingEvent) Is Nothing) Then RaiseEvent log_labelRowChanging(Me, New log_labelRowChangeEvent(CType(e.Row,log_labelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_labelRowDeletedEvent) Is Nothing) Then RaiseEvent log_labelRowDeleted(Me, New log_labelRowChangeEvent(CType(e.Row,log_labelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_labelRowDeletingEvent) Is Nothing) Then RaiseEvent log_labelRowDeleting(Me, New log_labelRowChangeEvent(CType(e.Row,log_labelRow), e.Action)) End If End Sub _ Public Sub Removelog_labelRow(ByVal row As log_labelRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_labelDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_labelHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnso As Global.System.Data.DataColumn Private columnline As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_labelHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property soColumn() As Global.System.Data.DataColumn Get Return Me.columnso End Get End Property _ Public ReadOnly Property lineColumn() As Global.System.Data.DataColumn Get Return Me.columnline End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_labelHistRow Get Return CType(Me.Rows(index),log_labelHistRow) End Get End Property _ Public Event log_labelHistRowChanging As log_labelHistRowChangeEventHandler _ Public Event log_labelHistRowChanged As log_labelHistRowChangeEventHandler _ Public Event log_labelHistRowDeleting As log_labelHistRowChangeEventHandler _ Public Event log_labelHistRowDeleted As log_labelHistRowChangeEventHandler _ Public Overloads Sub Addlog_labelHistRow(ByVal row As log_labelHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_labelHistRow(ByVal cardno As String, ByVal serialno As String, ByVal so As String, ByVal line As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_labelHistRow Dim rowlog_labelHistRow As log_labelHistRow = CType(Me.NewRow,log_labelHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, cardno, serialno, so, line, status, lastupdate, lastupdatedby} rowlog_labelHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_labelHistRow) Return rowlog_labelHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As log_labelHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),log_labelHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_labelHistDataTable = CType(MyBase.Clone,log_labelHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_labelHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columnso = MyBase.Columns("so") Me.columnline = MyBase.Columns("line") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnso = New Global.System.Data.DataColumn("so", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnso) Me.columnline = New Global.System.Data.DataColumn("line", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnline) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnso.MaxLength = 50 Me.columnline.MaxLength = 10 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_labelHistRow() As log_labelHistRow Return CType(Me.NewRow,log_labelHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_labelHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_labelHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_labelHistRowChangedEvent) Is Nothing) Then RaiseEvent log_labelHistRowChanged(Me, New log_labelHistRowChangeEvent(CType(e.Row,log_labelHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_labelHistRowChangingEvent) Is Nothing) Then RaiseEvent log_labelHistRowChanging(Me, New log_labelHistRowChangeEvent(CType(e.Row,log_labelHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_labelHistRowDeletedEvent) Is Nothing) Then RaiseEvent log_labelHistRowDeleted(Me, New log_labelHistRowChangeEvent(CType(e.Row,log_labelHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_labelHistRowDeletingEvent) Is Nothing) Then RaiseEvent log_labelHistRowDeleting(Me, New log_labelHistRowChangeEvent(CType(e.Row,log_labelHistRow), e.Action)) End If End Sub _ Public Sub Removelog_labelHistRow(ByVal row As log_labelHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_labelHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_linkDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columntrackingno As Global.System.Data.DataColumn Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columncardnoLink As Global.System.Data.DataColumn Private columnserialnoLink As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_link" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property trackingnoColumn() As Global.System.Data.DataColumn Get Return Me.columntrackingno End Get End Property _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property cardnoLinkColumn() As Global.System.Data.DataColumn Get Return Me.columncardnoLink End Get End Property _ Public ReadOnly Property serialnoLinkColumn() As Global.System.Data.DataColumn Get Return Me.columnserialnoLink End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_linkRow Get Return CType(Me.Rows(index),log_linkRow) End Get End Property _ Public Event log_linkRowChanging As log_linkRowChangeEventHandler _ Public Event log_linkRowChanged As log_linkRowChangeEventHandler _ Public Event log_linkRowDeleting As log_linkRowChangeEventHandler _ Public Event log_linkRowDeleted As log_linkRowChangeEventHandler _ Public Overloads Sub Addlog_linkRow(ByVal row As log_linkRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_linkRow(ByVal trackingno As String, ByVal cardno As String, ByVal serialno As String, ByVal cardnoLink As String, ByVal serialnoLink As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_linkRow Dim rowlog_linkRow As log_linkRow = CType(Me.NewRow,log_linkRow) Dim columnValuesArray() As Object = New Object() {trackingno, cardno, serialno, cardnoLink, serialnoLink, lastupdate, lastupdatedby} rowlog_linkRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_linkRow) Return rowlog_linkRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_linkDataTable = CType(MyBase.Clone,log_linkDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_linkDataTable() End Function _ Friend Sub InitVars() Me.columntrackingno = MyBase.Columns("trackingno") Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columncardnoLink = MyBase.Columns("cardnoLink") Me.columnserialnoLink = MyBase.Columns("serialnoLink") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columntrackingno = New Global.System.Data.DataColumn("trackingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntrackingno) Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columncardnoLink = New Global.System.Data.DataColumn("cardnoLink", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardnoLink) Me.columnserialnoLink = New Global.System.Data.DataColumn("serialnoLink", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialnoLink) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columntrackingno.MaxLength = 11 Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columncardnoLink.MaxLength = 50 Me.columnserialnoLink.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_linkRow() As log_linkRow Return CType(Me.NewRow,log_linkRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_linkRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_linkRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_linkRowChangedEvent) Is Nothing) Then RaiseEvent log_linkRowChanged(Me, New log_linkRowChangeEvent(CType(e.Row,log_linkRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_linkRowChangingEvent) Is Nothing) Then RaiseEvent log_linkRowChanging(Me, New log_linkRowChangeEvent(CType(e.Row,log_linkRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_linkRowDeletedEvent) Is Nothing) Then RaiseEvent log_linkRowDeleted(Me, New log_linkRowChangeEvent(CType(e.Row,log_linkRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_linkRowDeletingEvent) Is Nothing) Then RaiseEvent log_linkRowDeleting(Me, New log_linkRowChangeEvent(CType(e.Row,log_linkRow), e.Action)) End If End Sub _ Public Sub Removelog_linkRow(ByVal row As log_linkRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_linkDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_linkHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columncardno As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columncardnoLink As Global.System.Data.DataColumn Private columnserialnoLink As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_linkHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property cardnoLinkColumn() As Global.System.Data.DataColumn Get Return Me.columncardnoLink End Get End Property _ Public ReadOnly Property serialnoLinkColumn() As Global.System.Data.DataColumn Get Return Me.columnserialnoLink End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_linkHistRow Get Return CType(Me.Rows(index),log_linkHistRow) End Get End Property _ Public Event log_linkHistRowChanging As log_linkHistRowChangeEventHandler _ Public Event log_linkHistRowChanged As log_linkHistRowChangeEventHandler _ Public Event log_linkHistRowDeleting As log_linkHistRowChangeEventHandler _ Public Event log_linkHistRowDeleted As log_linkHistRowChangeEventHandler _ Public Overloads Sub Addlog_linkHistRow(ByVal row As log_linkHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_linkHistRow(ByVal cardno As String, ByVal serialno As String, ByVal cardnoLink As String, ByVal serialnoLink As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_linkHistRow Dim rowlog_linkHistRow As log_linkHistRow = CType(Me.NewRow,log_linkHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, cardno, serialno, cardnoLink, serialnoLink, status, lastupdate, lastupdatedby} rowlog_linkHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_linkHistRow) Return rowlog_linkHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As log_linkHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),log_linkHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_linkHistDataTable = CType(MyBase.Clone,log_linkHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_linkHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columncardno = MyBase.Columns("cardno") Me.columnserialno = MyBase.Columns("serialno") Me.columncardnoLink = MyBase.Columns("cardnoLink") Me.columnserialnoLink = MyBase.Columns("serialnoLink") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columncardnoLink = New Global.System.Data.DataColumn("cardnoLink", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardnoLink) Me.columnserialnoLink = New Global.System.Data.DataColumn("serialnoLink", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialnoLink) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columncardno.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columncardnoLink.MaxLength = 50 Me.columnserialnoLink.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_linkHistRow() As log_linkHistRow Return CType(Me.NewRow,log_linkHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_linkHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_linkHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_linkHistRowChangedEvent) Is Nothing) Then RaiseEvent log_linkHistRowChanged(Me, New log_linkHistRowChangeEvent(CType(e.Row,log_linkHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_linkHistRowChangingEvent) Is Nothing) Then RaiseEvent log_linkHistRowChanging(Me, New log_linkHistRowChangeEvent(CType(e.Row,log_linkHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_linkHistRowDeletedEvent) Is Nothing) Then RaiseEvent log_linkHistRowDeleted(Me, New log_linkHistRowChangeEvent(CType(e.Row,log_linkHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_linkHistRowDeletingEvent) Is Nothing) Then RaiseEvent log_linkHistRowDeleting(Me, New log_linkHistRowChangeEvent(CType(e.Row,log_linkHistRow), e.Action)) End If End Sub _ Public Sub Removelog_linkHistRow(ByVal row As log_linkHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_linkHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_lotDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlotNumber As Global.System.Data.DataColumn Private columnstage As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnsamplingSize As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_lot" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lotNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnlotNumber End Get End Property _ Public ReadOnly Property stageColumn() As Global.System.Data.DataColumn Get Return Me.columnstage End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property samplingSizeColumn() As Global.System.Data.DataColumn Get Return Me.columnsamplingSize End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_lotRow Get Return CType(Me.Rows(index),log_lotRow) End Get End Property _ Public Event log_lotRowChanging As log_lotRowChangeEventHandler _ Public Event log_lotRowChanged As log_lotRowChangeEventHandler _ Public Event log_lotRowDeleting As log_lotRowChangeEventHandler _ Public Event log_lotRowDeleted As log_lotRowChangeEventHandler _ Public Overloads Sub Addlog_lotRow(ByVal row As log_lotRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_lotRow(ByVal lotNumber As String, ByVal stage As String, ByVal status As String, ByVal samplingSize As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_lotRow Dim rowlog_lotRow As log_lotRow = CType(Me.NewRow,log_lotRow) Dim columnValuesArray() As Object = New Object() {lotNumber, stage, status, samplingSize, lastupdate, lastupdatedby} rowlog_lotRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_lotRow) Return rowlog_lotRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_lotDataTable = CType(MyBase.Clone,log_lotDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_lotDataTable() End Function _ Friend Sub InitVars() Me.columnlotNumber = MyBase.Columns("lotNumber") Me.columnstage = MyBase.Columns("stage") Me.columnstatus = MyBase.Columns("status") Me.columnsamplingSize = MyBase.Columns("samplingSize") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlotNumber = New Global.System.Data.DataColumn("lotNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlotNumber) Me.columnstage = New Global.System.Data.DataColumn("stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstage) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnsamplingSize = New Global.System.Data.DataColumn("samplingSize", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsamplingSize) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnlotNumber.MaxLength = 50 Me.columnstage.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_lotRow() As log_lotRow Return CType(Me.NewRow,log_lotRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_lotRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_lotRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_lotRowChangedEvent) Is Nothing) Then RaiseEvent log_lotRowChanged(Me, New log_lotRowChangeEvent(CType(e.Row,log_lotRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_lotRowChangingEvent) Is Nothing) Then RaiseEvent log_lotRowChanging(Me, New log_lotRowChangeEvent(CType(e.Row,log_lotRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_lotRowDeletedEvent) Is Nothing) Then RaiseEvent log_lotRowDeleted(Me, New log_lotRowChangeEvent(CType(e.Row,log_lotRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_lotRowDeletingEvent) Is Nothing) Then RaiseEvent log_lotRowDeleting(Me, New log_lotRowChangeEvent(CType(e.Row,log_lotRow), e.Action)) End If End Sub _ Public Sub Removelog_lotRow(ByVal row As log_lotRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_lotDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_passDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columntrackingno As Global.System.Data.DataColumn Private columnptNo As Global.System.Data.DataColumn Private columnstage As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columnmachine As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_pass" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property trackingnoColumn() As Global.System.Data.DataColumn Get Return Me.columntrackingno End Get End Property _ Public ReadOnly Property ptNoColumn() As Global.System.Data.DataColumn Get Return Me.columnptNo End Get End Property _ Public ReadOnly Property stageColumn() As Global.System.Data.DataColumn Get Return Me.columnstage End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property machineColumn() As Global.System.Data.DataColumn Get Return Me.columnmachine End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_passRow Get Return CType(Me.Rows(index),log_passRow) End Get End Property _ Public Event log_passRowChanging As log_passRowChangeEventHandler _ Public Event log_passRowChanged As log_passRowChangeEventHandler _ Public Event log_passRowDeleting As log_passRowChangeEventHandler _ Public Event log_passRowDeleted As log_passRowChangeEventHandler _ Public Overloads Sub Addlog_passRow(ByVal row As log_passRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_passRow(ByVal trackingno As String, ByVal ptNo As String, ByVal stage As String, ByVal quantity As Integer, ByVal machine As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_passRow Dim rowlog_passRow As log_passRow = CType(Me.NewRow,log_passRow) Dim columnValuesArray() As Object = New Object() {trackingno, ptNo, stage, quantity, machine, status, lastupdate, lastupdatedby} rowlog_passRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_passRow) Return rowlog_passRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_passDataTable = CType(MyBase.Clone,log_passDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_passDataTable() End Function _ Friend Sub InitVars() Me.columntrackingno = MyBase.Columns("trackingno") Me.columnptNo = MyBase.Columns("ptNo") Me.columnstage = MyBase.Columns("stage") Me.columnquantity = MyBase.Columns("quantity") Me.columnmachine = MyBase.Columns("machine") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columntrackingno = New Global.System.Data.DataColumn("trackingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntrackingno) Me.columnptNo = New Global.System.Data.DataColumn("ptNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptNo) Me.columnstage = New Global.System.Data.DataColumn("stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstage) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columnmachine = New Global.System.Data.DataColumn("machine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmachine) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columntrackingno.MaxLength = 11 Me.columnptNo.MaxLength = 50 Me.columnstage.MaxLength = 50 Me.columnmachine.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_passRow() As log_passRow Return CType(Me.NewRow,log_passRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_passRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_passRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_passRowChangedEvent) Is Nothing) Then RaiseEvent log_passRowChanged(Me, New log_passRowChangeEvent(CType(e.Row,log_passRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_passRowChangingEvent) Is Nothing) Then RaiseEvent log_passRowChanging(Me, New log_passRowChangeEvent(CType(e.Row,log_passRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_passRowDeletedEvent) Is Nothing) Then RaiseEvent log_passRowDeleted(Me, New log_passRowChangeEvent(CType(e.Row,log_passRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_passRowDeletingEvent) Is Nothing) Then RaiseEvent log_passRowDeleting(Me, New log_passRowChangeEvent(CType(e.Row,log_passRow), e.Action)) End If End Sub _ Public Sub Removelog_passRow(ByVal row As log_passRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_passDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_pass_serialDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columntrackingno As Global.System.Data.DataColumn Private columncardno As Global.System.Data.DataColumn Private columnstage As Global.System.Data.DataColumn Private columnmachine As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_pass_serial" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property trackingnoColumn() As Global.System.Data.DataColumn Get Return Me.columntrackingno End Get End Property _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property stageColumn() As Global.System.Data.DataColumn Get Return Me.columnstage End Get End Property _ Public ReadOnly Property machineColumn() As Global.System.Data.DataColumn Get Return Me.columnmachine End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_pass_serialRow Get Return CType(Me.Rows(index),log_pass_serialRow) End Get End Property _ Public Event log_pass_serialRowChanging As log_pass_serialRowChangeEventHandler _ Public Event log_pass_serialRowChanged As log_pass_serialRowChangeEventHandler _ Public Event log_pass_serialRowDeleting As log_pass_serialRowChangeEventHandler _ Public Event log_pass_serialRowDeleted As log_pass_serialRowChangeEventHandler _ Public Overloads Sub Addlog_pass_serialRow(ByVal row As log_pass_serialRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_pass_serialRow(ByVal trackingno As String, ByVal cardno As String, ByVal stage As String, ByVal machine As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_pass_serialRow Dim rowlog_pass_serialRow As log_pass_serialRow = CType(Me.NewRow,log_pass_serialRow) Dim columnValuesArray() As Object = New Object() {trackingno, cardno, stage, machine, status, lastupdate, lastupdatedby} rowlog_pass_serialRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_pass_serialRow) Return rowlog_pass_serialRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_pass_serialDataTable = CType(MyBase.Clone,log_pass_serialDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_pass_serialDataTable() End Function _ Friend Sub InitVars() Me.columntrackingno = MyBase.Columns("trackingno") Me.columncardno = MyBase.Columns("cardno") Me.columnstage = MyBase.Columns("stage") Me.columnmachine = MyBase.Columns("machine") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columntrackingno = New Global.System.Data.DataColumn("trackingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntrackingno) Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnstage = New Global.System.Data.DataColumn("stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstage) Me.columnmachine = New Global.System.Data.DataColumn("machine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmachine) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columntrackingno.MaxLength = 11 Me.columncardno.MaxLength = 50 Me.columnstage.MaxLength = 50 Me.columnmachine.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_pass_serialRow() As log_pass_serialRow Return CType(Me.NewRow,log_pass_serialRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_pass_serialRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_pass_serialRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_pass_serialRowChangedEvent) Is Nothing) Then RaiseEvent log_pass_serialRowChanged(Me, New log_pass_serialRowChangeEvent(CType(e.Row,log_pass_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_pass_serialRowChangingEvent) Is Nothing) Then RaiseEvent log_pass_serialRowChanging(Me, New log_pass_serialRowChangeEvent(CType(e.Row,log_pass_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_pass_serialRowDeletedEvent) Is Nothing) Then RaiseEvent log_pass_serialRowDeleted(Me, New log_pass_serialRowChangeEvent(CType(e.Row,log_pass_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_pass_serialRowDeletingEvent) Is Nothing) Then RaiseEvent log_pass_serialRowDeleting(Me, New log_pass_serialRowChangeEvent(CType(e.Row,log_pass_serialRow), e.Action)) End If End Sub _ Public Sub Removelog_pass_serialRow(ByVal row As log_pass_serialRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_pass_serialDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_PreTest_DetailDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnpoNumber As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnserialStatus As Global.System.Data.DataColumn Private columnboxNo As Global.System.Data.DataColumn Private columncnNo As Global.System.Data.DataColumn Private columnshipNo As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_PreTest_Detail" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property poNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnpoNumber End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property serialStatusColumn() As Global.System.Data.DataColumn Get Return Me.columnserialStatus End Get End Property _ Public ReadOnly Property boxNoColumn() As Global.System.Data.DataColumn Get Return Me.columnboxNo End Get End Property _ Public ReadOnly Property cnNoColumn() As Global.System.Data.DataColumn Get Return Me.columncnNo End Get End Property _ Public ReadOnly Property shipNoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipNo End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_PreTest_DetailRow Get Return CType(Me.Rows(index),log_PreTest_DetailRow) End Get End Property _ Public Event log_PreTest_DetailRowChanging As log_PreTest_DetailRowChangeEventHandler _ Public Event log_PreTest_DetailRowChanged As log_PreTest_DetailRowChangeEventHandler _ Public Event log_PreTest_DetailRowDeleting As log_PreTest_DetailRowChangeEventHandler _ Public Event log_PreTest_DetailRowDeleted As log_PreTest_DetailRowChangeEventHandler _ Public Overloads Sub Addlog_PreTest_DetailRow(ByVal row As log_PreTest_DetailRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_PreTest_DetailRow(ByVal poNumber As String, ByVal poLine As String, ByVal serialno As String, ByVal serialStatus As String, ByVal boxNo As String, ByVal cnNo As String, ByVal shipNo As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_PreTest_DetailRow Dim rowlog_PreTest_DetailRow As log_PreTest_DetailRow = CType(Me.NewRow,log_PreTest_DetailRow) Dim columnValuesArray() As Object = New Object() {poNumber, poLine, serialno, serialStatus, boxNo, cnNo, shipNo, lastupdate, lastupdatedby} rowlog_PreTest_DetailRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_PreTest_DetailRow) Return rowlog_PreTest_DetailRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_PreTest_DetailDataTable = CType(MyBase.Clone,log_PreTest_DetailDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_PreTest_DetailDataTable() End Function _ Friend Sub InitVars() Me.columnpoNumber = MyBase.Columns("poNumber") Me.columnpoLine = MyBase.Columns("poLine") Me.columnserialno = MyBase.Columns("serialno") Me.columnserialStatus = MyBase.Columns("serialStatus") Me.columnboxNo = MyBase.Columns("boxNo") Me.columncnNo = MyBase.Columns("cnNo") Me.columnshipNo = MyBase.Columns("shipNo") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnpoNumber = New Global.System.Data.DataColumn("poNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoNumber) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnserialStatus = New Global.System.Data.DataColumn("serialStatus", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialStatus) Me.columnboxNo = New Global.System.Data.DataColumn("boxNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnboxNo) Me.columncnNo = New Global.System.Data.DataColumn("cnNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncnNo) Me.columnshipNo = New Global.System.Data.DataColumn("shipNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipNo) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnpoNumber.MaxLength = 50 Me.columnpoLine.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnserialStatus.MaxLength = 50 Me.columnboxNo.MaxLength = 50 Me.columncnNo.MaxLength = 50 Me.columnshipNo.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_PreTest_DetailRow() As log_PreTest_DetailRow Return CType(Me.NewRow,log_PreTest_DetailRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_PreTest_DetailRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_PreTest_DetailRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_PreTest_DetailRowChangedEvent) Is Nothing) Then RaiseEvent log_PreTest_DetailRowChanged(Me, New log_PreTest_DetailRowChangeEvent(CType(e.Row,log_PreTest_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_PreTest_DetailRowChangingEvent) Is Nothing) Then RaiseEvent log_PreTest_DetailRowChanging(Me, New log_PreTest_DetailRowChangeEvent(CType(e.Row,log_PreTest_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_PreTest_DetailRowDeletedEvent) Is Nothing) Then RaiseEvent log_PreTest_DetailRowDeleted(Me, New log_PreTest_DetailRowChangeEvent(CType(e.Row,log_PreTest_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_PreTest_DetailRowDeletingEvent) Is Nothing) Then RaiseEvent log_PreTest_DetailRowDeleting(Me, New log_PreTest_DetailRowChangeEvent(CType(e.Row,log_PreTest_DetailRow), e.Action)) End If End Sub _ Public Sub Removelog_PreTest_DetailRow(ByVal row As log_PreTest_DetailRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_PreTest_DetailDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_repairDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columntrackingno As Global.System.Data.DataColumn Private columnptNo As Global.System.Data.DataColumn Private columnstage As Global.System.Data.DataColumn Private columnmachine As Global.System.Data.DataColumn Private columncategory As Global.System.Data.DataColumn Private columndefect As Global.System.Data.DataColumn Private columnlocation As Global.System.Data.DataColumn Private columndetails As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columnunitQuantity As Global.System.Data.DataColumn Private columnaddinfo As Global.System.Data.DataColumn Private columnserialAffected As Global.System.Data.DataColumn Private columncomponent As Global.System.Data.DataColumn Private columnremarks As Global.System.Data.DataColumn Private columnrejectDate As Global.System.Data.DataColumn Private columnrejectUser As Global.System.Data.DataColumn Private columnrepairDate As Global.System.Data.DataColumn Private columnrepairUser As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_repair" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property trackingnoColumn() As Global.System.Data.DataColumn Get Return Me.columntrackingno End Get End Property _ Public ReadOnly Property ptNoColumn() As Global.System.Data.DataColumn Get Return Me.columnptNo End Get End Property _ Public ReadOnly Property stageColumn() As Global.System.Data.DataColumn Get Return Me.columnstage End Get End Property _ Public ReadOnly Property machineColumn() As Global.System.Data.DataColumn Get Return Me.columnmachine End Get End Property _ Public ReadOnly Property categoryColumn() As Global.System.Data.DataColumn Get Return Me.columncategory End Get End Property _ Public ReadOnly Property defectColumn() As Global.System.Data.DataColumn Get Return Me.columndefect End Get End Property _ Public ReadOnly Property locationColumn() As Global.System.Data.DataColumn Get Return Me.columnlocation End Get End Property _ Public ReadOnly Property detailsColumn() As Global.System.Data.DataColumn Get Return Me.columndetails End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property unitQuantityColumn() As Global.System.Data.DataColumn Get Return Me.columnunitQuantity End Get End Property _ Public ReadOnly Property addinfoColumn() As Global.System.Data.DataColumn Get Return Me.columnaddinfo End Get End Property _ Public ReadOnly Property serialAffectedColumn() As Global.System.Data.DataColumn Get Return Me.columnserialAffected End Get End Property _ Public ReadOnly Property componentColumn() As Global.System.Data.DataColumn Get Return Me.columncomponent End Get End Property _ Public ReadOnly Property remarksColumn() As Global.System.Data.DataColumn Get Return Me.columnremarks End Get End Property _ Public ReadOnly Property rejectDateColumn() As Global.System.Data.DataColumn Get Return Me.columnrejectDate End Get End Property _ Public ReadOnly Property rejectUserColumn() As Global.System.Data.DataColumn Get Return Me.columnrejectUser End Get End Property _ Public ReadOnly Property repairDateColumn() As Global.System.Data.DataColumn Get Return Me.columnrepairDate End Get End Property _ Public ReadOnly Property repairUserColumn() As Global.System.Data.DataColumn Get Return Me.columnrepairUser End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_repairRow Get Return CType(Me.Rows(index),log_repairRow) End Get End Property _ Public Event log_repairRowChanging As log_repairRowChangeEventHandler _ Public Event log_repairRowChanged As log_repairRowChangeEventHandler _ Public Event log_repairRowDeleting As log_repairRowChangeEventHandler _ Public Event log_repairRowDeleted As log_repairRowChangeEventHandler _ Public Overloads Sub Addlog_repairRow(ByVal row As log_repairRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_repairRow( _ ByVal trackingno As String, _ ByVal ptNo As String, _ ByVal stage As String, _ ByVal machine As String, _ ByVal category As String, _ ByVal defect As String, _ ByVal location As String, _ ByVal details As String, _ ByVal status As String, _ ByVal quantity As Integer, _ ByVal unitQuantity As Integer, _ ByVal addinfo As String, _ ByVal serialAffected As String, _ ByVal component As String, _ ByVal remarks As String, _ ByVal rejectDate As Date, _ ByVal rejectUser As String, _ ByVal repairDate As Date, _ ByVal repairUser As String, _ ByVal lastupdate As Date, _ ByVal lastupdatedby As String) As log_repairRow Dim rowlog_repairRow As log_repairRow = CType(Me.NewRow,log_repairRow) Dim columnValuesArray() As Object = New Object() {trackingno, ptNo, stage, machine, category, defect, location, details, status, quantity, unitQuantity, addinfo, serialAffected, component, remarks, rejectDate, rejectUser, repairDate, repairUser, lastupdate, lastupdatedby} rowlog_repairRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_repairRow) Return rowlog_repairRow End Function _ Public Function FindBytrackingno(ByVal trackingno As String) As log_repairRow Return CType(Me.Rows.Find(New Object() {trackingno}),log_repairRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_repairDataTable = CType(MyBase.Clone,log_repairDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_repairDataTable() End Function _ Friend Sub InitVars() Me.columntrackingno = MyBase.Columns("trackingno") Me.columnptNo = MyBase.Columns("ptNo") Me.columnstage = MyBase.Columns("stage") Me.columnmachine = MyBase.Columns("machine") Me.columncategory = MyBase.Columns("category") Me.columndefect = MyBase.Columns("defect") Me.columnlocation = MyBase.Columns("location") Me.columndetails = MyBase.Columns("details") Me.columnstatus = MyBase.Columns("status") Me.columnquantity = MyBase.Columns("quantity") Me.columnunitQuantity = MyBase.Columns("unitQuantity") Me.columnaddinfo = MyBase.Columns("addinfo") Me.columnserialAffected = MyBase.Columns("serialAffected") Me.columncomponent = MyBase.Columns("component") Me.columnremarks = MyBase.Columns("remarks") Me.columnrejectDate = MyBase.Columns("rejectDate") Me.columnrejectUser = MyBase.Columns("rejectUser") Me.columnrepairDate = MyBase.Columns("repairDate") Me.columnrepairUser = MyBase.Columns("repairUser") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columntrackingno = New Global.System.Data.DataColumn("trackingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntrackingno) Me.columnptNo = New Global.System.Data.DataColumn("ptNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptNo) Me.columnstage = New Global.System.Data.DataColumn("stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstage) Me.columnmachine = New Global.System.Data.DataColumn("machine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmachine) Me.columncategory = New Global.System.Data.DataColumn("category", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncategory) Me.columndefect = New Global.System.Data.DataColumn("defect", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefect) Me.columnlocation = New Global.System.Data.DataColumn("location", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlocation) Me.columndetails = New Global.System.Data.DataColumn("details", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndetails) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columnunitQuantity = New Global.System.Data.DataColumn("unitQuantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnunitQuantity) Me.columnaddinfo = New Global.System.Data.DataColumn("addinfo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnaddinfo) Me.columnserialAffected = New Global.System.Data.DataColumn("serialAffected", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialAffected) Me.columncomponent = New Global.System.Data.DataColumn("component", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncomponent) Me.columnremarks = New Global.System.Data.DataColumn("remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnremarks) Me.columnrejectDate = New Global.System.Data.DataColumn("rejectDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrejectDate) Me.columnrejectUser = New Global.System.Data.DataColumn("rejectUser", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrejectUser) Me.columnrepairDate = New Global.System.Data.DataColumn("repairDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrepairDate) Me.columnrepairUser = New Global.System.Data.DataColumn("repairUser", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrepairUser) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columntrackingno}, true)) Me.columntrackingno.AllowDBNull = false Me.columntrackingno.Unique = true Me.columntrackingno.MaxLength = 11 Me.columnptNo.MaxLength = 50 Me.columnstage.MaxLength = 50 Me.columnmachine.MaxLength = 50 Me.columncategory.MaxLength = 50 Me.columndefect.MaxLength = 50 Me.columnlocation.MaxLength = 50 Me.columndetails.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnaddinfo.MaxLength = 150 Me.columnserialAffected.MaxLength = 50 Me.columncomponent.MaxLength = 50 Me.columnremarks.MaxLength = 150 Me.columnrejectUser.MaxLength = 50 Me.columnrepairUser.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_repairRow() As log_repairRow Return CType(Me.NewRow,log_repairRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_repairRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_repairRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_repairRowChangedEvent) Is Nothing) Then RaiseEvent log_repairRowChanged(Me, New log_repairRowChangeEvent(CType(e.Row,log_repairRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_repairRowChangingEvent) Is Nothing) Then RaiseEvent log_repairRowChanging(Me, New log_repairRowChangeEvent(CType(e.Row,log_repairRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_repairRowDeletedEvent) Is Nothing) Then RaiseEvent log_repairRowDeleted(Me, New log_repairRowChangeEvent(CType(e.Row,log_repairRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_repairRowDeletingEvent) Is Nothing) Then RaiseEvent log_repairRowDeleting(Me, New log_repairRowChangeEvent(CType(e.Row,log_repairRow), e.Action)) End If End Sub _ Public Sub Removelog_repairRow(ByVal row As log_repairRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_repairDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_repair_faDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columntrackingno As Global.System.Data.DataColumn Private columnptNo As Global.System.Data.DataColumn Private columnstage As Global.System.Data.DataColumn Private columnmachine As Global.System.Data.DataColumn Private columncategory As Global.System.Data.DataColumn Private columndefect As Global.System.Data.DataColumn Private columnlocation As Global.System.Data.DataColumn Private columndetails As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columnunitQuantity As Global.System.Data.DataColumn Private columnaddinfo As Global.System.Data.DataColumn Private columnserialAffected As Global.System.Data.DataColumn Private columncomponent As Global.System.Data.DataColumn Private columnremarks As Global.System.Data.DataColumn Private columnrejectDate As Global.System.Data.DataColumn Private columnrejectUser As Global.System.Data.DataColumn Private columnrepairDate As Global.System.Data.DataColumn Private columnrepairUser As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_repair_fa" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property trackingnoColumn() As Global.System.Data.DataColumn Get Return Me.columntrackingno End Get End Property _ Public ReadOnly Property ptNoColumn() As Global.System.Data.DataColumn Get Return Me.columnptNo End Get End Property _ Public ReadOnly Property stageColumn() As Global.System.Data.DataColumn Get Return Me.columnstage End Get End Property _ Public ReadOnly Property machineColumn() As Global.System.Data.DataColumn Get Return Me.columnmachine End Get End Property _ Public ReadOnly Property categoryColumn() As Global.System.Data.DataColumn Get Return Me.columncategory End Get End Property _ Public ReadOnly Property defectColumn() As Global.System.Data.DataColumn Get Return Me.columndefect End Get End Property _ Public ReadOnly Property locationColumn() As Global.System.Data.DataColumn Get Return Me.columnlocation End Get End Property _ Public ReadOnly Property detailsColumn() As Global.System.Data.DataColumn Get Return Me.columndetails End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property unitQuantityColumn() As Global.System.Data.DataColumn Get Return Me.columnunitQuantity End Get End Property _ Public ReadOnly Property addinfoColumn() As Global.System.Data.DataColumn Get Return Me.columnaddinfo End Get End Property _ Public ReadOnly Property serialAffectedColumn() As Global.System.Data.DataColumn Get Return Me.columnserialAffected End Get End Property _ Public ReadOnly Property componentColumn() As Global.System.Data.DataColumn Get Return Me.columncomponent End Get End Property _ Public ReadOnly Property remarksColumn() As Global.System.Data.DataColumn Get Return Me.columnremarks End Get End Property _ Public ReadOnly Property rejectDateColumn() As Global.System.Data.DataColumn Get Return Me.columnrejectDate End Get End Property _ Public ReadOnly Property rejectUserColumn() As Global.System.Data.DataColumn Get Return Me.columnrejectUser End Get End Property _ Public ReadOnly Property repairDateColumn() As Global.System.Data.DataColumn Get Return Me.columnrepairDate End Get End Property _ Public ReadOnly Property repairUserColumn() As Global.System.Data.DataColumn Get Return Me.columnrepairUser End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_repair_faRow Get Return CType(Me.Rows(index),log_repair_faRow) End Get End Property _ Public Event log_repair_faRowChanging As log_repair_faRowChangeEventHandler _ Public Event log_repair_faRowChanged As log_repair_faRowChangeEventHandler _ Public Event log_repair_faRowDeleting As log_repair_faRowChangeEventHandler _ Public Event log_repair_faRowDeleted As log_repair_faRowChangeEventHandler _ Public Overloads Sub Addlog_repair_faRow(ByVal row As log_repair_faRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_repair_faRow( _ ByVal trackingno As String, _ ByVal ptNo As String, _ ByVal stage As String, _ ByVal machine As String, _ ByVal category As String, _ ByVal defect As String, _ ByVal location As String, _ ByVal details As String, _ ByVal status As String, _ ByVal quantity As Integer, _ ByVal unitQuantity As Integer, _ ByVal addinfo As String, _ ByVal serialAffected As String, _ ByVal component As String, _ ByVal remarks As String, _ ByVal rejectDate As Date, _ ByVal rejectUser As String, _ ByVal repairDate As Date, _ ByVal repairUser As String, _ ByVal lastupdate As Date, _ ByVal lastupdatedby As String) As log_repair_faRow Dim rowlog_repair_faRow As log_repair_faRow = CType(Me.NewRow,log_repair_faRow) Dim columnValuesArray() As Object = New Object() {trackingno, ptNo, stage, machine, category, defect, location, details, status, quantity, unitQuantity, addinfo, serialAffected, component, remarks, rejectDate, rejectUser, repairDate, repairUser, lastupdate, lastupdatedby} rowlog_repair_faRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_repair_faRow) Return rowlog_repair_faRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_repair_faDataTable = CType(MyBase.Clone,log_repair_faDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_repair_faDataTable() End Function _ Friend Sub InitVars() Me.columntrackingno = MyBase.Columns("trackingno") Me.columnptNo = MyBase.Columns("ptNo") Me.columnstage = MyBase.Columns("stage") Me.columnmachine = MyBase.Columns("machine") Me.columncategory = MyBase.Columns("category") Me.columndefect = MyBase.Columns("defect") Me.columnlocation = MyBase.Columns("location") Me.columndetails = MyBase.Columns("details") Me.columnstatus = MyBase.Columns("status") Me.columnquantity = MyBase.Columns("quantity") Me.columnunitQuantity = MyBase.Columns("unitQuantity") Me.columnaddinfo = MyBase.Columns("addinfo") Me.columnserialAffected = MyBase.Columns("serialAffected") Me.columncomponent = MyBase.Columns("component") Me.columnremarks = MyBase.Columns("remarks") Me.columnrejectDate = MyBase.Columns("rejectDate") Me.columnrejectUser = MyBase.Columns("rejectUser") Me.columnrepairDate = MyBase.Columns("repairDate") Me.columnrepairUser = MyBase.Columns("repairUser") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columntrackingno = New Global.System.Data.DataColumn("trackingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntrackingno) Me.columnptNo = New Global.System.Data.DataColumn("ptNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptNo) Me.columnstage = New Global.System.Data.DataColumn("stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstage) Me.columnmachine = New Global.System.Data.DataColumn("machine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmachine) Me.columncategory = New Global.System.Data.DataColumn("category", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncategory) Me.columndefect = New Global.System.Data.DataColumn("defect", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefect) Me.columnlocation = New Global.System.Data.DataColumn("location", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlocation) Me.columndetails = New Global.System.Data.DataColumn("details", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndetails) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columnunitQuantity = New Global.System.Data.DataColumn("unitQuantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnunitQuantity) Me.columnaddinfo = New Global.System.Data.DataColumn("addinfo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnaddinfo) Me.columnserialAffected = New Global.System.Data.DataColumn("serialAffected", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialAffected) Me.columncomponent = New Global.System.Data.DataColumn("component", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncomponent) Me.columnremarks = New Global.System.Data.DataColumn("remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnremarks) Me.columnrejectDate = New Global.System.Data.DataColumn("rejectDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrejectDate) Me.columnrejectUser = New Global.System.Data.DataColumn("rejectUser", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrejectUser) Me.columnrepairDate = New Global.System.Data.DataColumn("repairDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrepairDate) Me.columnrepairUser = New Global.System.Data.DataColumn("repairUser", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrepairUser) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columntrackingno.AllowDBNull = false Me.columntrackingno.MaxLength = 11 Me.columnptNo.MaxLength = 50 Me.columnstage.MaxLength = 50 Me.columnmachine.MaxLength = 50 Me.columncategory.MaxLength = 50 Me.columndefect.MaxLength = 50 Me.columnlocation.MaxLength = 50 Me.columndetails.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnaddinfo.MaxLength = 150 Me.columnserialAffected.MaxLength = 50 Me.columncomponent.MaxLength = 50 Me.columnremarks.MaxLength = 150 Me.columnrejectUser.MaxLength = 50 Me.columnrepairUser.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_repair_faRow() As log_repair_faRow Return CType(Me.NewRow,log_repair_faRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_repair_faRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_repair_faRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_repair_faRowChangedEvent) Is Nothing) Then RaiseEvent log_repair_faRowChanged(Me, New log_repair_faRowChangeEvent(CType(e.Row,log_repair_faRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_repair_faRowChangingEvent) Is Nothing) Then RaiseEvent log_repair_faRowChanging(Me, New log_repair_faRowChangeEvent(CType(e.Row,log_repair_faRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_repair_faRowDeletedEvent) Is Nothing) Then RaiseEvent log_repair_faRowDeleted(Me, New log_repair_faRowChangeEvent(CType(e.Row,log_repair_faRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_repair_faRowDeletingEvent) Is Nothing) Then RaiseEvent log_repair_faRowDeleting(Me, New log_repair_faRowChangeEvent(CType(e.Row,log_repair_faRow), e.Action)) End If End Sub _ Public Sub Removelog_repair_faRow(ByVal row As log_repair_faRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_repair_faDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_repair_serialDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columntrackingno As Global.System.Data.DataColumn Private columncardno As Global.System.Data.DataColumn Private columnstage As Global.System.Data.DataColumn Private columnmachine As Global.System.Data.DataColumn Private columncategory As Global.System.Data.DataColumn Private columndefect As Global.System.Data.DataColumn Private columnlocation As Global.System.Data.DataColumn Private columndetails As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnaddinfo As Global.System.Data.DataColumn Private columnserialAffected As Global.System.Data.DataColumn Private columncomponent As Global.System.Data.DataColumn Private columnremarks As Global.System.Data.DataColumn Private columnrejectDate As Global.System.Data.DataColumn Private columnrejectUser As Global.System.Data.DataColumn Private columnrepairDate As Global.System.Data.DataColumn Private columnrepairUser As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_repair_serial" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property trackingnoColumn() As Global.System.Data.DataColumn Get Return Me.columntrackingno End Get End Property _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property stageColumn() As Global.System.Data.DataColumn Get Return Me.columnstage End Get End Property _ Public ReadOnly Property machineColumn() As Global.System.Data.DataColumn Get Return Me.columnmachine End Get End Property _ Public ReadOnly Property categoryColumn() As Global.System.Data.DataColumn Get Return Me.columncategory End Get End Property _ Public ReadOnly Property defectColumn() As Global.System.Data.DataColumn Get Return Me.columndefect End Get End Property _ Public ReadOnly Property locationColumn() As Global.System.Data.DataColumn Get Return Me.columnlocation End Get End Property _ Public ReadOnly Property detailsColumn() As Global.System.Data.DataColumn Get Return Me.columndetails End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property addinfoColumn() As Global.System.Data.DataColumn Get Return Me.columnaddinfo End Get End Property _ Public ReadOnly Property serialAffectedColumn() As Global.System.Data.DataColumn Get Return Me.columnserialAffected End Get End Property _ Public ReadOnly Property componentColumn() As Global.System.Data.DataColumn Get Return Me.columncomponent End Get End Property _ Public ReadOnly Property remarksColumn() As Global.System.Data.DataColumn Get Return Me.columnremarks End Get End Property _ Public ReadOnly Property rejectDateColumn() As Global.System.Data.DataColumn Get Return Me.columnrejectDate End Get End Property _ Public ReadOnly Property rejectUserColumn() As Global.System.Data.DataColumn Get Return Me.columnrejectUser End Get End Property _ Public ReadOnly Property repairDateColumn() As Global.System.Data.DataColumn Get Return Me.columnrepairDate End Get End Property _ Public ReadOnly Property repairUserColumn() As Global.System.Data.DataColumn Get Return Me.columnrepairUser End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_repair_serialRow Get Return CType(Me.Rows(index),log_repair_serialRow) End Get End Property _ Public Event log_repair_serialRowChanging As log_repair_serialRowChangeEventHandler _ Public Event log_repair_serialRowChanged As log_repair_serialRowChangeEventHandler _ Public Event log_repair_serialRowDeleting As log_repair_serialRowChangeEventHandler _ Public Event log_repair_serialRowDeleted As log_repair_serialRowChangeEventHandler _ Public Overloads Sub Addlog_repair_serialRow(ByVal row As log_repair_serialRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_repair_serialRow( _ ByVal trackingno As String, _ ByVal cardno As String, _ ByVal stage As String, _ ByVal machine As String, _ ByVal category As String, _ ByVal defect As String, _ ByVal location As String, _ ByVal details As String, _ ByVal status As String, _ ByVal addinfo As String, _ ByVal serialAffected As String, _ ByVal component As String, _ ByVal remarks As String, _ ByVal rejectDate As Date, _ ByVal rejectUser As String, _ ByVal repairDate As Date, _ ByVal repairUser As String, _ ByVal lastupdate As Date, _ ByVal lastupdatedby As String) As log_repair_serialRow Dim rowlog_repair_serialRow As log_repair_serialRow = CType(Me.NewRow,log_repair_serialRow) Dim columnValuesArray() As Object = New Object() {trackingno, cardno, stage, machine, category, defect, location, details, status, addinfo, serialAffected, component, remarks, rejectDate, rejectUser, repairDate, repairUser, lastupdate, lastupdatedby} rowlog_repair_serialRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_repair_serialRow) Return rowlog_repair_serialRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_repair_serialDataTable = CType(MyBase.Clone,log_repair_serialDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_repair_serialDataTable() End Function _ Friend Sub InitVars() Me.columntrackingno = MyBase.Columns("trackingno") Me.columncardno = MyBase.Columns("cardno") Me.columnstage = MyBase.Columns("stage") Me.columnmachine = MyBase.Columns("machine") Me.columncategory = MyBase.Columns("category") Me.columndefect = MyBase.Columns("defect") Me.columnlocation = MyBase.Columns("location") Me.columndetails = MyBase.Columns("details") Me.columnstatus = MyBase.Columns("status") Me.columnaddinfo = MyBase.Columns("addinfo") Me.columnserialAffected = MyBase.Columns("serialAffected") Me.columncomponent = MyBase.Columns("component") Me.columnremarks = MyBase.Columns("remarks") Me.columnrejectDate = MyBase.Columns("rejectDate") Me.columnrejectUser = MyBase.Columns("rejectUser") Me.columnrepairDate = MyBase.Columns("repairDate") Me.columnrepairUser = MyBase.Columns("repairUser") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columntrackingno = New Global.System.Data.DataColumn("trackingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntrackingno) Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnstage = New Global.System.Data.DataColumn("stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstage) Me.columnmachine = New Global.System.Data.DataColumn("machine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmachine) Me.columncategory = New Global.System.Data.DataColumn("category", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncategory) Me.columndefect = New Global.System.Data.DataColumn("defect", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndefect) Me.columnlocation = New Global.System.Data.DataColumn("location", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlocation) Me.columndetails = New Global.System.Data.DataColumn("details", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndetails) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnaddinfo = New Global.System.Data.DataColumn("addinfo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnaddinfo) Me.columnserialAffected = New Global.System.Data.DataColumn("serialAffected", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialAffected) Me.columncomponent = New Global.System.Data.DataColumn("component", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncomponent) Me.columnremarks = New Global.System.Data.DataColumn("remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnremarks) Me.columnrejectDate = New Global.System.Data.DataColumn("rejectDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrejectDate) Me.columnrejectUser = New Global.System.Data.DataColumn("rejectUser", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrejectUser) Me.columnrepairDate = New Global.System.Data.DataColumn("repairDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrepairDate) Me.columnrepairUser = New Global.System.Data.DataColumn("repairUser", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrepairUser) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columntrackingno.AllowDBNull = false Me.columntrackingno.MaxLength = 11 Me.columncardno.MaxLength = 50 Me.columnstage.MaxLength = 50 Me.columnmachine.MaxLength = 50 Me.columncategory.MaxLength = 50 Me.columndefect.MaxLength = 50 Me.columnlocation.MaxLength = 50 Me.columndetails.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnaddinfo.MaxLength = 150 Me.columnserialAffected.MaxLength = 50 Me.columncomponent.MaxLength = 50 Me.columnremarks.MaxLength = 150 Me.columnrejectUser.MaxLength = 50 Me.columnrepairUser.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_repair_serialRow() As log_repair_serialRow Return CType(Me.NewRow,log_repair_serialRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_repair_serialRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_repair_serialRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_repair_serialRowChangedEvent) Is Nothing) Then RaiseEvent log_repair_serialRowChanged(Me, New log_repair_serialRowChangeEvent(CType(e.Row,log_repair_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_repair_serialRowChangingEvent) Is Nothing) Then RaiseEvent log_repair_serialRowChanging(Me, New log_repair_serialRowChangeEvent(CType(e.Row,log_repair_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_repair_serialRowDeletedEvent) Is Nothing) Then RaiseEvent log_repair_serialRowDeleted(Me, New log_repair_serialRowChangeEvent(CType(e.Row,log_repair_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_repair_serialRowDeletingEvent) Is Nothing) Then RaiseEvent log_repair_serialRowDeleting(Me, New log_repair_serialRowChangeEvent(CType(e.Row,log_repair_serialRow), e.Action)) End If End Sub _ Public Sub Removelog_repair_serialRow(ByVal row As log_repair_serialRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_repair_serialDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_serialDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnbatchno As Global.System.Data.DataColumn Private columnserialStart As Global.System.Data.DataColumn Private columnserialEnd As Global.System.Data.DataColumn Private columnserialStartHex As Global.System.Data.DataColumn Private columnserialEndHex As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnrevision As Global.System.Data.DataColumn Private columnmodelRef As Global.System.Data.DataColumn Private columnmodelRefRev As Global.System.Data.DataColumn Private columnalvBatchRef As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columnremarks As Global.System.Data.DataColumn Private columnfileRef As Global.System.Data.DataColumn Private columnfileRef2 As Global.System.Data.DataColumn Private columngenerated As Global.System.Data.DataColumn Private columngeneratedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_serial" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property batchnoColumn() As Global.System.Data.DataColumn Get Return Me.columnbatchno End Get End Property _ Public ReadOnly Property serialStartColumn() As Global.System.Data.DataColumn Get Return Me.columnserialStart End Get End Property _ Public ReadOnly Property serialEndColumn() As Global.System.Data.DataColumn Get Return Me.columnserialEnd End Get End Property _ Public ReadOnly Property serialStartHexColumn() As Global.System.Data.DataColumn Get Return Me.columnserialStartHex End Get End Property _ Public ReadOnly Property serialEndHexColumn() As Global.System.Data.DataColumn Get Return Me.columnserialEndHex End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property revisionColumn() As Global.System.Data.DataColumn Get Return Me.columnrevision End Get End Property _ Public ReadOnly Property modelRefColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelRef End Get End Property _ Public ReadOnly Property modelRefRevColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelRefRev End Get End Property _ Public ReadOnly Property alvBatchRefColumn() As Global.System.Data.DataColumn Get Return Me.columnalvBatchRef End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property remarksColumn() As Global.System.Data.DataColumn Get Return Me.columnremarks End Get End Property _ Public ReadOnly Property fileRefColumn() As Global.System.Data.DataColumn Get Return Me.columnfileRef End Get End Property _ Public ReadOnly Property fileRef2Column() As Global.System.Data.DataColumn Get Return Me.columnfileRef2 End Get End Property _ Public ReadOnly Property generatedColumn() As Global.System.Data.DataColumn Get Return Me.columngenerated End Get End Property _ Public ReadOnly Property generatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columngeneratedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_serialRow Get Return CType(Me.Rows(index),log_serialRow) End Get End Property _ Public Event log_serialRowChanging As log_serialRowChangeEventHandler _ Public Event log_serialRowChanged As log_serialRowChangeEventHandler _ Public Event log_serialRowDeleting As log_serialRowChangeEventHandler _ Public Event log_serialRowDeleted As log_serialRowChangeEventHandler _ Public Overloads Sub Addlog_serialRow(ByVal row As log_serialRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_serialRow( _ ByVal batchno As String, _ ByVal serialStart As String, _ ByVal serialEnd As String, _ ByVal serialStartHex As String, _ ByVal serialEndHex As String, _ ByVal model As String, _ ByVal revision As String, _ ByVal modelRef As String, _ ByVal modelRefRev As String, _ ByVal alvBatchRef As String, _ ByVal quantity As Integer, _ ByVal remarks As String, _ ByVal fileRef As String, _ ByVal fileRef2 As String, _ ByVal generated As Date, _ ByVal generatedby As String) As log_serialRow Dim rowlog_serialRow As log_serialRow = CType(Me.NewRow,log_serialRow) Dim columnValuesArray() As Object = New Object() {batchno, serialStart, serialEnd, serialStartHex, serialEndHex, model, revision, modelRef, modelRefRev, alvBatchRef, quantity, remarks, fileRef, fileRef2, generated, generatedby} rowlog_serialRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_serialRow) Return rowlog_serialRow End Function _ Public Function FindBybatchno(ByVal batchno As String) As log_serialRow Return CType(Me.Rows.Find(New Object() {batchno}),log_serialRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_serialDataTable = CType(MyBase.Clone,log_serialDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_serialDataTable() End Function _ Friend Sub InitVars() Me.columnbatchno = MyBase.Columns("batchno") Me.columnserialStart = MyBase.Columns("serialStart") Me.columnserialEnd = MyBase.Columns("serialEnd") Me.columnserialStartHex = MyBase.Columns("serialStartHex") Me.columnserialEndHex = MyBase.Columns("serialEndHex") Me.columnmodel = MyBase.Columns("model") Me.columnrevision = MyBase.Columns("revision") Me.columnmodelRef = MyBase.Columns("modelRef") Me.columnmodelRefRev = MyBase.Columns("modelRefRev") Me.columnalvBatchRef = MyBase.Columns("alvBatchRef") Me.columnquantity = MyBase.Columns("quantity") Me.columnremarks = MyBase.Columns("remarks") Me.columnfileRef = MyBase.Columns("fileRef") Me.columnfileRef2 = MyBase.Columns("fileRef2") Me.columngenerated = MyBase.Columns("generated") Me.columngeneratedby = MyBase.Columns("generatedby") End Sub _ Private Sub InitClass() Me.columnbatchno = New Global.System.Data.DataColumn("batchno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatchno) Me.columnserialStart = New Global.System.Data.DataColumn("serialStart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialStart) Me.columnserialEnd = New Global.System.Data.DataColumn("serialEnd", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialEnd) Me.columnserialStartHex = New Global.System.Data.DataColumn("serialStartHex", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialStartHex) Me.columnserialEndHex = New Global.System.Data.DataColumn("serialEndHex", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialEndHex) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnrevision = New Global.System.Data.DataColumn("revision", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrevision) Me.columnmodelRef = New Global.System.Data.DataColumn("modelRef", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelRef) Me.columnmodelRefRev = New Global.System.Data.DataColumn("modelRefRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelRefRev) Me.columnalvBatchRef = New Global.System.Data.DataColumn("alvBatchRef", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnalvBatchRef) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columnremarks = New Global.System.Data.DataColumn("remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnremarks) Me.columnfileRef = New Global.System.Data.DataColumn("fileRef", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnfileRef) Me.columnfileRef2 = New Global.System.Data.DataColumn("fileRef2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnfileRef2) Me.columngenerated = New Global.System.Data.DataColumn("generated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columngenerated) Me.columngeneratedby = New Global.System.Data.DataColumn("generatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columngeneratedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnbatchno}, true)) Me.columnbatchno.AllowDBNull = false Me.columnbatchno.Unique = true Me.columnbatchno.MaxLength = 50 Me.columnserialStart.MaxLength = 50 Me.columnserialEnd.MaxLength = 50 Me.columnserialStartHex.MaxLength = 50 Me.columnserialEndHex.MaxLength = 50 Me.columnmodel.MaxLength = 50 Me.columnrevision.MaxLength = 10 Me.columnmodelRef.MaxLength = 50 Me.columnmodelRefRev.MaxLength = 10 Me.columnalvBatchRef.MaxLength = 50 Me.columnremarks.MaxLength = 100 Me.columnfileRef.MaxLength = 200 Me.columnfileRef2.MaxLength = 200 Me.columngeneratedby.MaxLength = 50 End Sub _ Public Function Newlog_serialRow() As log_serialRow Return CType(Me.NewRow,log_serialRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_serialRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_serialRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_serialRowChangedEvent) Is Nothing) Then RaiseEvent log_serialRowChanged(Me, New log_serialRowChangeEvent(CType(e.Row,log_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_serialRowChangingEvent) Is Nothing) Then RaiseEvent log_serialRowChanging(Me, New log_serialRowChangeEvent(CType(e.Row,log_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_serialRowDeletedEvent) Is Nothing) Then RaiseEvent log_serialRowDeleted(Me, New log_serialRowChangeEvent(CType(e.Row,log_serialRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_serialRowDeletingEvent) Is Nothing) Then RaiseEvent log_serialRowDeleting(Me, New log_serialRowChangeEvent(CType(e.Row,log_serialRow), e.Action)) End If End Sub _ Public Sub Removelog_serialRow(ByVal row As log_serialRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_serialDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_SH_DetailDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnshipNo As Global.System.Data.DataColumn Private columncnNo As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_SH_Detail" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property shipNoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipNo End Get End Property _ Public ReadOnly Property cnNoColumn() As Global.System.Data.DataColumn Get Return Me.columncnNo End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_SH_DetailRow Get Return CType(Me.Rows(index),log_SH_DetailRow) End Get End Property _ Public Event log_SH_DetailRowChanging As log_SH_DetailRowChangeEventHandler _ Public Event log_SH_DetailRowChanged As log_SH_DetailRowChangeEventHandler _ Public Event log_SH_DetailRowDeleting As log_SH_DetailRowChangeEventHandler _ Public Event log_SH_DetailRowDeleted As log_SH_DetailRowChangeEventHandler _ Public Overloads Sub Addlog_SH_DetailRow(ByVal row As log_SH_DetailRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_SH_DetailRow(ByVal shipNo As String, ByVal cnNo As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_SH_DetailRow Dim rowlog_SH_DetailRow As log_SH_DetailRow = CType(Me.NewRow,log_SH_DetailRow) Dim columnValuesArray() As Object = New Object() {shipNo, cnNo, lastupdate, lastupdatedby} rowlog_SH_DetailRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_SH_DetailRow) Return rowlog_SH_DetailRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_SH_DetailDataTable = CType(MyBase.Clone,log_SH_DetailDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_SH_DetailDataTable() End Function _ Friend Sub InitVars() Me.columnshipNo = MyBase.Columns("shipNo") Me.columncnNo = MyBase.Columns("cnNo") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnshipNo = New Global.System.Data.DataColumn("shipNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipNo) Me.columncnNo = New Global.System.Data.DataColumn("cnNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncnNo) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnshipNo.MaxLength = 50 Me.columncnNo.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_SH_DetailRow() As log_SH_DetailRow Return CType(Me.NewRow,log_SH_DetailRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_SH_DetailRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_SH_DetailRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_SH_DetailRowChangedEvent) Is Nothing) Then RaiseEvent log_SH_DetailRowChanged(Me, New log_SH_DetailRowChangeEvent(CType(e.Row,log_SH_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_SH_DetailRowChangingEvent) Is Nothing) Then RaiseEvent log_SH_DetailRowChanging(Me, New log_SH_DetailRowChangeEvent(CType(e.Row,log_SH_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_SH_DetailRowDeletedEvent) Is Nothing) Then RaiseEvent log_SH_DetailRowDeleted(Me, New log_SH_DetailRowChangeEvent(CType(e.Row,log_SH_DetailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_SH_DetailRowDeletingEvent) Is Nothing) Then RaiseEvent log_SH_DetailRowDeleting(Me, New log_SH_DetailRowChangeEvent(CType(e.Row,log_SH_DetailRow), e.Action)) End If End Sub _ Public Sub Removelog_SH_DetailRow(ByVal row As log_SH_DetailRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_SH_DetailDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_SH_Detail_HistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnshipNo As Global.System.Data.DataColumn Private columncnNo As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_SH_Detail_Hist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property shipNoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipNo End Get End Property _ Public ReadOnly Property cnNoColumn() As Global.System.Data.DataColumn Get Return Me.columncnNo End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_SH_Detail_HistRow Get Return CType(Me.Rows(index),log_SH_Detail_HistRow) End Get End Property _ Public Event log_SH_Detail_HistRowChanging As log_SH_Detail_HistRowChangeEventHandler _ Public Event log_SH_Detail_HistRowChanged As log_SH_Detail_HistRowChangeEventHandler _ Public Event log_SH_Detail_HistRowDeleting As log_SH_Detail_HistRowChangeEventHandler _ Public Event log_SH_Detail_HistRowDeleted As log_SH_Detail_HistRowChangeEventHandler _ Public Overloads Sub Addlog_SH_Detail_HistRow(ByVal row As log_SH_Detail_HistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_SH_Detail_HistRow(ByVal shipNo As String, ByVal cnNo As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_SH_Detail_HistRow Dim rowlog_SH_Detail_HistRow As log_SH_Detail_HistRow = CType(Me.NewRow,log_SH_Detail_HistRow) Dim columnValuesArray() As Object = New Object() {Nothing, shipNo, cnNo, status, lastupdate, lastupdatedby} rowlog_SH_Detail_HistRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_SH_Detail_HistRow) Return rowlog_SH_Detail_HistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As log_SH_Detail_HistRow Return CType(Me.Rows.Find(New Object() {lineNum}),log_SH_Detail_HistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_SH_Detail_HistDataTable = CType(MyBase.Clone,log_SH_Detail_HistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_SH_Detail_HistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnshipNo = MyBase.Columns("shipNo") Me.columncnNo = MyBase.Columns("cnNo") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnshipNo = New Global.System.Data.DataColumn("shipNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipNo) Me.columncnNo = New Global.System.Data.DataColumn("cnNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncnNo) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnshipNo.MaxLength = 50 Me.columncnNo.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_SH_Detail_HistRow() As log_SH_Detail_HistRow Return CType(Me.NewRow,log_SH_Detail_HistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_SH_Detail_HistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_SH_Detail_HistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_SH_Detail_HistRowChangedEvent) Is Nothing) Then RaiseEvent log_SH_Detail_HistRowChanged(Me, New log_SH_Detail_HistRowChangeEvent(CType(e.Row,log_SH_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_SH_Detail_HistRowChangingEvent) Is Nothing) Then RaiseEvent log_SH_Detail_HistRowChanging(Me, New log_SH_Detail_HistRowChangeEvent(CType(e.Row,log_SH_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_SH_Detail_HistRowDeletedEvent) Is Nothing) Then RaiseEvent log_SH_Detail_HistRowDeleted(Me, New log_SH_Detail_HistRowChangeEvent(CType(e.Row,log_SH_Detail_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_SH_Detail_HistRowDeletingEvent) Is Nothing) Then RaiseEvent log_SH_Detail_HistRowDeleting(Me, New log_SH_Detail_HistRowChangeEvent(CType(e.Row,log_SH_Detail_HistRow), e.Action)) End If End Sub _ Public Sub Removelog_SH_Detail_HistRow(ByVal row As log_SH_Detail_HistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_SH_Detail_HistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_SH_HeaderDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnshipNo As Global.System.Data.DataColumn Private columnshipdate As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_SH_Header" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property shipNoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipNo End Get End Property _ Public ReadOnly Property shipdateColumn() As Global.System.Data.DataColumn Get Return Me.columnshipdate End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_SH_HeaderRow Get Return CType(Me.Rows(index),log_SH_HeaderRow) End Get End Property _ Public Event log_SH_HeaderRowChanging As log_SH_HeaderRowChangeEventHandler _ Public Event log_SH_HeaderRowChanged As log_SH_HeaderRowChangeEventHandler _ Public Event log_SH_HeaderRowDeleting As log_SH_HeaderRowChangeEventHandler _ Public Event log_SH_HeaderRowDeleted As log_SH_HeaderRowChangeEventHandler _ Public Overloads Sub Addlog_SH_HeaderRow(ByVal row As log_SH_HeaderRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_SH_HeaderRow(ByVal shipNo As String, ByVal shipdate As Date, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_SH_HeaderRow Dim rowlog_SH_HeaderRow As log_SH_HeaderRow = CType(Me.NewRow,log_SH_HeaderRow) Dim columnValuesArray() As Object = New Object() {shipNo, shipdate, lastupdate, lastupdatedby} rowlog_SH_HeaderRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_SH_HeaderRow) Return rowlog_SH_HeaderRow End Function _ Public Function FindByshipNo(ByVal shipNo As String) As log_SH_HeaderRow Return CType(Me.Rows.Find(New Object() {shipNo}),log_SH_HeaderRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_SH_HeaderDataTable = CType(MyBase.Clone,log_SH_HeaderDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_SH_HeaderDataTable() End Function _ Friend Sub InitVars() Me.columnshipNo = MyBase.Columns("shipNo") Me.columnshipdate = MyBase.Columns("shipdate") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnshipNo = New Global.System.Data.DataColumn("shipNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipNo) Me.columnshipdate = New Global.System.Data.DataColumn("shipdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipdate) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnshipNo}, true)) Me.columnshipNo.AllowDBNull = false Me.columnshipNo.Unique = true Me.columnshipNo.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_SH_HeaderRow() As log_SH_HeaderRow Return CType(Me.NewRow,log_SH_HeaderRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_SH_HeaderRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_SH_HeaderRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_SH_HeaderRowChangedEvent) Is Nothing) Then RaiseEvent log_SH_HeaderRowChanged(Me, New log_SH_HeaderRowChangeEvent(CType(e.Row,log_SH_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_SH_HeaderRowChangingEvent) Is Nothing) Then RaiseEvent log_SH_HeaderRowChanging(Me, New log_SH_HeaderRowChangeEvent(CType(e.Row,log_SH_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_SH_HeaderRowDeletedEvent) Is Nothing) Then RaiseEvent log_SH_HeaderRowDeleted(Me, New log_SH_HeaderRowChangeEvent(CType(e.Row,log_SH_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_SH_HeaderRowDeletingEvent) Is Nothing) Then RaiseEvent log_SH_HeaderRowDeleting(Me, New log_SH_HeaderRowChangeEvent(CType(e.Row,log_SH_HeaderRow), e.Action)) End If End Sub _ Public Sub Removelog_SH_HeaderRow(ByVal row As log_SH_HeaderRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_SH_HeaderDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class log_SH_Header_HistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnshipNo As Global.System.Data.DataColumn Private columnshipdate As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "log_SH_Header_Hist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property shipNoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipNo End Get End Property _ Public ReadOnly Property shipdateColumn() As Global.System.Data.DataColumn Get Return Me.columnshipdate End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As log_SH_Header_HistRow Get Return CType(Me.Rows(index),log_SH_Header_HistRow) End Get End Property _ Public Event log_SH_Header_HistRowChanging As log_SH_Header_HistRowChangeEventHandler _ Public Event log_SH_Header_HistRowChanged As log_SH_Header_HistRowChangeEventHandler _ Public Event log_SH_Header_HistRowDeleting As log_SH_Header_HistRowChangeEventHandler _ Public Event log_SH_Header_HistRowDeleted As log_SH_Header_HistRowChangeEventHandler _ Public Overloads Sub Addlog_SH_Header_HistRow(ByVal row As log_SH_Header_HistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addlog_SH_Header_HistRow(ByVal shipNo As String, ByVal shipdate As Date, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As log_SH_Header_HistRow Dim rowlog_SH_Header_HistRow As log_SH_Header_HistRow = CType(Me.NewRow,log_SH_Header_HistRow) Dim columnValuesArray() As Object = New Object() {Nothing, shipNo, shipdate, status, lastupdate, lastupdatedby} rowlog_SH_Header_HistRow.ItemArray = columnValuesArray Me.Rows.Add(rowlog_SH_Header_HistRow) Return rowlog_SH_Header_HistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As log_SH_Header_HistRow Return CType(Me.Rows.Find(New Object() {lineNum}),log_SH_Header_HistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As log_SH_Header_HistDataTable = CType(MyBase.Clone,log_SH_Header_HistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New log_SH_Header_HistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnshipNo = MyBase.Columns("shipNo") Me.columnshipdate = MyBase.Columns("shipdate") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnshipNo = New Global.System.Data.DataColumn("shipNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipNo) Me.columnshipdate = New Global.System.Data.DataColumn("shipdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipdate) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnshipNo.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newlog_SH_Header_HistRow() As log_SH_Header_HistRow Return CType(Me.NewRow,log_SH_Header_HistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New log_SH_Header_HistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(log_SH_Header_HistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.log_SH_Header_HistRowChangedEvent) Is Nothing) Then RaiseEvent log_SH_Header_HistRowChanged(Me, New log_SH_Header_HistRowChangeEvent(CType(e.Row,log_SH_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.log_SH_Header_HistRowChangingEvent) Is Nothing) Then RaiseEvent log_SH_Header_HistRowChanging(Me, New log_SH_Header_HistRowChangeEvent(CType(e.Row,log_SH_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.log_SH_Header_HistRowDeletedEvent) Is Nothing) Then RaiseEvent log_SH_Header_HistRowDeleted(Me, New log_SH_Header_HistRowChangeEvent(CType(e.Row,log_SH_Header_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.log_SH_Header_HistRowDeletingEvent) Is Nothing) Then RaiseEvent log_SH_Header_HistRowDeleting(Me, New log_SH_Header_HistRowChangeEvent(CType(e.Row,log_SH_Header_HistRow), e.Action)) End If End Sub _ Public Sub Removelog_SH_Header_HistRow(ByVal row As log_SH_Header_HistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "log_SH_Header_HistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class lotNoDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlotNo As Global.System.Data.DataColumn Private columnreferenceNo As Global.System.Data.DataColumn Private columnpartno As Global.System.Data.DataColumn Private columnstage As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnsamplingSize As Global.System.Data.DataColumn Private columnstarttime As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "lotNo" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lotNoColumn() As Global.System.Data.DataColumn Get Return Me.columnlotNo End Get End Property _ Public ReadOnly Property referenceNoColumn() As Global.System.Data.DataColumn Get Return Me.columnreferenceNo End Get End Property _ Public ReadOnly Property partnoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartno End Get End Property _ Public ReadOnly Property stageColumn() As Global.System.Data.DataColumn Get Return Me.columnstage End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property samplingSizeColumn() As Global.System.Data.DataColumn Get Return Me.columnsamplingSize End Get End Property _ Public ReadOnly Property starttimeColumn() As Global.System.Data.DataColumn Get Return Me.columnstarttime End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As lotNoRow Get Return CType(Me.Rows(index),lotNoRow) End Get End Property _ Public Event lotNoRowChanging As lotNoRowChangeEventHandler _ Public Event lotNoRowChanged As lotNoRowChangeEventHandler _ Public Event lotNoRowDeleting As lotNoRowChangeEventHandler _ Public Event lotNoRowDeleted As lotNoRowChangeEventHandler _ Public Overloads Sub AddlotNoRow(ByVal row As lotNoRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddlotNoRow(ByVal lotNo As String, ByVal referenceNo As String, ByVal partno As String, ByVal stage As String, ByVal status As String, ByVal samplingSize As Integer, ByVal starttime As Date, ByVal lastupdate As Date, ByVal lastupdatedby As String) As lotNoRow Dim rowlotNoRow As lotNoRow = CType(Me.NewRow,lotNoRow) Dim columnValuesArray() As Object = New Object() {lotNo, referenceNo, partno, stage, status, samplingSize, starttime, lastupdate, lastupdatedby} rowlotNoRow.ItemArray = columnValuesArray Me.Rows.Add(rowlotNoRow) Return rowlotNoRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As lotNoDataTable = CType(MyBase.Clone,lotNoDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New lotNoDataTable() End Function _ Friend Sub InitVars() Me.columnlotNo = MyBase.Columns("lotNo") Me.columnreferenceNo = MyBase.Columns("referenceNo") Me.columnpartno = MyBase.Columns("partno") Me.columnstage = MyBase.Columns("stage") Me.columnstatus = MyBase.Columns("status") Me.columnsamplingSize = MyBase.Columns("samplingSize") Me.columnstarttime = MyBase.Columns("starttime") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlotNo = New Global.System.Data.DataColumn("lotNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlotNo) Me.columnreferenceNo = New Global.System.Data.DataColumn("referenceNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnreferenceNo) Me.columnpartno = New Global.System.Data.DataColumn("partno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartno) Me.columnstage = New Global.System.Data.DataColumn("stage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstage) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnsamplingSize = New Global.System.Data.DataColumn("samplingSize", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsamplingSize) Me.columnstarttime = New Global.System.Data.DataColumn("starttime", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstarttime) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnlotNo.MaxLength = 50 Me.columnreferenceNo.MaxLength = 50 Me.columnpartno.MaxLength = 50 Me.columnstage.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewlotNoRow() As lotNoRow Return CType(Me.NewRow,lotNoRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New lotNoRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(lotNoRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.lotNoRowChangedEvent) Is Nothing) Then RaiseEvent lotNoRowChanged(Me, New lotNoRowChangeEvent(CType(e.Row,lotNoRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.lotNoRowChangingEvent) Is Nothing) Then RaiseEvent lotNoRowChanging(Me, New lotNoRowChangeEvent(CType(e.Row,lotNoRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.lotNoRowDeletedEvent) Is Nothing) Then RaiseEvent lotNoRowDeleted(Me, New lotNoRowChangeEvent(CType(e.Row,lotNoRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.lotNoRowDeletingEvent) Is Nothing) Then RaiseEvent lotNoRowDeleting(Me, New lotNoRowChangeEvent(CType(e.Row,lotNoRow), e.Action)) End If End Sub _ Public Sub RemovelotNoRow(ByVal row As lotNoRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "lotNoDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class LotNumberDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnLotnumber As Global.System.Data.DataColumn Private columnLotStatus As Global.System.Data.DataColumn Private columnCreatedDate As Global.System.Data.DataColumn Private columnCreatedBy As Global.System.Data.DataColumn Private columnUpdatedDate As Global.System.Data.DataColumn Private columnUpdatedBy As Global.System.Data.DataColumn Private columnSampleQuantity As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "LotNumber" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property LotnumberColumn() As Global.System.Data.DataColumn Get Return Me.columnLotnumber End Get End Property _ Public ReadOnly Property LotStatusColumn() As Global.System.Data.DataColumn Get Return Me.columnLotStatus End Get End Property _ Public ReadOnly Property CreatedDateColumn() As Global.System.Data.DataColumn Get Return Me.columnCreatedDate End Get End Property _ Public ReadOnly Property CreatedByColumn() As Global.System.Data.DataColumn Get Return Me.columnCreatedBy End Get End Property _ Public ReadOnly Property UpdatedDateColumn() As Global.System.Data.DataColumn Get Return Me.columnUpdatedDate End Get End Property _ Public ReadOnly Property UpdatedByColumn() As Global.System.Data.DataColumn Get Return Me.columnUpdatedBy End Get End Property _ Public ReadOnly Property SampleQuantityColumn() As Global.System.Data.DataColumn Get Return Me.columnSampleQuantity End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As LotNumberRow Get Return CType(Me.Rows(index),LotNumberRow) End Get End Property _ Public Event LotNumberRowChanging As LotNumberRowChangeEventHandler _ Public Event LotNumberRowChanged As LotNumberRowChangeEventHandler _ Public Event LotNumberRowDeleting As LotNumberRowChangeEventHandler _ Public Event LotNumberRowDeleted As LotNumberRowChangeEventHandler _ Public Overloads Sub AddLotNumberRow(ByVal row As LotNumberRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddLotNumberRow(ByVal Lotnumber As String, ByVal LotStatus As String, ByVal CreatedDate As Date, ByVal CreatedBy As String, ByVal UpdatedDate As Date, ByVal UpdatedBy As String, ByVal SampleQuantity As Integer) As LotNumberRow Dim rowLotNumberRow As LotNumberRow = CType(Me.NewRow,LotNumberRow) Dim columnValuesArray() As Object = New Object() {Lotnumber, LotStatus, CreatedDate, CreatedBy, UpdatedDate, UpdatedBy, SampleQuantity} rowLotNumberRow.ItemArray = columnValuesArray Me.Rows.Add(rowLotNumberRow) Return rowLotNumberRow End Function _ Public Function FindByLotnumber(ByVal Lotnumber As String) As LotNumberRow Return CType(Me.Rows.Find(New Object() {Lotnumber}),LotNumberRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As LotNumberDataTable = CType(MyBase.Clone,LotNumberDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New LotNumberDataTable() End Function _ Friend Sub InitVars() Me.columnLotnumber = MyBase.Columns("Lotnumber") Me.columnLotStatus = MyBase.Columns("LotStatus") Me.columnCreatedDate = MyBase.Columns("CreatedDate") Me.columnCreatedBy = MyBase.Columns("CreatedBy") Me.columnUpdatedDate = MyBase.Columns("UpdatedDate") Me.columnUpdatedBy = MyBase.Columns("UpdatedBy") Me.columnSampleQuantity = MyBase.Columns("SampleQuantity") End Sub _ Private Sub InitClass() Me.columnLotnumber = New Global.System.Data.DataColumn("Lotnumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLotnumber) Me.columnLotStatus = New Global.System.Data.DataColumn("LotStatus", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLotStatus) Me.columnCreatedDate = New Global.System.Data.DataColumn("CreatedDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCreatedDate) Me.columnCreatedBy = New Global.System.Data.DataColumn("CreatedBy", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCreatedBy) Me.columnUpdatedDate = New Global.System.Data.DataColumn("UpdatedDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUpdatedDate) Me.columnUpdatedBy = New Global.System.Data.DataColumn("UpdatedBy", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUpdatedBy) Me.columnSampleQuantity = New Global.System.Data.DataColumn("SampleQuantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSampleQuantity) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnLotnumber}, true)) Me.columnLotnumber.AllowDBNull = false Me.columnLotnumber.Unique = true Me.columnLotnumber.MaxLength = 50 Me.columnLotStatus.MaxLength = 10 Me.columnCreatedDate.AllowDBNull = false Me.columnCreatedBy.AllowDBNull = false Me.columnCreatedBy.MaxLength = 50 Me.columnUpdatedBy.MaxLength = 50 End Sub _ Public Function NewLotNumberRow() As LotNumberRow Return CType(Me.NewRow,LotNumberRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New LotNumberRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(LotNumberRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.LotNumberRowChangedEvent) Is Nothing) Then RaiseEvent LotNumberRowChanged(Me, New LotNumberRowChangeEvent(CType(e.Row,LotNumberRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.LotNumberRowChangingEvent) Is Nothing) Then RaiseEvent LotNumberRowChanging(Me, New LotNumberRowChangeEvent(CType(e.Row,LotNumberRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.LotNumberRowDeletedEvent) Is Nothing) Then RaiseEvent LotNumberRowDeleted(Me, New LotNumberRowChangeEvent(CType(e.Row,LotNumberRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.LotNumberRowDeletingEvent) Is Nothing) Then RaiseEvent LotNumberRowDeleting(Me, New LotNumberRowChangeEvent(CType(e.Row,LotNumberRow), e.Action)) End If End Sub _ Public Sub RemoveLotNumberRow(ByVal row As LotNumberRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "LotNumberDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class machineDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmachine As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "machine" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property machineColumn() As Global.System.Data.DataColumn Get Return Me.columnmachine End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As machineRow Get Return CType(Me.Rows(index),machineRow) End Get End Property _ Public Event machineRowChanging As machineRowChangeEventHandler _ Public Event machineRowChanged As machineRowChangeEventHandler _ Public Event machineRowDeleting As machineRowChangeEventHandler _ Public Event machineRowDeleted As machineRowChangeEventHandler _ Public Overloads Sub AddmachineRow(ByVal row As machineRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmachineRow(ByVal machine As String, ByVal description As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As machineRow Dim rowmachineRow As machineRow = CType(Me.NewRow,machineRow) Dim columnValuesArray() As Object = New Object() {machine, description, active, lastupdate, lastupdatedby} rowmachineRow.ItemArray = columnValuesArray Me.Rows.Add(rowmachineRow) Return rowmachineRow End Function _ Public Function FindBymachine(ByVal machine As String) As machineRow Return CType(Me.Rows.Find(New Object() {machine}),machineRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As machineDataTable = CType(MyBase.Clone,machineDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New machineDataTable() End Function _ Friend Sub InitVars() Me.columnmachine = MyBase.Columns("machine") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmachine = New Global.System.Data.DataColumn("machine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmachine) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnmachine}, true)) Me.columnmachine.AllowDBNull = false Me.columnmachine.Unique = true Me.columnmachine.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmachineRow() As machineRow Return CType(Me.NewRow,machineRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New machineRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(machineRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.machineRowChangedEvent) Is Nothing) Then RaiseEvent machineRowChanged(Me, New machineRowChangeEvent(CType(e.Row,machineRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.machineRowChangingEvent) Is Nothing) Then RaiseEvent machineRowChanging(Me, New machineRowChangeEvent(CType(e.Row,machineRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.machineRowDeletedEvent) Is Nothing) Then RaiseEvent machineRowDeleted(Me, New machineRowChangeEvent(CType(e.Row,machineRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.machineRowDeletingEvent) Is Nothing) Then RaiseEvent machineRowDeleting(Me, New machineRowChangeEvent(CType(e.Row,machineRow), e.Action)) End If End Sub _ Public Sub RemovemachineRow(ByVal row As machineRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "machineDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class machineHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnmachine As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "machineHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property machineColumn() As Global.System.Data.DataColumn Get Return Me.columnmachine End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As machineHistRow Get Return CType(Me.Rows(index),machineHistRow) End Get End Property _ Public Event machineHistRowChanging As machineHistRowChangeEventHandler _ Public Event machineHistRowChanged As machineHistRowChangeEventHandler _ Public Event machineHistRowDeleting As machineHistRowChangeEventHandler _ Public Event machineHistRowDeleted As machineHistRowChangeEventHandler _ Public Overloads Sub AddmachineHistRow(ByVal row As machineHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmachineHistRow(ByVal machine As String, ByVal description As String, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As machineHistRow Dim rowmachineHistRow As machineHistRow = CType(Me.NewRow,machineHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, machine, description, active, status, lastupdate, lastupdatedby} rowmachineHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowmachineHistRow) Return rowmachineHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As machineHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),machineHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As machineHistDataTable = CType(MyBase.Clone,machineHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New machineHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnmachine = MyBase.Columns("machine") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnmachine = New Global.System.Data.DataColumn("machine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmachine) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnmachine.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmachineHistRow() As machineHistRow Return CType(Me.NewRow,machineHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New machineHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(machineHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.machineHistRowChangedEvent) Is Nothing) Then RaiseEvent machineHistRowChanged(Me, New machineHistRowChangeEvent(CType(e.Row,machineHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.machineHistRowChangingEvent) Is Nothing) Then RaiseEvent machineHistRowChanging(Me, New machineHistRowChangeEvent(CType(e.Row,machineHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.machineHistRowDeletedEvent) Is Nothing) Then RaiseEvent machineHistRowDeleted(Me, New machineHistRowChangeEvent(CType(e.Row,machineHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.machineHistRowDeletingEvent) Is Nothing) Then RaiseEvent machineHistRowDeleting(Me, New machineHistRowChangeEvent(CType(e.Row,machineHistRow), e.Action)) End If End Sub _ Public Sub RemovemachineHistRow(ByVal row As machineHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "machineHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelno As Global.System.Data.DataColumn Private columnmodelDesc1 As Global.System.Data.DataColumn Private columnmodelDesc2 As Global.System.Data.DataColumn Private columnmodelFamily As Global.System.Data.DataColumn Private columnmodelType As Global.System.Data.DataColumn Private columnminRev As Global.System.Data.DataColumn Private columnlatestRev As Global.System.Data.DataColumn Private columnitemWt As Global.System.Data.DataColumn Private columnbatch As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "model" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property modelDesc1Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc1 End Get End Property _ Public ReadOnly Property modelDesc2Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc2 End Get End Property _ Public ReadOnly Property modelFamilyColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelFamily End Get End Property _ Public ReadOnly Property modelTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelType End Get End Property _ Public ReadOnly Property minRevColumn() As Global.System.Data.DataColumn Get Return Me.columnminRev End Get End Property _ Public ReadOnly Property latestRevColumn() As Global.System.Data.DataColumn Get Return Me.columnlatestRev End Get End Property _ Public ReadOnly Property itemWtColumn() As Global.System.Data.DataColumn Get Return Me.columnitemWt End Get End Property _ Public ReadOnly Property batchColumn() As Global.System.Data.DataColumn Get Return Me.columnbatch End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelRow Get Return CType(Me.Rows(index),modelRow) End Get End Property _ Public Event modelRowChanging As modelRowChangeEventHandler _ Public Event modelRowChanged As modelRowChangeEventHandler _ Public Event modelRowDeleting As modelRowChangeEventHandler _ Public Event modelRowDeleted As modelRowChangeEventHandler _ Public Overloads Sub AddmodelRow(ByVal row As modelRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelRow(ByVal modelno As String, ByVal modelDesc1 As String, ByVal modelDesc2 As String, ByVal modelFamily As String, ByVal modelType As String, ByVal minRev As String, ByVal latestRev As String, ByVal itemWt As Single, ByVal batch As Integer, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelRow Dim rowmodelRow As modelRow = CType(Me.NewRow,modelRow) Dim columnValuesArray() As Object = New Object() {modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev, itemWt, batch, active, lastupdate, lastupdatedby} rowmodelRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelRow) Return rowmodelRow End Function _ Public Function FindBymodelno(ByVal modelno As String) As modelRow Return CType(Me.Rows.Find(New Object() {modelno}),modelRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelDataTable = CType(MyBase.Clone,modelDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelDataTable() End Function _ Friend Sub InitVars() Me.columnmodelno = MyBase.Columns("modelno") Me.columnmodelDesc1 = MyBase.Columns("modelDesc1") Me.columnmodelDesc2 = MyBase.Columns("modelDesc2") Me.columnmodelFamily = MyBase.Columns("modelFamily") Me.columnmodelType = MyBase.Columns("modelType") Me.columnminRev = MyBase.Columns("minRev") Me.columnlatestRev = MyBase.Columns("latestRev") Me.columnitemWt = MyBase.Columns("itemWt") Me.columnbatch = MyBase.Columns("batch") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnmodelDesc1 = New Global.System.Data.DataColumn("modelDesc1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc1) Me.columnmodelDesc2 = New Global.System.Data.DataColumn("modelDesc2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc2) Me.columnmodelFamily = New Global.System.Data.DataColumn("modelFamily", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelFamily) Me.columnmodelType = New Global.System.Data.DataColumn("modelType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelType) Me.columnminRev = New Global.System.Data.DataColumn("minRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnminRev) Me.columnlatestRev = New Global.System.Data.DataColumn("latestRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlatestRev) Me.columnitemWt = New Global.System.Data.DataColumn("itemWt", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnitemWt) Me.columnbatch = New Global.System.Data.DataColumn("batch", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatch) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnmodelno}, true)) Me.columnmodelno.AllowDBNull = false Me.columnmodelno.Unique = true Me.columnmodelno.MaxLength = 50 Me.columnmodelDesc1.MaxLength = 200 Me.columnmodelDesc2.MaxLength = 200 Me.columnmodelFamily.MaxLength = 50 Me.columnmodelType.MaxLength = 50 Me.columnminRev.MaxLength = 10 Me.columnlatestRev.MaxLength = 10 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelRow() As modelRow Return CType(Me.NewRow,modelRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelRowChangedEvent) Is Nothing) Then RaiseEvent modelRowChanged(Me, New modelRowChangeEvent(CType(e.Row,modelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelRowChangingEvent) Is Nothing) Then RaiseEvent modelRowChanging(Me, New modelRowChangeEvent(CType(e.Row,modelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelRowDeletedEvent) Is Nothing) Then RaiseEvent modelRowDeleted(Me, New modelRowChangeEvent(CType(e.Row,modelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelRowDeletingEvent) Is Nothing) Then RaiseEvent modelRowDeleting(Me, New modelRowChangeEvent(CType(e.Row,modelRow), e.Action)) End If End Sub _ Public Sub RemovemodelRow(ByVal row As modelRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelBackupDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelno As Global.System.Data.DataColumn Private columnmodelDesc1 As Global.System.Data.DataColumn Private columnmodelDesc2 As Global.System.Data.DataColumn Private columnmodelFamily As Global.System.Data.DataColumn Private columnmodelType As Global.System.Data.DataColumn Private columnminRev As Global.System.Data.DataColumn Private columnlatestRev As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelBackup" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property modelDesc1Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc1 End Get End Property _ Public ReadOnly Property modelDesc2Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc2 End Get End Property _ Public ReadOnly Property modelFamilyColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelFamily End Get End Property _ Public ReadOnly Property modelTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelType End Get End Property _ Public ReadOnly Property minRevColumn() As Global.System.Data.DataColumn Get Return Me.columnminRev End Get End Property _ Public ReadOnly Property latestRevColumn() As Global.System.Data.DataColumn Get Return Me.columnlatestRev End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelBackupRow Get Return CType(Me.Rows(index),modelBackupRow) End Get End Property _ Public Event modelBackupRowChanging As modelBackupRowChangeEventHandler _ Public Event modelBackupRowChanged As modelBackupRowChangeEventHandler _ Public Event modelBackupRowDeleting As modelBackupRowChangeEventHandler _ Public Event modelBackupRowDeleted As modelBackupRowChangeEventHandler _ Public Overloads Sub AddmodelBackupRow(ByVal row As modelBackupRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelBackupRow(ByVal modelno As String, ByVal modelDesc1 As String, ByVal modelDesc2 As String, ByVal modelFamily As String, ByVal modelType As String, ByVal minRev As String, ByVal latestRev As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelBackupRow Dim rowmodelBackupRow As modelBackupRow = CType(Me.NewRow,modelBackupRow) Dim columnValuesArray() As Object = New Object() {modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev, active, lastupdate, lastupdatedby} rowmodelBackupRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelBackupRow) Return rowmodelBackupRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelBackupDataTable = CType(MyBase.Clone,modelBackupDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelBackupDataTable() End Function _ Friend Sub InitVars() Me.columnmodelno = MyBase.Columns("modelno") Me.columnmodelDesc1 = MyBase.Columns("modelDesc1") Me.columnmodelDesc2 = MyBase.Columns("modelDesc2") Me.columnmodelFamily = MyBase.Columns("modelFamily") Me.columnmodelType = MyBase.Columns("modelType") Me.columnminRev = MyBase.Columns("minRev") Me.columnlatestRev = MyBase.Columns("latestRev") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnmodelDesc1 = New Global.System.Data.DataColumn("modelDesc1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc1) Me.columnmodelDesc2 = New Global.System.Data.DataColumn("modelDesc2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc2) Me.columnmodelFamily = New Global.System.Data.DataColumn("modelFamily", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelFamily) Me.columnmodelType = New Global.System.Data.DataColumn("modelType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelType) Me.columnminRev = New Global.System.Data.DataColumn("minRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnminRev) Me.columnlatestRev = New Global.System.Data.DataColumn("latestRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlatestRev) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnmodelno.AllowDBNull = false Me.columnmodelno.MaxLength = 50 Me.columnmodelDesc1.MaxLength = 200 Me.columnmodelDesc2.MaxLength = 200 Me.columnmodelFamily.MaxLength = 50 Me.columnmodelType.MaxLength = 50 Me.columnminRev.MaxLength = 10 Me.columnlatestRev.MaxLength = 10 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelBackupRow() As modelBackupRow Return CType(Me.NewRow,modelBackupRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelBackupRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelBackupRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelBackupRowChangedEvent) Is Nothing) Then RaiseEvent modelBackupRowChanged(Me, New modelBackupRowChangeEvent(CType(e.Row,modelBackupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelBackupRowChangingEvent) Is Nothing) Then RaiseEvent modelBackupRowChanging(Me, New modelBackupRowChangeEvent(CType(e.Row,modelBackupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelBackupRowDeletedEvent) Is Nothing) Then RaiseEvent modelBackupRowDeleted(Me, New modelBackupRowChangeEvent(CType(e.Row,modelBackupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelBackupRowDeletingEvent) Is Nothing) Then RaiseEvent modelBackupRowDeleting(Me, New modelBackupRowChangeEvent(CType(e.Row,modelBackupRow), e.Action)) End If End Sub _ Public Sub RemovemodelBackupRow(ByVal row As modelBackupRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelBackupDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelDimDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelno As Global.System.Data.DataColumn Private columnlength As Global.System.Data.DataColumn Private columnwidth As Global.System.Data.DataColumn Private columnheight As Global.System.Data.DataColumn Private columnlayerCount As Global.System.Data.DataColumn Private columndimType As Global.System.Data.DataColumn Private columnpackingno As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelDim" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property lengthColumn() As Global.System.Data.DataColumn Get Return Me.columnlength End Get End Property _ Public ReadOnly Property widthColumn() As Global.System.Data.DataColumn Get Return Me.columnwidth End Get End Property _ Public ReadOnly Property heightColumn() As Global.System.Data.DataColumn Get Return Me.columnheight End Get End Property _ Public ReadOnly Property layerCountColumn() As Global.System.Data.DataColumn Get Return Me.columnlayerCount End Get End Property _ Public ReadOnly Property dimTypeColumn() As Global.System.Data.DataColumn Get Return Me.columndimType End Get End Property _ Public ReadOnly Property packingnoColumn() As Global.System.Data.DataColumn Get Return Me.columnpackingno End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelDimRow Get Return CType(Me.Rows(index),modelDimRow) End Get End Property _ Public Event modelDimRowChanging As modelDimRowChangeEventHandler _ Public Event modelDimRowChanged As modelDimRowChangeEventHandler _ Public Event modelDimRowDeleting As modelDimRowChangeEventHandler _ Public Event modelDimRowDeleted As modelDimRowChangeEventHandler _ Public Overloads Sub AddmodelDimRow(ByVal row As modelDimRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelDimRow(ByVal modelno As String, ByVal length As Single, ByVal width As Single, ByVal height As Integer, ByVal layerCount As Integer, ByVal dimType As String, ByVal packingno As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelDimRow Dim rowmodelDimRow As modelDimRow = CType(Me.NewRow,modelDimRow) Dim columnValuesArray() As Object = New Object() {modelno, length, width, height, layerCount, dimType, packingno, lastupdate, lastupdatedby} rowmodelDimRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelDimRow) Return rowmodelDimRow End Function _ Public Function FindBymodelno(ByVal modelno As String) As modelDimRow Return CType(Me.Rows.Find(New Object() {modelno}),modelDimRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelDimDataTable = CType(MyBase.Clone,modelDimDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelDimDataTable() End Function _ Friend Sub InitVars() Me.columnmodelno = MyBase.Columns("modelno") Me.columnlength = MyBase.Columns("length") Me.columnwidth = MyBase.Columns("width") Me.columnheight = MyBase.Columns("height") Me.columnlayerCount = MyBase.Columns("layerCount") Me.columndimType = MyBase.Columns("dimType") Me.columnpackingno = MyBase.Columns("packingno") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnlength = New Global.System.Data.DataColumn("length", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlength) Me.columnwidth = New Global.System.Data.DataColumn("width", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnwidth) Me.columnheight = New Global.System.Data.DataColumn("height", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnheight) Me.columnlayerCount = New Global.System.Data.DataColumn("layerCount", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayerCount) Me.columndimType = New Global.System.Data.DataColumn("dimType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimType) Me.columnpackingno = New Global.System.Data.DataColumn("packingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpackingno) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnmodelno}, true)) Me.columnmodelno.AllowDBNull = false Me.columnmodelno.Unique = true Me.columnmodelno.MaxLength = 50 Me.columndimType.MaxLength = 50 Me.columnpackingno.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelDimRow() As modelDimRow Return CType(Me.NewRow,modelDimRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelDimRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelDimRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelDimRowChangedEvent) Is Nothing) Then RaiseEvent modelDimRowChanged(Me, New modelDimRowChangeEvent(CType(e.Row,modelDimRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelDimRowChangingEvent) Is Nothing) Then RaiseEvent modelDimRowChanging(Me, New modelDimRowChangeEvent(CType(e.Row,modelDimRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelDimRowDeletedEvent) Is Nothing) Then RaiseEvent modelDimRowDeleted(Me, New modelDimRowChangeEvent(CType(e.Row,modelDimRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelDimRowDeletingEvent) Is Nothing) Then RaiseEvent modelDimRowDeleting(Me, New modelDimRowChangeEvent(CType(e.Row,modelDimRow), e.Action)) End If End Sub _ Public Sub RemovemodelDimRow(ByVal row As modelDimRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelDimDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelDimHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnmodelno As Global.System.Data.DataColumn Private columnlength As Global.System.Data.DataColumn Private columnwidth As Global.System.Data.DataColumn Private columnheight As Global.System.Data.DataColumn Private columnlayerCount As Global.System.Data.DataColumn Private columndimType As Global.System.Data.DataColumn Private columnpackingno As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelDimHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property lengthColumn() As Global.System.Data.DataColumn Get Return Me.columnlength End Get End Property _ Public ReadOnly Property widthColumn() As Global.System.Data.DataColumn Get Return Me.columnwidth End Get End Property _ Public ReadOnly Property heightColumn() As Global.System.Data.DataColumn Get Return Me.columnheight End Get End Property _ Public ReadOnly Property layerCountColumn() As Global.System.Data.DataColumn Get Return Me.columnlayerCount End Get End Property _ Public ReadOnly Property dimTypeColumn() As Global.System.Data.DataColumn Get Return Me.columndimType End Get End Property _ Public ReadOnly Property packingnoColumn() As Global.System.Data.DataColumn Get Return Me.columnpackingno End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelDimHistRow Get Return CType(Me.Rows(index),modelDimHistRow) End Get End Property _ Public Event modelDimHistRowChanging As modelDimHistRowChangeEventHandler _ Public Event modelDimHistRowChanged As modelDimHistRowChangeEventHandler _ Public Event modelDimHistRowDeleting As modelDimHistRowChangeEventHandler _ Public Event modelDimHistRowDeleted As modelDimHistRowChangeEventHandler _ Public Overloads Sub AddmodelDimHistRow(ByVal row As modelDimHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelDimHistRow(ByVal modelno As String, ByVal length As Single, ByVal width As Single, ByVal height As Integer, ByVal layerCount As Integer, ByVal dimType As String, ByVal packingno As String, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelDimHistRow Dim rowmodelDimHistRow As modelDimHistRow = CType(Me.NewRow,modelDimHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, modelno, length, width, height, layerCount, dimType, packingno, status, lastupdate, lastupdatedby} rowmodelDimHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelDimHistRow) Return rowmodelDimHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As modelDimHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),modelDimHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelDimHistDataTable = CType(MyBase.Clone,modelDimHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelDimHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnmodelno = MyBase.Columns("modelno") Me.columnlength = MyBase.Columns("length") Me.columnwidth = MyBase.Columns("width") Me.columnheight = MyBase.Columns("height") Me.columnlayerCount = MyBase.Columns("layerCount") Me.columndimType = MyBase.Columns("dimType") Me.columnpackingno = MyBase.Columns("packingno") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnlength = New Global.System.Data.DataColumn("length", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlength) Me.columnwidth = New Global.System.Data.DataColumn("width", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnwidth) Me.columnheight = New Global.System.Data.DataColumn("height", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnheight) Me.columnlayerCount = New Global.System.Data.DataColumn("layerCount", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayerCount) Me.columndimType = New Global.System.Data.DataColumn("dimType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimType) Me.columnpackingno = New Global.System.Data.DataColumn("packingno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpackingno) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnmodelno.MaxLength = 50 Me.columndimType.MaxLength = 50 Me.columnpackingno.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelDimHistRow() As modelDimHistRow Return CType(Me.NewRow,modelDimHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelDimHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelDimHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelDimHistRowChangedEvent) Is Nothing) Then RaiseEvent modelDimHistRowChanged(Me, New modelDimHistRowChangeEvent(CType(e.Row,modelDimHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelDimHistRowChangingEvent) Is Nothing) Then RaiseEvent modelDimHistRowChanging(Me, New modelDimHistRowChangeEvent(CType(e.Row,modelDimHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelDimHistRowDeletedEvent) Is Nothing) Then RaiseEvent modelDimHistRowDeleted(Me, New modelDimHistRowChangeEvent(CType(e.Row,modelDimHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelDimHistRowDeletingEvent) Is Nothing) Then RaiseEvent modelDimHistRowDeleting(Me, New modelDimHistRowChangeEvent(CType(e.Row,modelDimHistRow), e.Action)) End If End Sub _ Public Sub RemovemodelDimHistRow(ByVal row As modelDimHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelDimHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelFamilyDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelFamily As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelFamily" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelFamilyColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelFamily End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelFamilyRow Get Return CType(Me.Rows(index),modelFamilyRow) End Get End Property _ Public Event modelFamilyRowChanging As modelFamilyRowChangeEventHandler _ Public Event modelFamilyRowChanged As modelFamilyRowChangeEventHandler _ Public Event modelFamilyRowDeleting As modelFamilyRowChangeEventHandler _ Public Event modelFamilyRowDeleted As modelFamilyRowChangeEventHandler _ Public Overloads Sub AddmodelFamilyRow(ByVal row As modelFamilyRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelFamilyRow(ByVal modelFamily As String, ByVal description As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelFamilyRow Dim rowmodelFamilyRow As modelFamilyRow = CType(Me.NewRow,modelFamilyRow) Dim columnValuesArray() As Object = New Object() {modelFamily, description, active, lastupdate, lastupdatedby} rowmodelFamilyRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelFamilyRow) Return rowmodelFamilyRow End Function _ Public Function FindBymodelFamily(ByVal modelFamily As String) As modelFamilyRow Return CType(Me.Rows.Find(New Object() {modelFamily}),modelFamilyRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelFamilyDataTable = CType(MyBase.Clone,modelFamilyDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelFamilyDataTable() End Function _ Friend Sub InitVars() Me.columnmodelFamily = MyBase.Columns("modelFamily") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelFamily = New Global.System.Data.DataColumn("modelFamily", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelFamily) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnmodelFamily}, true)) Me.columnmodelFamily.AllowDBNull = false Me.columnmodelFamily.Unique = true Me.columnmodelFamily.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelFamilyRow() As modelFamilyRow Return CType(Me.NewRow,modelFamilyRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelFamilyRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelFamilyRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelFamilyRowChangedEvent) Is Nothing) Then RaiseEvent modelFamilyRowChanged(Me, New modelFamilyRowChangeEvent(CType(e.Row,modelFamilyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelFamilyRowChangingEvent) Is Nothing) Then RaiseEvent modelFamilyRowChanging(Me, New modelFamilyRowChangeEvent(CType(e.Row,modelFamilyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelFamilyRowDeletedEvent) Is Nothing) Then RaiseEvent modelFamilyRowDeleted(Me, New modelFamilyRowChangeEvent(CType(e.Row,modelFamilyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelFamilyRowDeletingEvent) Is Nothing) Then RaiseEvent modelFamilyRowDeleting(Me, New modelFamilyRowChangeEvent(CType(e.Row,modelFamilyRow), e.Action)) End If End Sub _ Public Sub RemovemodelFamilyRow(ByVal row As modelFamilyRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelFamilyDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelFamilyHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnmodelFamily As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelFamilyHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property modelFamilyColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelFamily End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelFamilyHistRow Get Return CType(Me.Rows(index),modelFamilyHistRow) End Get End Property _ Public Event modelFamilyHistRowChanging As modelFamilyHistRowChangeEventHandler _ Public Event modelFamilyHistRowChanged As modelFamilyHistRowChangeEventHandler _ Public Event modelFamilyHistRowDeleting As modelFamilyHistRowChangeEventHandler _ Public Event modelFamilyHistRowDeleted As modelFamilyHistRowChangeEventHandler _ Public Overloads Sub AddmodelFamilyHistRow(ByVal row As modelFamilyHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelFamilyHistRow(ByVal modelFamily As String, ByVal description As String, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelFamilyHistRow Dim rowmodelFamilyHistRow As modelFamilyHistRow = CType(Me.NewRow,modelFamilyHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, modelFamily, description, active, status, lastupdate, lastupdatedby} rowmodelFamilyHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelFamilyHistRow) Return rowmodelFamilyHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As modelFamilyHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),modelFamilyHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelFamilyHistDataTable = CType(MyBase.Clone,modelFamilyHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelFamilyHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnmodelFamily = MyBase.Columns("modelFamily") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnmodelFamily = New Global.System.Data.DataColumn("modelFamily", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelFamily) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnmodelFamily.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelFamilyHistRow() As modelFamilyHistRow Return CType(Me.NewRow,modelFamilyHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelFamilyHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelFamilyHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelFamilyHistRowChangedEvent) Is Nothing) Then RaiseEvent modelFamilyHistRowChanged(Me, New modelFamilyHistRowChangeEvent(CType(e.Row,modelFamilyHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelFamilyHistRowChangingEvent) Is Nothing) Then RaiseEvent modelFamilyHistRowChanging(Me, New modelFamilyHistRowChangeEvent(CType(e.Row,modelFamilyHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelFamilyHistRowDeletedEvent) Is Nothing) Then RaiseEvent modelFamilyHistRowDeleted(Me, New modelFamilyHistRowChangeEvent(CType(e.Row,modelFamilyHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelFamilyHistRowDeletingEvent) Is Nothing) Then RaiseEvent modelFamilyHistRowDeleting(Me, New modelFamilyHistRowChangeEvent(CType(e.Row,modelFamilyHistRow), e.Action)) End If End Sub _ Public Sub RemovemodelFamilyHistRow(ByVal row As modelFamilyHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelFamilyHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelHierarchyDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelno As Global.System.Data.DataColumn Private columndescendant As Global.System.Data.DataColumn Private columnmlevel As Global.System.Data.DataColumn Private columncarrySerial As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelHierarchy" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property descendantColumn() As Global.System.Data.DataColumn Get Return Me.columndescendant End Get End Property _ Public ReadOnly Property mlevelColumn() As Global.System.Data.DataColumn Get Return Me.columnmlevel End Get End Property _ Public ReadOnly Property carrySerialColumn() As Global.System.Data.DataColumn Get Return Me.columncarrySerial End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelHierarchyRow Get Return CType(Me.Rows(index),modelHierarchyRow) End Get End Property _ Public Event modelHierarchyRowChanging As modelHierarchyRowChangeEventHandler _ Public Event modelHierarchyRowChanged As modelHierarchyRowChangeEventHandler _ Public Event modelHierarchyRowDeleting As modelHierarchyRowChangeEventHandler _ Public Event modelHierarchyRowDeleted As modelHierarchyRowChangeEventHandler _ Public Overloads Sub AddmodelHierarchyRow(ByVal row As modelHierarchyRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelHierarchyRow(ByVal modelno As String, ByVal descendant As String, ByVal mlevel As Integer, ByVal carrySerial As Integer, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelHierarchyRow Dim rowmodelHierarchyRow As modelHierarchyRow = CType(Me.NewRow,modelHierarchyRow) Dim columnValuesArray() As Object = New Object() {modelno, descendant, mlevel, carrySerial, active, lastupdate, lastupdatedby} rowmodelHierarchyRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelHierarchyRow) Return rowmodelHierarchyRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelHierarchyDataTable = CType(MyBase.Clone,modelHierarchyDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelHierarchyDataTable() End Function _ Friend Sub InitVars() Me.columnmodelno = MyBase.Columns("modelno") Me.columndescendant = MyBase.Columns("descendant") Me.columnmlevel = MyBase.Columns("mlevel") Me.columncarrySerial = MyBase.Columns("carrySerial") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columndescendant = New Global.System.Data.DataColumn("descendant", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescendant) Me.columnmlevel = New Global.System.Data.DataColumn("mlevel", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmlevel) Me.columncarrySerial = New Global.System.Data.DataColumn("carrySerial", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncarrySerial) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnmodelno.MaxLength = 50 Me.columndescendant.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelHierarchyRow() As modelHierarchyRow Return CType(Me.NewRow,modelHierarchyRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelHierarchyRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelHierarchyRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelHierarchyRowChangedEvent) Is Nothing) Then RaiseEvent modelHierarchyRowChanged(Me, New modelHierarchyRowChangeEvent(CType(e.Row,modelHierarchyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelHierarchyRowChangingEvent) Is Nothing) Then RaiseEvent modelHierarchyRowChanging(Me, New modelHierarchyRowChangeEvent(CType(e.Row,modelHierarchyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelHierarchyRowDeletedEvent) Is Nothing) Then RaiseEvent modelHierarchyRowDeleted(Me, New modelHierarchyRowChangeEvent(CType(e.Row,modelHierarchyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelHierarchyRowDeletingEvent) Is Nothing) Then RaiseEvent modelHierarchyRowDeleting(Me, New modelHierarchyRowChangeEvent(CType(e.Row,modelHierarchyRow), e.Action)) End If End Sub _ Public Sub RemovemodelHierarchyRow(ByVal row As modelHierarchyRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelHierarchyDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelHierarchyHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnmodelno As Global.System.Data.DataColumn Private columndescendant As Global.System.Data.DataColumn Private columnmlevel As Global.System.Data.DataColumn Private columncarrySerial As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelHierarchyHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property descendantColumn() As Global.System.Data.DataColumn Get Return Me.columndescendant End Get End Property _ Public ReadOnly Property mlevelColumn() As Global.System.Data.DataColumn Get Return Me.columnmlevel End Get End Property _ Public ReadOnly Property carrySerialColumn() As Global.System.Data.DataColumn Get Return Me.columncarrySerial End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelHierarchyHistRow Get Return CType(Me.Rows(index),modelHierarchyHistRow) End Get End Property _ Public Event modelHierarchyHistRowChanging As modelHierarchyHistRowChangeEventHandler _ Public Event modelHierarchyHistRowChanged As modelHierarchyHistRowChangeEventHandler _ Public Event modelHierarchyHistRowDeleting As modelHierarchyHistRowChangeEventHandler _ Public Event modelHierarchyHistRowDeleted As modelHierarchyHistRowChangeEventHandler _ Public Overloads Sub AddmodelHierarchyHistRow(ByVal row As modelHierarchyHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelHierarchyHistRow(ByVal modelno As String, ByVal descendant As String, ByVal mlevel As Integer, ByVal carrySerial As Integer, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelHierarchyHistRow Dim rowmodelHierarchyHistRow As modelHierarchyHistRow = CType(Me.NewRow,modelHierarchyHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, modelno, descendant, mlevel, carrySerial, active, status, lastupdate, lastupdatedby} rowmodelHierarchyHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelHierarchyHistRow) Return rowmodelHierarchyHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As modelHierarchyHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),modelHierarchyHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelHierarchyHistDataTable = CType(MyBase.Clone,modelHierarchyHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelHierarchyHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnmodelno = MyBase.Columns("modelno") Me.columndescendant = MyBase.Columns("descendant") Me.columnmlevel = MyBase.Columns("mlevel") Me.columncarrySerial = MyBase.Columns("carrySerial") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columndescendant = New Global.System.Data.DataColumn("descendant", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescendant) Me.columnmlevel = New Global.System.Data.DataColumn("mlevel", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmlevel) Me.columncarrySerial = New Global.System.Data.DataColumn("carrySerial", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncarrySerial) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnmodelno.MaxLength = 50 Me.columndescendant.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelHierarchyHistRow() As modelHierarchyHistRow Return CType(Me.NewRow,modelHierarchyHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelHierarchyHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelHierarchyHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelHierarchyHistRowChangedEvent) Is Nothing) Then RaiseEvent modelHierarchyHistRowChanged(Me, New modelHierarchyHistRowChangeEvent(CType(e.Row,modelHierarchyHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelHierarchyHistRowChangingEvent) Is Nothing) Then RaiseEvent modelHierarchyHistRowChanging(Me, New modelHierarchyHistRowChangeEvent(CType(e.Row,modelHierarchyHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelHierarchyHistRowDeletedEvent) Is Nothing) Then RaiseEvent modelHierarchyHistRowDeleted(Me, New modelHierarchyHistRowChangeEvent(CType(e.Row,modelHierarchyHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelHierarchyHistRowDeletingEvent) Is Nothing) Then RaiseEvent modelHierarchyHistRowDeleting(Me, New modelHierarchyHistRowChangeEvent(CType(e.Row,modelHierarchyHistRow), e.Action)) End If End Sub _ Public Sub RemovemodelHierarchyHistRow(ByVal row As modelHierarchyHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelHierarchyHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnmodelno As Global.System.Data.DataColumn Private columnmodelDesc1 As Global.System.Data.DataColumn Private columnmodelDesc2 As Global.System.Data.DataColumn Private columnmodelFamily As Global.System.Data.DataColumn Private columnmodelType As Global.System.Data.DataColumn Private columnminRev As Global.System.Data.DataColumn Private columnlatestRev As Global.System.Data.DataColumn Private columnitemWt As Global.System.Data.DataColumn Private columnbatch As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property modelDesc1Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc1 End Get End Property _ Public ReadOnly Property modelDesc2Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc2 End Get End Property _ Public ReadOnly Property modelFamilyColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelFamily End Get End Property _ Public ReadOnly Property modelTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelType End Get End Property _ Public ReadOnly Property minRevColumn() As Global.System.Data.DataColumn Get Return Me.columnminRev End Get End Property _ Public ReadOnly Property latestRevColumn() As Global.System.Data.DataColumn Get Return Me.columnlatestRev End Get End Property _ Public ReadOnly Property itemWtColumn() As Global.System.Data.DataColumn Get Return Me.columnitemWt End Get End Property _ Public ReadOnly Property batchColumn() As Global.System.Data.DataColumn Get Return Me.columnbatch End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelHistRow Get Return CType(Me.Rows(index),modelHistRow) End Get End Property _ Public Event modelHistRowChanging As modelHistRowChangeEventHandler _ Public Event modelHistRowChanged As modelHistRowChangeEventHandler _ Public Event modelHistRowDeleting As modelHistRowChangeEventHandler _ Public Event modelHistRowDeleted As modelHistRowChangeEventHandler _ Public Overloads Sub AddmodelHistRow(ByVal row As modelHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelHistRow(ByVal modelno As String, ByVal modelDesc1 As String, ByVal modelDesc2 As String, ByVal modelFamily As String, ByVal modelType As String, ByVal minRev As String, ByVal latestRev As String, ByVal itemWt As Single, ByVal batch As Integer, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelHistRow Dim rowmodelHistRow As modelHistRow = CType(Me.NewRow,modelHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev, itemWt, batch, active, status, lastupdate, lastupdatedby} rowmodelHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelHistRow) Return rowmodelHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As modelHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),modelHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelHistDataTable = CType(MyBase.Clone,modelHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnmodelno = MyBase.Columns("modelno") Me.columnmodelDesc1 = MyBase.Columns("modelDesc1") Me.columnmodelDesc2 = MyBase.Columns("modelDesc2") Me.columnmodelFamily = MyBase.Columns("modelFamily") Me.columnmodelType = MyBase.Columns("modelType") Me.columnminRev = MyBase.Columns("minRev") Me.columnlatestRev = MyBase.Columns("latestRev") Me.columnitemWt = MyBase.Columns("itemWt") Me.columnbatch = MyBase.Columns("batch") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnmodelDesc1 = New Global.System.Data.DataColumn("modelDesc1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc1) Me.columnmodelDesc2 = New Global.System.Data.DataColumn("modelDesc2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc2) Me.columnmodelFamily = New Global.System.Data.DataColumn("modelFamily", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelFamily) Me.columnmodelType = New Global.System.Data.DataColumn("modelType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelType) Me.columnminRev = New Global.System.Data.DataColumn("minRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnminRev) Me.columnlatestRev = New Global.System.Data.DataColumn("latestRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlatestRev) Me.columnitemWt = New Global.System.Data.DataColumn("itemWt", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnitemWt) Me.columnbatch = New Global.System.Data.DataColumn("batch", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatch) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnmodelno.MaxLength = 50 Me.columnmodelDesc1.MaxLength = 200 Me.columnmodelDesc2.MaxLength = 200 Me.columnmodelFamily.MaxLength = 50 Me.columnmodelType.MaxLength = 50 Me.columnminRev.MaxLength = 10 Me.columnlatestRev.MaxLength = 10 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelHistRow() As modelHistRow Return CType(Me.NewRow,modelHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelHistRowChangedEvent) Is Nothing) Then RaiseEvent modelHistRowChanged(Me, New modelHistRowChangeEvent(CType(e.Row,modelHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelHistRowChangingEvent) Is Nothing) Then RaiseEvent modelHistRowChanging(Me, New modelHistRowChangeEvent(CType(e.Row,modelHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelHistRowDeletedEvent) Is Nothing) Then RaiseEvent modelHistRowDeleted(Me, New modelHistRowChangeEvent(CType(e.Row,modelHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelHistRowDeletingEvent) Is Nothing) Then RaiseEvent modelHistRowDeleting(Me, New modelHistRowChangeEvent(CType(e.Row,modelHistRow), e.Action)) End If End Sub _ Public Sub RemovemodelHistRow(ByVal row As modelHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelRouteDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelno As Global.System.Data.DataColumn Private columnflowsequence As Global.System.Data.DataColumn Private columnstation As Global.System.Data.DataColumn Private columnskip As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastStation As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelRoute" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property flowsequenceColumn() As Global.System.Data.DataColumn Get Return Me.columnflowsequence End Get End Property _ Public ReadOnly Property stationColumn() As Global.System.Data.DataColumn Get Return Me.columnstation End Get End Property _ Public ReadOnly Property skipColumn() As Global.System.Data.DataColumn Get Return Me.columnskip End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastStationColumn() As Global.System.Data.DataColumn Get Return Me.columnlastStation End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelRouteRow Get Return CType(Me.Rows(index),modelRouteRow) End Get End Property _ Public Event modelRouteRowChanging As modelRouteRowChangeEventHandler _ Public Event modelRouteRowChanged As modelRouteRowChangeEventHandler _ Public Event modelRouteRowDeleting As modelRouteRowChangeEventHandler _ Public Event modelRouteRowDeleted As modelRouteRowChangeEventHandler _ Public Overloads Sub AddmodelRouteRow(ByVal row As modelRouteRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelRouteRow(ByVal modelno As String, ByVal flowsequence As Integer, ByVal station As String, ByVal skip As Integer, ByVal active As Integer, ByVal lastStation As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelRouteRow Dim rowmodelRouteRow As modelRouteRow = CType(Me.NewRow,modelRouteRow) Dim columnValuesArray() As Object = New Object() {modelno, flowsequence, station, skip, active, lastStation, lastupdate, lastupdatedby} rowmodelRouteRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelRouteRow) Return rowmodelRouteRow End Function _ Public Function FindBymodelnostation(ByVal modelno As String, ByVal station As String) As modelRouteRow Return CType(Me.Rows.Find(New Object() {modelno, station}),modelRouteRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelRouteDataTable = CType(MyBase.Clone,modelRouteDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelRouteDataTable() End Function _ Friend Sub InitVars() Me.columnmodelno = MyBase.Columns("modelno") Me.columnflowsequence = MyBase.Columns("flowsequence") Me.columnstation = MyBase.Columns("station") Me.columnskip = MyBase.Columns("skip") Me.columnactive = MyBase.Columns("active") Me.columnlastStation = MyBase.Columns("lastStation") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnflowsequence = New Global.System.Data.DataColumn("flowsequence", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnflowsequence) Me.columnstation = New Global.System.Data.DataColumn("station", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation) Me.columnskip = New Global.System.Data.DataColumn("skip", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnskip) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastStation = New Global.System.Data.DataColumn("lastStation", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastStation) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnmodelno, Me.columnstation}, true)) Me.columnmodelno.AllowDBNull = false Me.columnmodelno.MaxLength = 50 Me.columnstation.AllowDBNull = false Me.columnstation.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelRouteRow() As modelRouteRow Return CType(Me.NewRow,modelRouteRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelRouteRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelRouteRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelRouteRowChangedEvent) Is Nothing) Then RaiseEvent modelRouteRowChanged(Me, New modelRouteRowChangeEvent(CType(e.Row,modelRouteRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelRouteRowChangingEvent) Is Nothing) Then RaiseEvent modelRouteRowChanging(Me, New modelRouteRowChangeEvent(CType(e.Row,modelRouteRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelRouteRowDeletedEvent) Is Nothing) Then RaiseEvent modelRouteRowDeleted(Me, New modelRouteRowChangeEvent(CType(e.Row,modelRouteRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelRouteRowDeletingEvent) Is Nothing) Then RaiseEvent modelRouteRowDeleting(Me, New modelRouteRowChangeEvent(CType(e.Row,modelRouteRow), e.Action)) End If End Sub _ Public Sub RemovemodelRouteRow(ByVal row As modelRouteRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelRouteDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelRoute_backup_1DataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelno As Global.System.Data.DataColumn Private columnflowsequence As Global.System.Data.DataColumn Private columnstation As Global.System.Data.DataColumn Private columnskip As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastStation As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelRoute_backup_1" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property flowsequenceColumn() As Global.System.Data.DataColumn Get Return Me.columnflowsequence End Get End Property _ Public ReadOnly Property stationColumn() As Global.System.Data.DataColumn Get Return Me.columnstation End Get End Property _ Public ReadOnly Property skipColumn() As Global.System.Data.DataColumn Get Return Me.columnskip End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastStationColumn() As Global.System.Data.DataColumn Get Return Me.columnlastStation End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelRoute_backup_1Row Get Return CType(Me.Rows(index),modelRoute_backup_1Row) End Get End Property _ Public Event modelRoute_backup_1RowChanging As modelRoute_backup_1RowChangeEventHandler _ Public Event modelRoute_backup_1RowChanged As modelRoute_backup_1RowChangeEventHandler _ Public Event modelRoute_backup_1RowDeleting As modelRoute_backup_1RowChangeEventHandler _ Public Event modelRoute_backup_1RowDeleted As modelRoute_backup_1RowChangeEventHandler _ Public Overloads Sub AddmodelRoute_backup_1Row(ByVal row As modelRoute_backup_1Row) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelRoute_backup_1Row(ByVal modelno As String, ByVal flowsequence As Integer, ByVal station As String, ByVal skip As Integer, ByVal active As Integer, ByVal lastStation As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelRoute_backup_1Row Dim rowmodelRoute_backup_1Row As modelRoute_backup_1Row = CType(Me.NewRow,modelRoute_backup_1Row) Dim columnValuesArray() As Object = New Object() {modelno, flowsequence, station, skip, active, lastStation, lastupdate, lastupdatedby} rowmodelRoute_backup_1Row.ItemArray = columnValuesArray Me.Rows.Add(rowmodelRoute_backup_1Row) Return rowmodelRoute_backup_1Row End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelRoute_backup_1DataTable = CType(MyBase.Clone,modelRoute_backup_1DataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelRoute_backup_1DataTable() End Function _ Friend Sub InitVars() Me.columnmodelno = MyBase.Columns("modelno") Me.columnflowsequence = MyBase.Columns("flowsequence") Me.columnstation = MyBase.Columns("station") Me.columnskip = MyBase.Columns("skip") Me.columnactive = MyBase.Columns("active") Me.columnlastStation = MyBase.Columns("lastStation") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnflowsequence = New Global.System.Data.DataColumn("flowsequence", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnflowsequence) Me.columnstation = New Global.System.Data.DataColumn("station", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation) Me.columnskip = New Global.System.Data.DataColumn("skip", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnskip) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastStation = New Global.System.Data.DataColumn("lastStation", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastStation) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnmodelno.AllowDBNull = false Me.columnmodelno.MaxLength = 50 Me.columnstation.AllowDBNull = false Me.columnstation.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelRoute_backup_1Row() As modelRoute_backup_1Row Return CType(Me.NewRow,modelRoute_backup_1Row) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelRoute_backup_1Row(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelRoute_backup_1Row) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelRoute_backup_1RowChangedEvent) Is Nothing) Then RaiseEvent modelRoute_backup_1RowChanged(Me, New modelRoute_backup_1RowChangeEvent(CType(e.Row,modelRoute_backup_1Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelRoute_backup_1RowChangingEvent) Is Nothing) Then RaiseEvent modelRoute_backup_1RowChanging(Me, New modelRoute_backup_1RowChangeEvent(CType(e.Row,modelRoute_backup_1Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelRoute_backup_1RowDeletedEvent) Is Nothing) Then RaiseEvent modelRoute_backup_1RowDeleted(Me, New modelRoute_backup_1RowChangeEvent(CType(e.Row,modelRoute_backup_1Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelRoute_backup_1RowDeletingEvent) Is Nothing) Then RaiseEvent modelRoute_backup_1RowDeleting(Me, New modelRoute_backup_1RowChangeEvent(CType(e.Row,modelRoute_backup_1Row), e.Action)) End If End Sub _ Public Sub RemovemodelRoute_backup_1Row(ByVal row As modelRoute_backup_1Row) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelRoute_backup_1DataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelRouteHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnmodelno As Global.System.Data.DataColumn Private columnflowsequence As Global.System.Data.DataColumn Private columnstation As Global.System.Data.DataColumn Private columnskip As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastStation As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelRouteHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property flowsequenceColumn() As Global.System.Data.DataColumn Get Return Me.columnflowsequence End Get End Property _ Public ReadOnly Property stationColumn() As Global.System.Data.DataColumn Get Return Me.columnstation End Get End Property _ Public ReadOnly Property skipColumn() As Global.System.Data.DataColumn Get Return Me.columnskip End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastStationColumn() As Global.System.Data.DataColumn Get Return Me.columnlastStation End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelRouteHistRow Get Return CType(Me.Rows(index),modelRouteHistRow) End Get End Property _ Public Event modelRouteHistRowChanging As modelRouteHistRowChangeEventHandler _ Public Event modelRouteHistRowChanged As modelRouteHistRowChangeEventHandler _ Public Event modelRouteHistRowDeleting As modelRouteHistRowChangeEventHandler _ Public Event modelRouteHistRowDeleted As modelRouteHistRowChangeEventHandler _ Public Overloads Sub AddmodelRouteHistRow(ByVal row As modelRouteHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelRouteHistRow(ByVal modelno As String, ByVal flowsequence As Integer, ByVal station As String, ByVal skip As Integer, ByVal active As Integer, ByVal lastStation As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelRouteHistRow Dim rowmodelRouteHistRow As modelRouteHistRow = CType(Me.NewRow,modelRouteHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, modelno, flowsequence, station, skip, active, lastStation, status, lastupdate, lastupdatedby} rowmodelRouteHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelRouteHistRow) Return rowmodelRouteHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As modelRouteHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),modelRouteHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelRouteHistDataTable = CType(MyBase.Clone,modelRouteHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelRouteHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnmodelno = MyBase.Columns("modelno") Me.columnflowsequence = MyBase.Columns("flowsequence") Me.columnstation = MyBase.Columns("station") Me.columnskip = MyBase.Columns("skip") Me.columnactive = MyBase.Columns("active") Me.columnlastStation = MyBase.Columns("lastStation") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnflowsequence = New Global.System.Data.DataColumn("flowsequence", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnflowsequence) Me.columnstation = New Global.System.Data.DataColumn("station", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation) Me.columnskip = New Global.System.Data.DataColumn("skip", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnskip) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastStation = New Global.System.Data.DataColumn("lastStation", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastStation) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnmodelno.MaxLength = 50 Me.columnstation.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelRouteHistRow() As modelRouteHistRow Return CType(Me.NewRow,modelRouteHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelRouteHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelRouteHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelRouteHistRowChangedEvent) Is Nothing) Then RaiseEvent modelRouteHistRowChanged(Me, New modelRouteHistRowChangeEvent(CType(e.Row,modelRouteHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelRouteHistRowChangingEvent) Is Nothing) Then RaiseEvent modelRouteHistRowChanging(Me, New modelRouteHistRowChangeEvent(CType(e.Row,modelRouteHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelRouteHistRowDeletedEvent) Is Nothing) Then RaiseEvent modelRouteHistRowDeleted(Me, New modelRouteHistRowChangeEvent(CType(e.Row,modelRouteHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelRouteHistRowDeletingEvent) Is Nothing) Then RaiseEvent modelRouteHistRowDeleting(Me, New modelRouteHistRowChangeEvent(CType(e.Row,modelRouteHistRow), e.Action)) End If End Sub _ Public Sub RemovemodelRouteHistRow(ByVal row As modelRouteHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelRouteHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelTempDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelno As Global.System.Data.DataColumn Private columnmodelDesc1 As Global.System.Data.DataColumn Private columnmodelDesc2 As Global.System.Data.DataColumn Private columnmodelFamily As Global.System.Data.DataColumn Private columnmodelType As Global.System.Data.DataColumn Private columnminRev As Global.System.Data.DataColumn Private columnlatestRev As Global.System.Data.DataColumn Private columnbatch As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelTemp" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property modelDesc1Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc1 End Get End Property _ Public ReadOnly Property modelDesc2Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc2 End Get End Property _ Public ReadOnly Property modelFamilyColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelFamily End Get End Property _ Public ReadOnly Property modelTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelType End Get End Property _ Public ReadOnly Property minRevColumn() As Global.System.Data.DataColumn Get Return Me.columnminRev End Get End Property _ Public ReadOnly Property latestRevColumn() As Global.System.Data.DataColumn Get Return Me.columnlatestRev End Get End Property _ Public ReadOnly Property batchColumn() As Global.System.Data.DataColumn Get Return Me.columnbatch End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelTempRow Get Return CType(Me.Rows(index),modelTempRow) End Get End Property _ Public Event modelTempRowChanging As modelTempRowChangeEventHandler _ Public Event modelTempRowChanged As modelTempRowChangeEventHandler _ Public Event modelTempRowDeleting As modelTempRowChangeEventHandler _ Public Event modelTempRowDeleted As modelTempRowChangeEventHandler _ Public Overloads Sub AddmodelTempRow(ByVal row As modelTempRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelTempRow(ByVal modelno As String, ByVal modelDesc1 As String, ByVal modelDesc2 As String, ByVal modelFamily As String, ByVal modelType As String, ByVal minRev As String, ByVal latestRev As String, ByVal batch As Integer, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelTempRow Dim rowmodelTempRow As modelTempRow = CType(Me.NewRow,modelTempRow) Dim columnValuesArray() As Object = New Object() {modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev, batch, active, lastupdate, lastupdatedby} rowmodelTempRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelTempRow) Return rowmodelTempRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelTempDataTable = CType(MyBase.Clone,modelTempDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelTempDataTable() End Function _ Friend Sub InitVars() Me.columnmodelno = MyBase.Columns("modelno") Me.columnmodelDesc1 = MyBase.Columns("modelDesc1") Me.columnmodelDesc2 = MyBase.Columns("modelDesc2") Me.columnmodelFamily = MyBase.Columns("modelFamily") Me.columnmodelType = MyBase.Columns("modelType") Me.columnminRev = MyBase.Columns("minRev") Me.columnlatestRev = MyBase.Columns("latestRev") Me.columnbatch = MyBase.Columns("batch") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnmodelDesc1 = New Global.System.Data.DataColumn("modelDesc1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc1) Me.columnmodelDesc2 = New Global.System.Data.DataColumn("modelDesc2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc2) Me.columnmodelFamily = New Global.System.Data.DataColumn("modelFamily", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelFamily) Me.columnmodelType = New Global.System.Data.DataColumn("modelType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelType) Me.columnminRev = New Global.System.Data.DataColumn("minRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnminRev) Me.columnlatestRev = New Global.System.Data.DataColumn("latestRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlatestRev) Me.columnbatch = New Global.System.Data.DataColumn("batch", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatch) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnmodelno.AllowDBNull = false Me.columnmodelno.MaxLength = 50 Me.columnmodelDesc1.MaxLength = 200 Me.columnmodelDesc2.MaxLength = 200 Me.columnmodelFamily.MaxLength = 50 Me.columnmodelType.MaxLength = 50 Me.columnminRev.MaxLength = 10 Me.columnlatestRev.MaxLength = 10 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelTempRow() As modelTempRow Return CType(Me.NewRow,modelTempRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelTempRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelTempRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelTempRowChangedEvent) Is Nothing) Then RaiseEvent modelTempRowChanged(Me, New modelTempRowChangeEvent(CType(e.Row,modelTempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelTempRowChangingEvent) Is Nothing) Then RaiseEvent modelTempRowChanging(Me, New modelTempRowChangeEvent(CType(e.Row,modelTempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelTempRowDeletedEvent) Is Nothing) Then RaiseEvent modelTempRowDeleted(Me, New modelTempRowChangeEvent(CType(e.Row,modelTempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelTempRowDeletingEvent) Is Nothing) Then RaiseEvent modelTempRowDeleting(Me, New modelTempRowChangeEvent(CType(e.Row,modelTempRow), e.Action)) End If End Sub _ Public Sub RemovemodelTempRow(ByVal row As modelTempRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelTempDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelTypeDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelType As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelType" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelType End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelTypeRow Get Return CType(Me.Rows(index),modelTypeRow) End Get End Property _ Public Event modelTypeRowChanging As modelTypeRowChangeEventHandler _ Public Event modelTypeRowChanged As modelTypeRowChangeEventHandler _ Public Event modelTypeRowDeleting As modelTypeRowChangeEventHandler _ Public Event modelTypeRowDeleted As modelTypeRowChangeEventHandler _ Public Overloads Sub AddmodelTypeRow(ByVal row As modelTypeRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelTypeRow(ByVal modelType As String, ByVal description As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelTypeRow Dim rowmodelTypeRow As modelTypeRow = CType(Me.NewRow,modelTypeRow) Dim columnValuesArray() As Object = New Object() {modelType, description, active, lastupdate, lastupdatedby} rowmodelTypeRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelTypeRow) Return rowmodelTypeRow End Function _ Public Function FindBymodelType(ByVal modelType As String) As modelTypeRow Return CType(Me.Rows.Find(New Object() {modelType}),modelTypeRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelTypeDataTable = CType(MyBase.Clone,modelTypeDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelTypeDataTable() End Function _ Friend Sub InitVars() Me.columnmodelType = MyBase.Columns("modelType") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnmodelType = New Global.System.Data.DataColumn("modelType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelType) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnmodelType}, true)) Me.columnmodelType.AllowDBNull = false Me.columnmodelType.Unique = true Me.columnmodelType.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelTypeRow() As modelTypeRow Return CType(Me.NewRow,modelTypeRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelTypeRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelTypeRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelTypeRowChangedEvent) Is Nothing) Then RaiseEvent modelTypeRowChanged(Me, New modelTypeRowChangeEvent(CType(e.Row,modelTypeRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelTypeRowChangingEvent) Is Nothing) Then RaiseEvent modelTypeRowChanging(Me, New modelTypeRowChangeEvent(CType(e.Row,modelTypeRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelTypeRowDeletedEvent) Is Nothing) Then RaiseEvent modelTypeRowDeleted(Me, New modelTypeRowChangeEvent(CType(e.Row,modelTypeRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelTypeRowDeletingEvent) Is Nothing) Then RaiseEvent modelTypeRowDeleting(Me, New modelTypeRowChangeEvent(CType(e.Row,modelTypeRow), e.Action)) End If End Sub _ Public Sub RemovemodelTypeRow(ByVal row As modelTypeRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelTypeDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class modelTypeHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnmodelType As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "modelTypeHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property modelTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelType End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As modelTypeHistRow Get Return CType(Me.Rows(index),modelTypeHistRow) End Get End Property _ Public Event modelTypeHistRowChanging As modelTypeHistRowChangeEventHandler _ Public Event modelTypeHistRowChanged As modelTypeHistRowChangeEventHandler _ Public Event modelTypeHistRowDeleting As modelTypeHistRowChangeEventHandler _ Public Event modelTypeHistRowDeleted As modelTypeHistRowChangeEventHandler _ Public Overloads Sub AddmodelTypeHistRow(ByVal row As modelTypeHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddmodelTypeHistRow(ByVal modelType As String, ByVal description As String, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As modelTypeHistRow Dim rowmodelTypeHistRow As modelTypeHistRow = CType(Me.NewRow,modelTypeHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, modelType, description, active, status, lastupdate, lastupdatedby} rowmodelTypeHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowmodelTypeHistRow) Return rowmodelTypeHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As modelTypeHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),modelTypeHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As modelTypeHistDataTable = CType(MyBase.Clone,modelTypeHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New modelTypeHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnmodelType = MyBase.Columns("modelType") Me.columndescription = MyBase.Columns("description") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnmodelType = New Global.System.Data.DataColumn("modelType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelType) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnmodelType.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewmodelTypeHistRow() As modelTypeHistRow Return CType(Me.NewRow,modelTypeHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New modelTypeHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(modelTypeHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.modelTypeHistRowChangedEvent) Is Nothing) Then RaiseEvent modelTypeHistRowChanged(Me, New modelTypeHistRowChangeEvent(CType(e.Row,modelTypeHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.modelTypeHistRowChangingEvent) Is Nothing) Then RaiseEvent modelTypeHistRowChanging(Me, New modelTypeHistRowChangeEvent(CType(e.Row,modelTypeHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.modelTypeHistRowDeletedEvent) Is Nothing) Then RaiseEvent modelTypeHistRowDeleted(Me, New modelTypeHistRowChangeEvent(CType(e.Row,modelTypeHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.modelTypeHistRowDeletingEvent) Is Nothing) Then RaiseEvent modelTypeHistRowDeleting(Me, New modelTypeHistRowChangeEvent(CType(e.Row,modelTypeHistRow), e.Action)) End If End Sub _ Public Sub RemovemodelTypeHistRow(ByVal row As modelTypeHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "modelTypeHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class Parts_ListDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnDescriptions_Parameter_Desc As Global.System.Data.DataColumn Private columnItem_Code As Global.System.Data.DataColumn Private columnItem_Item_Desc As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "Parts_List" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Descriptions_Parameter_DescColumn() As Global.System.Data.DataColumn Get Return Me.columnDescriptions_Parameter_Desc End Get End Property _ Public ReadOnly Property Item_CodeColumn() As Global.System.Data.DataColumn Get Return Me.columnItem_Code End Get End Property _ Public ReadOnly Property Item_Item_DescColumn() As Global.System.Data.DataColumn Get Return Me.columnItem_Item_Desc End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As Parts_ListRow Get Return CType(Me.Rows(index),Parts_ListRow) End Get End Property _ Public Event Parts_ListRowChanging As Parts_ListRowChangeEventHandler _ Public Event Parts_ListRowChanged As Parts_ListRowChangeEventHandler _ Public Event Parts_ListRowDeleting As Parts_ListRowChangeEventHandler _ Public Event Parts_ListRowDeleted As Parts_ListRowChangeEventHandler _ Public Overloads Sub AddParts_ListRow(ByVal row As Parts_ListRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddParts_ListRow(ByVal Descriptions_Parameter_Desc As String, ByVal Item_Code As String, ByVal Item_Item_Desc As String) As Parts_ListRow Dim rowParts_ListRow As Parts_ListRow = CType(Me.NewRow,Parts_ListRow) Dim columnValuesArray() As Object = New Object() {Descriptions_Parameter_Desc, Item_Code, Item_Item_Desc} rowParts_ListRow.ItemArray = columnValuesArray Me.Rows.Add(rowParts_ListRow) Return rowParts_ListRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As Parts_ListDataTable = CType(MyBase.Clone,Parts_ListDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New Parts_ListDataTable() End Function _ Friend Sub InitVars() Me.columnDescriptions_Parameter_Desc = MyBase.Columns("Descriptions_Parameter_Desc") Me.columnItem_Code = MyBase.Columns("Item_Code") Me.columnItem_Item_Desc = MyBase.Columns("Item_Item_Desc") End Sub _ Private Sub InitClass() Me.columnDescriptions_Parameter_Desc = New Global.System.Data.DataColumn("Descriptions_Parameter_Desc", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDescriptions_Parameter_Desc) Me.columnItem_Code = New Global.System.Data.DataColumn("Item_Code", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnItem_Code) Me.columnItem_Item_Desc = New Global.System.Data.DataColumn("Item_Item_Desc", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnItem_Item_Desc) Me.columnDescriptions_Parameter_Desc.MaxLength = 30 Me.columnItem_Code.AllowDBNull = false Me.columnItem_Code.MaxLength = 15 Me.columnItem_Item_Desc.MaxLength = 36 End Sub _ Public Function NewParts_ListRow() As Parts_ListRow Return CType(Me.NewRow,Parts_ListRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New Parts_ListRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(Parts_ListRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.Parts_ListRowChangedEvent) Is Nothing) Then RaiseEvent Parts_ListRowChanged(Me, New Parts_ListRowChangeEvent(CType(e.Row,Parts_ListRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.Parts_ListRowChangingEvent) Is Nothing) Then RaiseEvent Parts_ListRowChanging(Me, New Parts_ListRowChangeEvent(CType(e.Row,Parts_ListRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.Parts_ListRowDeletedEvent) Is Nothing) Then RaiseEvent Parts_ListRowDeleted(Me, New Parts_ListRowChangeEvent(CType(e.Row,Parts_ListRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.Parts_ListRowDeletingEvent) Is Nothing) Then RaiseEvent Parts_ListRowDeleting(Me, New Parts_ListRowChangeEvent(CType(e.Row,Parts_ListRow), e.Action)) End If End Sub _ Public Sub RemoveParts_ListRow(ByVal row As Parts_ListRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "Parts_ListDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class partsCodeDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnpart_id As Global.System.Data.DataColumn Private columnpartcode As Global.System.Data.DataColumn Private columnpartname As Global.System.Data.DataColumn Private columnstandardpack As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnadditional As Global.System.Data.DataColumn Private columnfactory As Global.System.Data.DataColumn Private columnlastupdated As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "partsCode" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property part_idColumn() As Global.System.Data.DataColumn Get Return Me.columnpart_id End Get End Property _ Public ReadOnly Property partcodeColumn() As Global.System.Data.DataColumn Get Return Me.columnpartcode End Get End Property _ Public ReadOnly Property partnameColumn() As Global.System.Data.DataColumn Get Return Me.columnpartname End Get End Property _ Public ReadOnly Property standardpackColumn() As Global.System.Data.DataColumn Get Return Me.columnstandardpack End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property additionalColumn() As Global.System.Data.DataColumn Get Return Me.columnadditional End Get End Property _ Public ReadOnly Property factoryColumn() As Global.System.Data.DataColumn Get Return Me.columnfactory End Get End Property _ Public ReadOnly Property lastupdatedColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdated End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As partsCodeRow Get Return CType(Me.Rows(index),partsCodeRow) End Get End Property _ Public Event partsCodeRowChanging As partsCodeRowChangeEventHandler _ Public Event partsCodeRowChanged As partsCodeRowChangeEventHandler _ Public Event partsCodeRowDeleting As partsCodeRowChangeEventHandler _ Public Event partsCodeRowDeleted As partsCodeRowChangeEventHandler _ Public Overloads Sub AddpartsCodeRow(ByVal row As partsCodeRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddpartsCodeRow(ByVal partcode As String, ByVal partname As String, ByVal standardpack As Integer, ByVal model As String, ByVal additional As String, ByVal factory As String, ByVal lastupdated As Date, ByVal lastupdatedby As String) As partsCodeRow Dim rowpartsCodeRow As partsCodeRow = CType(Me.NewRow,partsCodeRow) Dim columnValuesArray() As Object = New Object() {Nothing, partcode, partname, standardpack, model, additional, factory, lastupdated, lastupdatedby} rowpartsCodeRow.ItemArray = columnValuesArray Me.Rows.Add(rowpartsCodeRow) Return rowpartsCodeRow End Function _ Public Function FindBypart_id(ByVal part_id As Integer) As partsCodeRow Return CType(Me.Rows.Find(New Object() {part_id}),partsCodeRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As partsCodeDataTable = CType(MyBase.Clone,partsCodeDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New partsCodeDataTable() End Function _ Friend Sub InitVars() Me.columnpart_id = MyBase.Columns("part_id") Me.columnpartcode = MyBase.Columns("partcode") Me.columnpartname = MyBase.Columns("partname") Me.columnstandardpack = MyBase.Columns("standardpack") Me.columnmodel = MyBase.Columns("model") Me.columnadditional = MyBase.Columns("additional") Me.columnfactory = MyBase.Columns("factory") Me.columnlastupdated = MyBase.Columns("lastupdated") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnpart_id = New Global.System.Data.DataColumn("part_id", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpart_id) Me.columnpartcode = New Global.System.Data.DataColumn("partcode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartcode) Me.columnpartname = New Global.System.Data.DataColumn("partname", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartname) Me.columnstandardpack = New Global.System.Data.DataColumn("standardpack", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstandardpack) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnadditional = New Global.System.Data.DataColumn("additional", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnadditional) Me.columnfactory = New Global.System.Data.DataColumn("factory", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnfactory) Me.columnlastupdated = New Global.System.Data.DataColumn("lastupdated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdated) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnpart_id}, true)) Me.columnpart_id.AutoIncrement = true Me.columnpart_id.AutoIncrementSeed = -1 Me.columnpart_id.AutoIncrementStep = -1 Me.columnpart_id.AllowDBNull = false Me.columnpart_id.ReadOnly = true Me.columnpart_id.Unique = true Me.columnpartcode.AllowDBNull = false Me.columnpartcode.MaxLength = 2147483647 Me.columnpartname.AllowDBNull = false Me.columnpartname.MaxLength = 2147483647 Me.columnstandardpack.AllowDBNull = false Me.columnmodel.AllowDBNull = false Me.columnmodel.MaxLength = 2147483647 Me.columnadditional.AllowDBNull = false Me.columnadditional.MaxLength = 2147483647 Me.columnfactory.MaxLength = 2147483647 Me.columnlastupdatedby.MaxLength = 2147483647 End Sub _ Public Function NewpartsCodeRow() As partsCodeRow Return CType(Me.NewRow,partsCodeRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New partsCodeRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(partsCodeRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.partsCodeRowChangedEvent) Is Nothing) Then RaiseEvent partsCodeRowChanged(Me, New partsCodeRowChangeEvent(CType(e.Row,partsCodeRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.partsCodeRowChangingEvent) Is Nothing) Then RaiseEvent partsCodeRowChanging(Me, New partsCodeRowChangeEvent(CType(e.Row,partsCodeRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.partsCodeRowDeletedEvent) Is Nothing) Then RaiseEvent partsCodeRowDeleted(Me, New partsCodeRowChangeEvent(CType(e.Row,partsCodeRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.partsCodeRowDeletingEvent) Is Nothing) Then RaiseEvent partsCodeRowDeleting(Me, New partsCodeRowChangeEvent(CType(e.Row,partsCodeRow), e.Action)) End If End Sub _ Public Sub RemovepartsCodeRow(ByVal row As partsCodeRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "partsCodeDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class PartsModelDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnAccount As Global.System.Data.DataColumn Private columnModelCode As Global.System.Data.DataColumn Private columnDescription As Global.System.Data.DataColumn Private columnControlID As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "PartsModel" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property AccountColumn() As Global.System.Data.DataColumn Get Return Me.columnAccount End Get End Property _ Public ReadOnly Property ModelCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnModelCode End Get End Property _ Public ReadOnly Property DescriptionColumn() As Global.System.Data.DataColumn Get Return Me.columnDescription End Get End Property _ Public ReadOnly Property ControlIDColumn() As Global.System.Data.DataColumn Get Return Me.columnControlID End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As PartsModelRow Get Return CType(Me.Rows(index),PartsModelRow) End Get End Property _ Public Event PartsModelRowChanging As PartsModelRowChangeEventHandler _ Public Event PartsModelRowChanged As PartsModelRowChangeEventHandler _ Public Event PartsModelRowDeleting As PartsModelRowChangeEventHandler _ Public Event PartsModelRowDeleted As PartsModelRowChangeEventHandler _ Public Overloads Sub AddPartsModelRow(ByVal row As PartsModelRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddPartsModelRow(ByVal Account As String, ByVal ModelCode As String, ByVal Description As String) As PartsModelRow Dim rowPartsModelRow As PartsModelRow = CType(Me.NewRow,PartsModelRow) Dim columnValuesArray() As Object = New Object() {Account, ModelCode, Description, Nothing} rowPartsModelRow.ItemArray = columnValuesArray Me.Rows.Add(rowPartsModelRow) Return rowPartsModelRow End Function _ Public Function FindByControlID(ByVal ControlID As Integer) As PartsModelRow Return CType(Me.Rows.Find(New Object() {ControlID}),PartsModelRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As PartsModelDataTable = CType(MyBase.Clone,PartsModelDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New PartsModelDataTable() End Function _ Friend Sub InitVars() Me.columnAccount = MyBase.Columns("Account") Me.columnModelCode = MyBase.Columns("ModelCode") Me.columnDescription = MyBase.Columns("Description") Me.columnControlID = MyBase.Columns("ControlID") End Sub _ Private Sub InitClass() Me.columnAccount = New Global.System.Data.DataColumn("Account", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAccount) Me.columnModelCode = New Global.System.Data.DataColumn("ModelCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModelCode) Me.columnDescription = New Global.System.Data.DataColumn("Description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDescription) Me.columnControlID = New Global.System.Data.DataColumn("ControlID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnControlID) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnControlID}, true)) Me.columnAccount.AllowDBNull = false Me.columnAccount.MaxLength = 2147483647 Me.columnModelCode.AllowDBNull = false Me.columnModelCode.MaxLength = 50 Me.columnDescription.AllowDBNull = false Me.columnDescription.MaxLength = 2147483647 Me.columnControlID.AutoIncrement = true Me.columnControlID.AutoIncrementSeed = -1 Me.columnControlID.AutoIncrementStep = -1 Me.columnControlID.AllowDBNull = false Me.columnControlID.ReadOnly = true Me.columnControlID.Unique = true End Sub _ Public Function NewPartsModelRow() As PartsModelRow Return CType(Me.NewRow,PartsModelRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New PartsModelRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(PartsModelRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.PartsModelRowChangedEvent) Is Nothing) Then RaiseEvent PartsModelRowChanged(Me, New PartsModelRowChangeEvent(CType(e.Row,PartsModelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.PartsModelRowChangingEvent) Is Nothing) Then RaiseEvent PartsModelRowChanging(Me, New PartsModelRowChangeEvent(CType(e.Row,PartsModelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.PartsModelRowDeletedEvent) Is Nothing) Then RaiseEvent PartsModelRowDeleted(Me, New PartsModelRowChangeEvent(CType(e.Row,PartsModelRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.PartsModelRowDeletingEvent) Is Nothing) Then RaiseEvent PartsModelRowDeleting(Me, New PartsModelRowChangeEvent(CType(e.Row,PartsModelRow), e.Action)) End If End Sub _ Public Sub RemovePartsModelRow(ByVal row As PartsModelRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "PartsModelDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class PartsPrepDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnControl_ID As Global.System.Data.DataColumn Private columnIonics_PN As Global.System.Data.DataColumn Private columnEpson_PN As Global.System.Data.DataColumn Private columnSupplier_PN As Global.System.Data.DataColumn Private columnDescription As Global.System.Data.DataColumn Private columnRack As Global.System.Data.DataColumn Private columnCom_Type As Global.System.Data.DataColumn Private columnModelCode As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "PartsPrep" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Control_IDColumn() As Global.System.Data.DataColumn Get Return Me.columnControl_ID End Get End Property _ Public ReadOnly Property Ionics_PNColumn() As Global.System.Data.DataColumn Get Return Me.columnIonics_PN End Get End Property _ Public ReadOnly Property Epson_PNColumn() As Global.System.Data.DataColumn Get Return Me.columnEpson_PN End Get End Property _ Public ReadOnly Property Supplier_PNColumn() As Global.System.Data.DataColumn Get Return Me.columnSupplier_PN End Get End Property _ Public ReadOnly Property DescriptionColumn() As Global.System.Data.DataColumn Get Return Me.columnDescription End Get End Property _ Public ReadOnly Property RackColumn() As Global.System.Data.DataColumn Get Return Me.columnRack End Get End Property _ Public ReadOnly Property Com_TypeColumn() As Global.System.Data.DataColumn Get Return Me.columnCom_Type End Get End Property _ Public ReadOnly Property ModelCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnModelCode End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As PartsPrepRow Get Return CType(Me.Rows(index),PartsPrepRow) End Get End Property _ Public Event PartsPrepRowChanging As PartsPrepRowChangeEventHandler _ Public Event PartsPrepRowChanged As PartsPrepRowChangeEventHandler _ Public Event PartsPrepRowDeleting As PartsPrepRowChangeEventHandler _ Public Event PartsPrepRowDeleted As PartsPrepRowChangeEventHandler _ Public Overloads Sub AddPartsPrepRow(ByVal row As PartsPrepRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddPartsPrepRow(ByVal Ionics_PN As String, ByVal Epson_PN As String, ByVal Supplier_PN As String, ByVal Description As String, ByVal Rack As String, ByVal Com_Type As String, ByVal ModelCode As String) As PartsPrepRow Dim rowPartsPrepRow As PartsPrepRow = CType(Me.NewRow,PartsPrepRow) Dim columnValuesArray() As Object = New Object() {Nothing, Ionics_PN, Epson_PN, Supplier_PN, Description, Rack, Com_Type, ModelCode} rowPartsPrepRow.ItemArray = columnValuesArray Me.Rows.Add(rowPartsPrepRow) Return rowPartsPrepRow End Function _ Public Function FindByControl_ID(ByVal Control_ID As Integer) As PartsPrepRow Return CType(Me.Rows.Find(New Object() {Control_ID}),PartsPrepRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As PartsPrepDataTable = CType(MyBase.Clone,PartsPrepDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New PartsPrepDataTable() End Function _ Friend Sub InitVars() Me.columnControl_ID = MyBase.Columns("Control_ID") Me.columnIonics_PN = MyBase.Columns("Ionics_PN") Me.columnEpson_PN = MyBase.Columns("Epson_PN") Me.columnSupplier_PN = MyBase.Columns("Supplier_PN") Me.columnDescription = MyBase.Columns("Description") Me.columnRack = MyBase.Columns("Rack") Me.columnCom_Type = MyBase.Columns("Com_Type") Me.columnModelCode = MyBase.Columns("ModelCode") End Sub _ Private Sub InitClass() Me.columnControl_ID = New Global.System.Data.DataColumn("Control_ID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnControl_ID) Me.columnIonics_PN = New Global.System.Data.DataColumn("Ionics_PN", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnIonics_PN) Me.columnEpson_PN = New Global.System.Data.DataColumn("Epson_PN", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnEpson_PN) Me.columnSupplier_PN = New Global.System.Data.DataColumn("Supplier_PN", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSupplier_PN) Me.columnDescription = New Global.System.Data.DataColumn("Description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDescription) Me.columnRack = New Global.System.Data.DataColumn("Rack", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRack) Me.columnCom_Type = New Global.System.Data.DataColumn("Com_Type", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCom_Type) Me.columnModelCode = New Global.System.Data.DataColumn("ModelCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModelCode) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnControl_ID}, true)) Me.columnControl_ID.AutoIncrement = true Me.columnControl_ID.AutoIncrementSeed = -1 Me.columnControl_ID.AutoIncrementStep = -1 Me.columnControl_ID.AllowDBNull = false Me.columnControl_ID.ReadOnly = true Me.columnControl_ID.Unique = true Me.columnIonics_PN.AllowDBNull = false Me.columnIonics_PN.MaxLength = 15 Me.columnEpson_PN.AllowDBNull = false Me.columnEpson_PN.MaxLength = 50 Me.columnSupplier_PN.AllowDBNull = false Me.columnSupplier_PN.MaxLength = 50 Me.columnDescription.AllowDBNull = false Me.columnDescription.MaxLength = 2147483647 Me.columnRack.AllowDBNull = false Me.columnRack.MaxLength = 5 Me.columnCom_Type.AllowDBNull = false Me.columnCom_Type.MaxLength = 50 Me.columnModelCode.MaxLength = 2147483647 End Sub _ Public Function NewPartsPrepRow() As PartsPrepRow Return CType(Me.NewRow,PartsPrepRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New PartsPrepRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(PartsPrepRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.PartsPrepRowChangedEvent) Is Nothing) Then RaiseEvent PartsPrepRowChanged(Me, New PartsPrepRowChangeEvent(CType(e.Row,PartsPrepRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.PartsPrepRowChangingEvent) Is Nothing) Then RaiseEvent PartsPrepRowChanging(Me, New PartsPrepRowChangeEvent(CType(e.Row,PartsPrepRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.PartsPrepRowDeletedEvent) Is Nothing) Then RaiseEvent PartsPrepRowDeleted(Me, New PartsPrepRowChangeEvent(CType(e.Row,PartsPrepRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.PartsPrepRowDeletingEvent) Is Nothing) Then RaiseEvent PartsPrepRowDeleting(Me, New PartsPrepRowChangeEvent(CType(e.Row,PartsPrepRow), e.Action)) End If End Sub _ Public Sub RemovePartsPrepRow(ByVal row As PartsPrepRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "PartsPrepDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class PartsRecordsDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnSerialNum As Global.System.Data.DataColumn Private columnIonicsPN As Global.System.Data.DataColumn Private columnEpsonPN As Global.System.Data.DataColumn Private columnSupplierPN As Global.System.Data.DataColumn Private columnDescription As Global.System.Data.DataColumn Private columnLotNO As Global.System.Data.DataColumn Private columnRack As Global.System.Data.DataColumn Private columnQty As Global.System.Data.DataColumn Private columnStatus As Global.System.Data.DataColumn Private columnEOH As Global.System.Data.DataColumn Private columnSPQ As Global.System.Data.DataColumn Private columnMFGDate As Global.System.Data.DataColumn Private columnRCVDate As Global.System.Data.DataColumn Private columnPrintedDate As Global.System.Data.DataColumn Private columnPrintedBy As Global.System.Data.DataColumn Private columnReturned As Global.System.Data.DataColumn Private columnControlID As Global.System.Data.DataColumn Private columnRemarks As Global.System.Data.DataColumn Private columnModelCode As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "PartsRecords" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property SerialNumColumn() As Global.System.Data.DataColumn Get Return Me.columnSerialNum End Get End Property _ Public ReadOnly Property IonicsPNColumn() As Global.System.Data.DataColumn Get Return Me.columnIonicsPN End Get End Property _ Public ReadOnly Property EpsonPNColumn() As Global.System.Data.DataColumn Get Return Me.columnEpsonPN End Get End Property _ Public ReadOnly Property SupplierPNColumn() As Global.System.Data.DataColumn Get Return Me.columnSupplierPN End Get End Property _ Public ReadOnly Property DescriptionColumn() As Global.System.Data.DataColumn Get Return Me.columnDescription End Get End Property _ Public ReadOnly Property LotNOColumn() As Global.System.Data.DataColumn Get Return Me.columnLotNO End Get End Property _ Public ReadOnly Property RackColumn() As Global.System.Data.DataColumn Get Return Me.columnRack End Get End Property _ Public ReadOnly Property QtyColumn() As Global.System.Data.DataColumn Get Return Me.columnQty End Get End Property _ Public ReadOnly Property StatusColumn() As Global.System.Data.DataColumn Get Return Me.columnStatus End Get End Property _ Public ReadOnly Property EOHColumn() As Global.System.Data.DataColumn Get Return Me.columnEOH End Get End Property _ Public ReadOnly Property SPQColumn() As Global.System.Data.DataColumn Get Return Me.columnSPQ End Get End Property _ Public ReadOnly Property MFGDateColumn() As Global.System.Data.DataColumn Get Return Me.columnMFGDate End Get End Property _ Public ReadOnly Property RCVDateColumn() As Global.System.Data.DataColumn Get Return Me.columnRCVDate End Get End Property _ Public ReadOnly Property PrintedDateColumn() As Global.System.Data.DataColumn Get Return Me.columnPrintedDate End Get End Property _ Public ReadOnly Property PrintedByColumn() As Global.System.Data.DataColumn Get Return Me.columnPrintedBy End Get End Property _ Public ReadOnly Property ReturnedColumn() As Global.System.Data.DataColumn Get Return Me.columnReturned End Get End Property _ Public ReadOnly Property ControlIDColumn() As Global.System.Data.DataColumn Get Return Me.columnControlID End Get End Property _ Public ReadOnly Property RemarksColumn() As Global.System.Data.DataColumn Get Return Me.columnRemarks End Get End Property _ Public ReadOnly Property ModelCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnModelCode End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As PartsRecordsRow Get Return CType(Me.Rows(index),PartsRecordsRow) End Get End Property _ Public Event PartsRecordsRowChanging As PartsRecordsRowChangeEventHandler _ Public Event PartsRecordsRowChanged As PartsRecordsRowChangeEventHandler _ Public Event PartsRecordsRowDeleting As PartsRecordsRowChangeEventHandler _ Public Event PartsRecordsRowDeleted As PartsRecordsRowChangeEventHandler _ Public Overloads Sub AddPartsRecordsRow(ByVal row As PartsRecordsRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddPartsRecordsRow( _ ByVal SerialNum As String, _ ByVal IonicsPN As String, _ ByVal EpsonPN As String, _ ByVal SupplierPN As String, _ ByVal Description As String, _ ByVal LotNO As String, _ ByVal Rack As String, _ ByVal Qty As Integer, _ ByVal Status As String, _ ByVal EOH As Integer, _ ByVal SPQ As Integer, _ ByVal MFGDate As Date, _ ByVal RCVDate As Date, _ ByVal PrintedDate As Date, _ ByVal PrintedBy As String, _ ByVal Returned As Integer, _ ByVal Remarks As String, _ ByVal ModelCode As String) As PartsRecordsRow Dim rowPartsRecordsRow As PartsRecordsRow = CType(Me.NewRow,PartsRecordsRow) Dim columnValuesArray() As Object = New Object() {SerialNum, IonicsPN, EpsonPN, SupplierPN, Description, LotNO, Rack, Qty, Status, EOH, SPQ, MFGDate, RCVDate, PrintedDate, PrintedBy, Returned, Nothing, Remarks, ModelCode} rowPartsRecordsRow.ItemArray = columnValuesArray Me.Rows.Add(rowPartsRecordsRow) Return rowPartsRecordsRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As PartsRecordsDataTable = CType(MyBase.Clone,PartsRecordsDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New PartsRecordsDataTable() End Function _ Friend Sub InitVars() Me.columnSerialNum = MyBase.Columns("SerialNum") Me.columnIonicsPN = MyBase.Columns("IonicsPN") Me.columnEpsonPN = MyBase.Columns("EpsonPN") Me.columnSupplierPN = MyBase.Columns("SupplierPN") Me.columnDescription = MyBase.Columns("Description") Me.columnLotNO = MyBase.Columns("LotNO") Me.columnRack = MyBase.Columns("Rack") Me.columnQty = MyBase.Columns("Qty") Me.columnStatus = MyBase.Columns("Status") Me.columnEOH = MyBase.Columns("EOH") Me.columnSPQ = MyBase.Columns("SPQ") Me.columnMFGDate = MyBase.Columns("MFGDate") Me.columnRCVDate = MyBase.Columns("RCVDate") Me.columnPrintedDate = MyBase.Columns("PrintedDate") Me.columnPrintedBy = MyBase.Columns("PrintedBy") Me.columnReturned = MyBase.Columns("Returned") Me.columnControlID = MyBase.Columns("ControlID") Me.columnRemarks = MyBase.Columns("Remarks") Me.columnModelCode = MyBase.Columns("ModelCode") End Sub _ Private Sub InitClass() Me.columnSerialNum = New Global.System.Data.DataColumn("SerialNum", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSerialNum) Me.columnIonicsPN = New Global.System.Data.DataColumn("IonicsPN", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnIonicsPN) Me.columnEpsonPN = New Global.System.Data.DataColumn("EpsonPN", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnEpsonPN) Me.columnSupplierPN = New Global.System.Data.DataColumn("SupplierPN", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSupplierPN) Me.columnDescription = New Global.System.Data.DataColumn("Description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDescription) Me.columnLotNO = New Global.System.Data.DataColumn("LotNO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLotNO) Me.columnRack = New Global.System.Data.DataColumn("Rack", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRack) Me.columnQty = New Global.System.Data.DataColumn("Qty", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnQty) Me.columnStatus = New Global.System.Data.DataColumn("Status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnStatus) Me.columnEOH = New Global.System.Data.DataColumn("EOH", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnEOH) Me.columnSPQ = New Global.System.Data.DataColumn("SPQ", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSPQ) Me.columnMFGDate = New Global.System.Data.DataColumn("MFGDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnMFGDate) Me.columnRCVDate = New Global.System.Data.DataColumn("RCVDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRCVDate) Me.columnPrintedDate = New Global.System.Data.DataColumn("PrintedDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPrintedDate) Me.columnPrintedBy = New Global.System.Data.DataColumn("PrintedBy", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPrintedBy) Me.columnReturned = New Global.System.Data.DataColumn("Returned", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnReturned) Me.columnControlID = New Global.System.Data.DataColumn("ControlID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnControlID) Me.columnRemarks = New Global.System.Data.DataColumn("Remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRemarks) Me.columnModelCode = New Global.System.Data.DataColumn("ModelCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModelCode) Me.columnSerialNum.AllowDBNull = false Me.columnSerialNum.MaxLength = 2147483647 Me.columnIonicsPN.AllowDBNull = false Me.columnIonicsPN.MaxLength = 2147483647 Me.columnEpsonPN.AllowDBNull = false Me.columnEpsonPN.MaxLength = 2147483647 Me.columnSupplierPN.AllowDBNull = false Me.columnSupplierPN.MaxLength = 2147483647 Me.columnDescription.MaxLength = 2147483647 Me.columnLotNO.AllowDBNull = false Me.columnLotNO.MaxLength = 2147483647 Me.columnRack.AllowDBNull = false Me.columnRack.MaxLength = 2147483647 Me.columnQty.AllowDBNull = false Me.columnStatus.AllowDBNull = false Me.columnStatus.MaxLength = 2147483647 Me.columnMFGDate.AllowDBNull = false Me.columnRCVDate.AllowDBNull = false Me.columnPrintedDate.AllowDBNull = false Me.columnPrintedBy.AllowDBNull = false Me.columnPrintedBy.MaxLength = 2147483647 Me.columnReturned.AllowDBNull = false Me.columnControlID.AutoIncrement = true Me.columnControlID.AutoIncrementSeed = -1 Me.columnControlID.AutoIncrementStep = -1 Me.columnControlID.AllowDBNull = false Me.columnControlID.ReadOnly = true Me.columnRemarks.MaxLength = 2147483647 Me.columnModelCode.MaxLength = 2147483647 End Sub _ Public Function NewPartsRecordsRow() As PartsRecordsRow Return CType(Me.NewRow,PartsRecordsRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New PartsRecordsRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(PartsRecordsRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.PartsRecordsRowChangedEvent) Is Nothing) Then RaiseEvent PartsRecordsRowChanged(Me, New PartsRecordsRowChangeEvent(CType(e.Row,PartsRecordsRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.PartsRecordsRowChangingEvent) Is Nothing) Then RaiseEvent PartsRecordsRowChanging(Me, New PartsRecordsRowChangeEvent(CType(e.Row,PartsRecordsRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.PartsRecordsRowDeletedEvent) Is Nothing) Then RaiseEvent PartsRecordsRowDeleted(Me, New PartsRecordsRowChangeEvent(CType(e.Row,PartsRecordsRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.PartsRecordsRowDeletingEvent) Is Nothing) Then RaiseEvent PartsRecordsRowDeleting(Me, New PartsRecordsRowChangeEvent(CType(e.Row,PartsRecordsRow), e.Action)) End If End Sub _ Public Sub RemovePartsRecordsRow(ByVal row As PartsRecordsRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "PartsRecordsDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class partsStationDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnstation_id As Global.System.Data.DataColumn Private columnstation_code As Global.System.Data.DataColumn Private columnsupplier_id As Global.System.Data.DataColumn Private columnlastupdated As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "partsStation" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property station_idColumn() As Global.System.Data.DataColumn Get Return Me.columnstation_id End Get End Property _ Public ReadOnly Property station_codeColumn() As Global.System.Data.DataColumn Get Return Me.columnstation_code End Get End Property _ Public ReadOnly Property supplier_idColumn() As Global.System.Data.DataColumn Get Return Me.columnsupplier_id End Get End Property _ Public ReadOnly Property lastupdatedColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdated End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As partsStationRow Get Return CType(Me.Rows(index),partsStationRow) End Get End Property _ Public Event partsStationRowChanging As partsStationRowChangeEventHandler _ Public Event partsStationRowChanged As partsStationRowChangeEventHandler _ Public Event partsStationRowDeleting As partsStationRowChangeEventHandler _ Public Event partsStationRowDeleted As partsStationRowChangeEventHandler _ Public Overloads Sub AddpartsStationRow(ByVal row As partsStationRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddpartsStationRow(ByVal station_code As String, ByVal supplier_id As Integer, ByVal lastupdated As Date, ByVal lastupdatedby As String) As partsStationRow Dim rowpartsStationRow As partsStationRow = CType(Me.NewRow,partsStationRow) Dim columnValuesArray() As Object = New Object() {Nothing, station_code, supplier_id, lastupdated, lastupdatedby} rowpartsStationRow.ItemArray = columnValuesArray Me.Rows.Add(rowpartsStationRow) Return rowpartsStationRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As partsStationDataTable = CType(MyBase.Clone,partsStationDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New partsStationDataTable() End Function _ Friend Sub InitVars() Me.columnstation_id = MyBase.Columns("station_id") Me.columnstation_code = MyBase.Columns("station_code") Me.columnsupplier_id = MyBase.Columns("supplier_id") Me.columnlastupdated = MyBase.Columns("lastupdated") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnstation_id = New Global.System.Data.DataColumn("station_id", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation_id) Me.columnstation_code = New Global.System.Data.DataColumn("station_code", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation_code) Me.columnsupplier_id = New Global.System.Data.DataColumn("supplier_id", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsupplier_id) Me.columnlastupdated = New Global.System.Data.DataColumn("lastupdated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdated) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnstation_id.AutoIncrement = true Me.columnstation_id.AutoIncrementSeed = -1 Me.columnstation_id.AutoIncrementStep = -1 Me.columnstation_id.AllowDBNull = false Me.columnstation_id.ReadOnly = true Me.columnstation_code.MaxLength = 2147483647 Me.columnlastupdatedby.MaxLength = 2147483647 End Sub _ Public Function NewpartsStationRow() As partsStationRow Return CType(Me.NewRow,partsStationRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New partsStationRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(partsStationRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.partsStationRowChangedEvent) Is Nothing) Then RaiseEvent partsStationRowChanged(Me, New partsStationRowChangeEvent(CType(e.Row,partsStationRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.partsStationRowChangingEvent) Is Nothing) Then RaiseEvent partsStationRowChanging(Me, New partsStationRowChangeEvent(CType(e.Row,partsStationRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.partsStationRowDeletedEvent) Is Nothing) Then RaiseEvent partsStationRowDeleted(Me, New partsStationRowChangeEvent(CType(e.Row,partsStationRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.partsStationRowDeletingEvent) Is Nothing) Then RaiseEvent partsStationRowDeleting(Me, New partsStationRowChangeEvent(CType(e.Row,partsStationRow), e.Action)) End If End Sub _ Public Sub RemovepartsStationRow(ByVal row As partsStationRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "partsStationDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class partsSupplierDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnsupplier_id As Global.System.Data.DataColumn Private columnsupplier_name As Global.System.Data.DataColumn Private columnlastupdated As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "partsSupplier" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property supplier_idColumn() As Global.System.Data.DataColumn Get Return Me.columnsupplier_id End Get End Property _ Public ReadOnly Property supplier_nameColumn() As Global.System.Data.DataColumn Get Return Me.columnsupplier_name End Get End Property _ Public ReadOnly Property lastupdatedColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdated End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As partsSupplierRow Get Return CType(Me.Rows(index),partsSupplierRow) End Get End Property _ Public Event partsSupplierRowChanging As partsSupplierRowChangeEventHandler _ Public Event partsSupplierRowChanged As partsSupplierRowChangeEventHandler _ Public Event partsSupplierRowDeleting As partsSupplierRowChangeEventHandler _ Public Event partsSupplierRowDeleted As partsSupplierRowChangeEventHandler _ Public Overloads Sub AddpartsSupplierRow(ByVal row As partsSupplierRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddpartsSupplierRow(ByVal supplier_name As String, ByVal lastupdated As Date, ByVal lastupdatedby As String) As partsSupplierRow Dim rowpartsSupplierRow As partsSupplierRow = CType(Me.NewRow,partsSupplierRow) Dim columnValuesArray() As Object = New Object() {Nothing, supplier_name, lastupdated, lastupdatedby} rowpartsSupplierRow.ItemArray = columnValuesArray Me.Rows.Add(rowpartsSupplierRow) Return rowpartsSupplierRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As partsSupplierDataTable = CType(MyBase.Clone,partsSupplierDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New partsSupplierDataTable() End Function _ Friend Sub InitVars() Me.columnsupplier_id = MyBase.Columns("supplier_id") Me.columnsupplier_name = MyBase.Columns("supplier_name") Me.columnlastupdated = MyBase.Columns("lastupdated") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnsupplier_id = New Global.System.Data.DataColumn("supplier_id", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsupplier_id) Me.columnsupplier_name = New Global.System.Data.DataColumn("supplier_name", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsupplier_name) Me.columnlastupdated = New Global.System.Data.DataColumn("lastupdated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdated) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnsupplier_id.AutoIncrement = true Me.columnsupplier_id.AutoIncrementSeed = -1 Me.columnsupplier_id.AutoIncrementStep = -1 Me.columnsupplier_id.AllowDBNull = false Me.columnsupplier_id.ReadOnly = true Me.columnsupplier_name.MaxLength = 2147483647 Me.columnlastupdatedby.MaxLength = 2147483647 End Sub _ Public Function NewpartsSupplierRow() As partsSupplierRow Return CType(Me.NewRow,partsSupplierRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New partsSupplierRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(partsSupplierRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.partsSupplierRowChangedEvent) Is Nothing) Then RaiseEvent partsSupplierRowChanged(Me, New partsSupplierRowChangeEvent(CType(e.Row,partsSupplierRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.partsSupplierRowChangingEvent) Is Nothing) Then RaiseEvent partsSupplierRowChanging(Me, New partsSupplierRowChangeEvent(CType(e.Row,partsSupplierRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.partsSupplierRowDeletedEvent) Is Nothing) Then RaiseEvent partsSupplierRowDeleted(Me, New partsSupplierRowChangeEvent(CType(e.Row,partsSupplierRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.partsSupplierRowDeletingEvent) Is Nothing) Then RaiseEvent partsSupplierRowDeleting(Me, New partsSupplierRowChangeEvent(CType(e.Row,partsSupplierRow), e.Action)) End If End Sub _ Public Sub RemovepartsSupplierRow(ByVal row As partsSupplierRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "partsSupplierDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class po_detailDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnpoNumber As Global.System.Data.DataColumn Private columnsoNumber As Global.System.Data.DataColumn Private columnpoDate As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columncustPoLine As Global.System.Data.DataColumn Private columnsoline As Global.System.Data.DataColumn Private columnalvsoline As Global.System.Data.DataColumn Private columnduedate As Global.System.Data.DataColumn Private columncustpartnumber As Global.System.Data.DataColumn Private columnparentpartnumber As Global.System.Data.DataColumn Private columnchildpartnumber As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columncustpart As Global.System.Data.DataColumn Private columncustpartno As Global.System.Data.DataColumn Private columncustpartdesc As Global.System.Data.DataColumn Private columncustgif As Global.System.Data.DataColumn Private columntargetDate As Global.System.Data.DataColumn Private columnflag2 As Global.System.Data.DataColumn Private columnflag3 As Global.System.Data.DataColumn Private columnremarks As Global.System.Data.DataColumn Private columnlineComments As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "po_detail" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property poNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnpoNumber End Get End Property _ Public ReadOnly Property soNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnsoNumber End Get End Property _ Public ReadOnly Property poDateColumn() As Global.System.Data.DataColumn Get Return Me.columnpoDate End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property custPoLineColumn() As Global.System.Data.DataColumn Get Return Me.columncustPoLine End Get End Property _ Public ReadOnly Property solineColumn() As Global.System.Data.DataColumn Get Return Me.columnsoline End Get End Property _ Public ReadOnly Property alvsolineColumn() As Global.System.Data.DataColumn Get Return Me.columnalvsoline End Get End Property _ Public ReadOnly Property duedateColumn() As Global.System.Data.DataColumn Get Return Me.columnduedate End Get End Property _ Public ReadOnly Property custpartnumberColumn() As Global.System.Data.DataColumn Get Return Me.columncustpartnumber End Get End Property _ Public ReadOnly Property parentpartnumberColumn() As Global.System.Data.DataColumn Get Return Me.columnparentpartnumber End Get End Property _ Public ReadOnly Property childpartnumberColumn() As Global.System.Data.DataColumn Get Return Me.columnchildpartnumber End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property custpartColumn() As Global.System.Data.DataColumn Get Return Me.columncustpart End Get End Property _ Public ReadOnly Property custpartnoColumn() As Global.System.Data.DataColumn Get Return Me.columncustpartno End Get End Property _ Public ReadOnly Property custpartdescColumn() As Global.System.Data.DataColumn Get Return Me.columncustpartdesc End Get End Property _ Public ReadOnly Property custgifColumn() As Global.System.Data.DataColumn Get Return Me.columncustgif End Get End Property _ Public ReadOnly Property targetDateColumn() As Global.System.Data.DataColumn Get Return Me.columntargetDate End Get End Property _ Public ReadOnly Property flag2Column() As Global.System.Data.DataColumn Get Return Me.columnflag2 End Get End Property _ Public ReadOnly Property flag3Column() As Global.System.Data.DataColumn Get Return Me.columnflag3 End Get End Property _ Public ReadOnly Property remarksColumn() As Global.System.Data.DataColumn Get Return Me.columnremarks End Get End Property _ Public ReadOnly Property lineCommentsColumn() As Global.System.Data.DataColumn Get Return Me.columnlineComments End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As po_detailRow Get Return CType(Me.Rows(index),po_detailRow) End Get End Property _ Public Event po_detailRowChanging As po_detailRowChangeEventHandler _ Public Event po_detailRowChanged As po_detailRowChangeEventHandler _ Public Event po_detailRowDeleting As po_detailRowChangeEventHandler _ Public Event po_detailRowDeleted As po_detailRowChangeEventHandler _ Public Overloads Sub Addpo_detailRow(ByVal row As po_detailRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpo_detailRow( _ ByVal poNumber As String, _ ByVal soNumber As String, _ ByVal poDate As Date, _ ByVal poLine As Decimal, _ ByVal custPoLine As Decimal, _ ByVal soline As String, _ ByVal alvsoline As Decimal, _ ByVal duedate As Date, _ ByVal custpartnumber As String, _ ByVal parentpartnumber As String, _ ByVal childpartnumber As String, _ ByVal quantity As Decimal, _ ByVal custpart As String, _ ByVal custpartno As String, _ ByVal custpartdesc As String, _ ByVal custgif As String, _ ByVal targetDate As Date, _ ByVal flag2 As String, _ ByVal flag3 As String, _ ByVal remarks As String, _ ByVal lineComments As String) As po_detailRow Dim rowpo_detailRow As po_detailRow = CType(Me.NewRow,po_detailRow) Dim columnValuesArray() As Object = New Object() {poNumber, soNumber, poDate, poLine, custPoLine, soline, alvsoline, duedate, custpartnumber, parentpartnumber, childpartnumber, quantity, custpart, custpartno, custpartdesc, custgif, targetDate, flag2, flag3, remarks, lineComments} rowpo_detailRow.ItemArray = columnValuesArray Me.Rows.Add(rowpo_detailRow) Return rowpo_detailRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As po_detailDataTable = CType(MyBase.Clone,po_detailDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New po_detailDataTable() End Function _ Friend Sub InitVars() Me.columnpoNumber = MyBase.Columns("poNumber") Me.columnsoNumber = MyBase.Columns("soNumber") Me.columnpoDate = MyBase.Columns("poDate") Me.columnpoLine = MyBase.Columns("poLine") Me.columncustPoLine = MyBase.Columns("custPoLine") Me.columnsoline = MyBase.Columns("soline") Me.columnalvsoline = MyBase.Columns("alvsoline") Me.columnduedate = MyBase.Columns("duedate") Me.columncustpartnumber = MyBase.Columns("custpartnumber") Me.columnparentpartnumber = MyBase.Columns("parentpartnumber") Me.columnchildpartnumber = MyBase.Columns("childpartnumber") Me.columnquantity = MyBase.Columns("quantity") Me.columncustpart = MyBase.Columns("custpart") Me.columncustpartno = MyBase.Columns("custpartno") Me.columncustpartdesc = MyBase.Columns("custpartdesc") Me.columncustgif = MyBase.Columns("custgif") Me.columntargetDate = MyBase.Columns("targetDate") Me.columnflag2 = MyBase.Columns("flag2") Me.columnflag3 = MyBase.Columns("flag3") Me.columnremarks = MyBase.Columns("remarks") Me.columnlineComments = MyBase.Columns("lineComments") End Sub _ Private Sub InitClass() Me.columnpoNumber = New Global.System.Data.DataColumn("poNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoNumber) Me.columnsoNumber = New Global.System.Data.DataColumn("soNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsoNumber) Me.columnpoDate = New Global.System.Data.DataColumn("poDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoDate) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columncustPoLine = New Global.System.Data.DataColumn("custPoLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustPoLine) Me.columnsoline = New Global.System.Data.DataColumn("soline", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsoline) Me.columnalvsoline = New Global.System.Data.DataColumn("alvsoline", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnalvsoline) Me.columnduedate = New Global.System.Data.DataColumn("duedate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnduedate) Me.columncustpartnumber = New Global.System.Data.DataColumn("custpartnumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustpartnumber) Me.columnparentpartnumber = New Global.System.Data.DataColumn("parentpartnumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnparentpartnumber) Me.columnchildpartnumber = New Global.System.Data.DataColumn("childpartnumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnchildpartnumber) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columncustpart = New Global.System.Data.DataColumn("custpart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustpart) Me.columncustpartno = New Global.System.Data.DataColumn("custpartno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustpartno) Me.columncustpartdesc = New Global.System.Data.DataColumn("custpartdesc", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustpartdesc) Me.columncustgif = New Global.System.Data.DataColumn("custgif", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustgif) Me.columntargetDate = New Global.System.Data.DataColumn("targetDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntargetDate) Me.columnflag2 = New Global.System.Data.DataColumn("flag2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnflag2) Me.columnflag3 = New Global.System.Data.DataColumn("flag3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnflag3) Me.columnremarks = New Global.System.Data.DataColumn("remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnremarks) Me.columnlineComments = New Global.System.Data.DataColumn("lineComments", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineComments) Me.columnpoNumber.MaxLength = 8 Me.columnsoNumber.MaxLength = 7 Me.columnsoline.AllowDBNull = false Me.columnsoline.MaxLength = 1 Me.columncustpartnumber.MaxLength = 25 Me.columnparentpartnumber.AllowDBNull = false Me.columnparentpartnumber.MaxLength = 1 Me.columnchildpartnumber.AllowDBNull = false Me.columnchildpartnumber.MaxLength = 1 Me.columncustpart.MaxLength = 40 Me.columncustpartno.MaxLength = 50 Me.columncustpartdesc.MaxLength = 48 Me.columncustgif.MaxLength = 24 Me.columnflag2.MaxLength = 1 Me.columnflag3.MaxLength = 1 Me.columnremarks.MaxLength = 50 Me.columnlineComments.MaxLength = 1040 End Sub _ Public Function Newpo_detailRow() As po_detailRow Return CType(Me.NewRow,po_detailRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New po_detailRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(po_detailRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.po_detailRowChangedEvent) Is Nothing) Then RaiseEvent po_detailRowChanged(Me, New po_detailRowChangeEvent(CType(e.Row,po_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.po_detailRowChangingEvent) Is Nothing) Then RaiseEvent po_detailRowChanging(Me, New po_detailRowChangeEvent(CType(e.Row,po_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.po_detailRowDeletedEvent) Is Nothing) Then RaiseEvent po_detailRowDeleted(Me, New po_detailRowChangeEvent(CType(e.Row,po_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.po_detailRowDeletingEvent) Is Nothing) Then RaiseEvent po_detailRowDeleting(Me, New po_detailRowChangeEvent(CType(e.Row,po_detailRow), e.Action)) End If End Sub _ Public Sub Removepo_detailRow(ByVal row As po_detailRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "po_detailDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class po_detail_backupDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnCompany As Global.System.Data.DataColumn Private columnCodeType As Global.System.Data.DataColumn Private columnTypHD As Global.System.Data.DataColumn Private columnModeHD As Global.System.Data.DataColumn Private columnPONUmber As Global.System.Data.DataColumn Private columnSONumber As Global.System.Data.DataColumn Private columnPODate As Global.System.Data.DataColumn Private columnPOLine As Global.System.Data.DataColumn Private columnCustPOLine As Global.System.Data.DataColumn Private columnSOLine As Global.System.Data.DataColumn Private columnDueDate As Global.System.Data.DataColumn Private columnCustPartNumber As Global.System.Data.DataColumn Private columnParentPartNumber As Global.System.Data.DataColumn Private columnChildPartNumber As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columnParentPrice As Global.System.Data.DataColumn Private columns21Price As Global.System.Data.DataColumn Private columnUnitofMeasure As Global.System.Data.DataColumn Private columnTargetDate As Global.System.Data.DataColumn Private columnCustPart As Global.System.Data.DataColumn Private columnCustPartDesc As Global.System.Data.DataColumn Private columnCustGif As Global.System.Data.DataColumn Private columnFlag As Global.System.Data.DataColumn Private columnFlag1 As Global.System.Data.DataColumn Private columnFlag2 As Global.System.Data.DataColumn Private columnFlag3 As Global.System.Data.DataColumn Private columnRemarks As Global.System.Data.DataColumn Private columnField1 As Global.System.Data.DataColumn Private columnField2 As Global.System.Data.DataColumn Private columnField3 As Global.System.Data.DataColumn Private columnLineComments As Global.System.Data.DataColumn Private columnDateCreated As Global.System.Data.DataColumn Private columnTimeCreated As Global.System.Data.DataColumn Private columnUserID As Global.System.Data.DataColumn Private columnDateLastChanged As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "po_detail_backup" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property CompanyColumn() As Global.System.Data.DataColumn Get Return Me.columnCompany End Get End Property _ Public ReadOnly Property CodeTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnCodeType End Get End Property _ Public ReadOnly Property TypHDColumn() As Global.System.Data.DataColumn Get Return Me.columnTypHD End Get End Property _ Public ReadOnly Property ModeHDColumn() As Global.System.Data.DataColumn Get Return Me.columnModeHD End Get End Property _ Public ReadOnly Property PONUmberColumn() As Global.System.Data.DataColumn Get Return Me.columnPONUmber End Get End Property _ Public ReadOnly Property SONumberColumn() As Global.System.Data.DataColumn Get Return Me.columnSONumber End Get End Property _ Public ReadOnly Property PODateColumn() As Global.System.Data.DataColumn Get Return Me.columnPODate End Get End Property _ Public ReadOnly Property POLineColumn() As Global.System.Data.DataColumn Get Return Me.columnPOLine End Get End Property _ Public ReadOnly Property CustPOLineColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPOLine End Get End Property _ Public ReadOnly Property SOLineColumn() As Global.System.Data.DataColumn Get Return Me.columnSOLine End Get End Property _ Public ReadOnly Property DueDateColumn() As Global.System.Data.DataColumn Get Return Me.columnDueDate End Get End Property _ Public ReadOnly Property CustPartNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPartNumber End Get End Property _ Public ReadOnly Property ParentPartNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnParentPartNumber End Get End Property _ Public ReadOnly Property ChildPartNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnChildPartNumber End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property ParentPriceColumn() As Global.System.Data.DataColumn Get Return Me.columnParentPrice End Get End Property _ Public ReadOnly Property s21PriceColumn() As Global.System.Data.DataColumn Get Return Me.columns21Price End Get End Property _ Public ReadOnly Property UnitofMeasureColumn() As Global.System.Data.DataColumn Get Return Me.columnUnitofMeasure End Get End Property _ Public ReadOnly Property TargetDateColumn() As Global.System.Data.DataColumn Get Return Me.columnTargetDate End Get End Property _ Public ReadOnly Property CustPartColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPart End Get End Property _ Public ReadOnly Property CustPartDescColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPartDesc End Get End Property _ Public ReadOnly Property CustGifColumn() As Global.System.Data.DataColumn Get Return Me.columnCustGif End Get End Property _ Public ReadOnly Property FlagColumn() As Global.System.Data.DataColumn Get Return Me.columnFlag End Get End Property _ Public ReadOnly Property Flag1Column() As Global.System.Data.DataColumn Get Return Me.columnFlag1 End Get End Property _ Public ReadOnly Property Flag2Column() As Global.System.Data.DataColumn Get Return Me.columnFlag2 End Get End Property _ Public ReadOnly Property Flag3Column() As Global.System.Data.DataColumn Get Return Me.columnFlag3 End Get End Property _ Public ReadOnly Property RemarksColumn() As Global.System.Data.DataColumn Get Return Me.columnRemarks End Get End Property _ Public ReadOnly Property Field1Column() As Global.System.Data.DataColumn Get Return Me.columnField1 End Get End Property _ Public ReadOnly Property Field2Column() As Global.System.Data.DataColumn Get Return Me.columnField2 End Get End Property _ Public ReadOnly Property Field3Column() As Global.System.Data.DataColumn Get Return Me.columnField3 End Get End Property _ Public ReadOnly Property LineCommentsColumn() As Global.System.Data.DataColumn Get Return Me.columnLineComments End Get End Property _ Public ReadOnly Property DateCreatedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateCreated End Get End Property _ Public ReadOnly Property TimeCreatedColumn() As Global.System.Data.DataColumn Get Return Me.columnTimeCreated End Get End Property _ Public ReadOnly Property UserIDColumn() As Global.System.Data.DataColumn Get Return Me.columnUserID End Get End Property _ Public ReadOnly Property DateLastChangedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateLastChanged End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As po_detail_backupRow Get Return CType(Me.Rows(index),po_detail_backupRow) End Get End Property _ Public Event po_detail_backupRowChanging As po_detail_backupRowChangeEventHandler _ Public Event po_detail_backupRowChanged As po_detail_backupRowChangeEventHandler _ Public Event po_detail_backupRowDeleting As po_detail_backupRowChangeEventHandler _ Public Event po_detail_backupRowDeleted As po_detail_backupRowChangeEventHandler _ Public Overloads Sub Addpo_detail_backupRow(ByVal row As po_detail_backupRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpo_detail_backupRow( _ ByVal Company As String, _ ByVal CodeType As String, _ ByVal TypHD As String, _ ByVal ModeHD As String, _ ByVal PONUmber As String, _ ByVal SONumber As String, _ ByVal PODate As Date, _ ByVal POLine As Decimal, _ ByVal CustPOLine As Decimal, _ ByVal SOLine As String, _ ByVal DueDate As Date, _ ByVal CustPartNumber As String, _ ByVal ParentPartNumber As String, _ ByVal ChildPartNumber As String, _ ByVal quantity As Decimal, _ ByVal ParentPrice As Integer, _ ByVal s21Price As Integer, _ ByVal UnitofMeasure As String, _ ByVal TargetDate As Date, _ ByVal CustPart As String, _ ByVal CustPartDesc As String, _ ByVal CustGif As String, _ ByVal Flag As String, _ ByVal Flag1 As String, _ ByVal Flag2 As String, _ ByVal Flag3 As String, _ ByVal Remarks As String, _ ByVal Field1 As String, _ ByVal Field2 As String, _ ByVal Field3 As String, _ ByVal LineComments As String, _ ByVal DateCreated As Date, _ ByVal TimeCreated As String, _ ByVal UserID As String, _ ByVal DateLastChanged As String) As po_detail_backupRow Dim rowpo_detail_backupRow As po_detail_backupRow = CType(Me.NewRow,po_detail_backupRow) Dim columnValuesArray() As Object = New Object() {Company, CodeType, TypHD, ModeHD, PONUmber, SONumber, PODate, POLine, CustPOLine, SOLine, DueDate, CustPartNumber, ParentPartNumber, ChildPartNumber, quantity, ParentPrice, s21Price, UnitofMeasure, TargetDate, CustPart, CustPartDesc, CustGif, Flag, Flag1, Flag2, Flag3, Remarks, Field1, Field2, Field3, LineComments, DateCreated, TimeCreated, UserID, DateLastChanged} rowpo_detail_backupRow.ItemArray = columnValuesArray Me.Rows.Add(rowpo_detail_backupRow) Return rowpo_detail_backupRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As po_detail_backupDataTable = CType(MyBase.Clone,po_detail_backupDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New po_detail_backupDataTable() End Function _ Friend Sub InitVars() Me.columnCompany = MyBase.Columns("Company") Me.columnCodeType = MyBase.Columns("CodeType") Me.columnTypHD = MyBase.Columns("TypHD") Me.columnModeHD = MyBase.Columns("ModeHD") Me.columnPONUmber = MyBase.Columns("PONUmber") Me.columnSONumber = MyBase.Columns("SONumber") Me.columnPODate = MyBase.Columns("PODate") Me.columnPOLine = MyBase.Columns("POLine") Me.columnCustPOLine = MyBase.Columns("CustPOLine") Me.columnSOLine = MyBase.Columns("SOLine") Me.columnDueDate = MyBase.Columns("DueDate") Me.columnCustPartNumber = MyBase.Columns("CustPartNumber") Me.columnParentPartNumber = MyBase.Columns("ParentPartNumber") Me.columnChildPartNumber = MyBase.Columns("ChildPartNumber") Me.columnquantity = MyBase.Columns("quantity") Me.columnParentPrice = MyBase.Columns("ParentPrice") Me.columns21Price = MyBase.Columns("s21Price") Me.columnUnitofMeasure = MyBase.Columns("UnitofMeasure") Me.columnTargetDate = MyBase.Columns("TargetDate") Me.columnCustPart = MyBase.Columns("CustPart") Me.columnCustPartDesc = MyBase.Columns("CustPartDesc") Me.columnCustGif = MyBase.Columns("CustGif") Me.columnFlag = MyBase.Columns("Flag") Me.columnFlag1 = MyBase.Columns("Flag1") Me.columnFlag2 = MyBase.Columns("Flag2") Me.columnFlag3 = MyBase.Columns("Flag3") Me.columnRemarks = MyBase.Columns("Remarks") Me.columnField1 = MyBase.Columns("Field1") Me.columnField2 = MyBase.Columns("Field2") Me.columnField3 = MyBase.Columns("Field3") Me.columnLineComments = MyBase.Columns("LineComments") Me.columnDateCreated = MyBase.Columns("DateCreated") Me.columnTimeCreated = MyBase.Columns("TimeCreated") Me.columnUserID = MyBase.Columns("UserID") Me.columnDateLastChanged = MyBase.Columns("DateLastChanged") End Sub _ Private Sub InitClass() Me.columnCompany = New Global.System.Data.DataColumn("Company", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCompany) Me.columnCodeType = New Global.System.Data.DataColumn("CodeType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCodeType) Me.columnTypHD = New Global.System.Data.DataColumn("TypHD", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTypHD) Me.columnModeHD = New Global.System.Data.DataColumn("ModeHD", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModeHD) Me.columnPONUmber = New Global.System.Data.DataColumn("PONUmber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPONUmber) Me.columnSONumber = New Global.System.Data.DataColumn("SONumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSONumber) Me.columnPODate = New Global.System.Data.DataColumn("PODate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPODate) Me.columnPOLine = New Global.System.Data.DataColumn("POLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPOLine) Me.columnCustPOLine = New Global.System.Data.DataColumn("CustPOLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPOLine) Me.columnSOLine = New Global.System.Data.DataColumn("SOLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSOLine) Me.columnDueDate = New Global.System.Data.DataColumn("DueDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDueDate) Me.columnCustPartNumber = New Global.System.Data.DataColumn("CustPartNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPartNumber) Me.columnParentPartNumber = New Global.System.Data.DataColumn("ParentPartNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnParentPartNumber) Me.columnChildPartNumber = New Global.System.Data.DataColumn("ChildPartNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnChildPartNumber) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columnParentPrice = New Global.System.Data.DataColumn("ParentPrice", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnParentPrice) Me.columns21Price = New Global.System.Data.DataColumn("s21Price", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columns21Price) Me.columnUnitofMeasure = New Global.System.Data.DataColumn("UnitofMeasure", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUnitofMeasure) Me.columnTargetDate = New Global.System.Data.DataColumn("TargetDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTargetDate) Me.columnCustPart = New Global.System.Data.DataColumn("CustPart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPart) Me.columnCustPartDesc = New Global.System.Data.DataColumn("CustPartDesc", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPartDesc) Me.columnCustGif = New Global.System.Data.DataColumn("CustGif", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustGif) Me.columnFlag = New Global.System.Data.DataColumn("Flag", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag) Me.columnFlag1 = New Global.System.Data.DataColumn("Flag1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag1) Me.columnFlag2 = New Global.System.Data.DataColumn("Flag2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag2) Me.columnFlag3 = New Global.System.Data.DataColumn("Flag3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag3) Me.columnRemarks = New Global.System.Data.DataColumn("Remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRemarks) Me.columnField1 = New Global.System.Data.DataColumn("Field1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnField1) Me.columnField2 = New Global.System.Data.DataColumn("Field2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnField2) Me.columnField3 = New Global.System.Data.DataColumn("Field3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnField3) Me.columnLineComments = New Global.System.Data.DataColumn("LineComments", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLineComments) Me.columnDateCreated = New Global.System.Data.DataColumn("DateCreated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateCreated) Me.columnTimeCreated = New Global.System.Data.DataColumn("TimeCreated", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTimeCreated) Me.columnUserID = New Global.System.Data.DataColumn("UserID", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUserID) Me.columnDateLastChanged = New Global.System.Data.DataColumn("DateLastChanged", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateLastChanged) Me.columnCompany.MaxLength = 2 Me.columnCodeType.MaxLength = 1 Me.columnTypHD.MaxLength = 10 Me.columnModeHD.MaxLength = 20 Me.columnPONUmber.MaxLength = 8 Me.columnSONumber.MaxLength = 7 Me.columnSOLine.AllowDBNull = false Me.columnSOLine.MaxLength = 1 Me.columnCustPartNumber.MaxLength = 15 Me.columnParentPartNumber.AllowDBNull = false Me.columnParentPartNumber.MaxLength = 1 Me.columnChildPartNumber.AllowDBNull = false Me.columnChildPartNumber.MaxLength = 1 Me.columnParentPrice.AllowDBNull = false Me.columns21Price.AllowDBNull = false Me.columnUnitofMeasure.MaxLength = 2 Me.columnCustPart.MaxLength = 40 Me.columnCustPartDesc.MaxLength = 48 Me.columnCustGif.MaxLength = 24 Me.columnFlag.MaxLength = 1 Me.columnFlag1.MaxLength = 1 Me.columnFlag2.MaxLength = 1 Me.columnFlag3.MaxLength = 1 Me.columnRemarks.MaxLength = 50 Me.columnField1.MaxLength = 50 Me.columnField2.MaxLength = 50 Me.columnField3.MaxLength = 50 Me.columnLineComments.MaxLength = 1040 Me.columnTimeCreated.MaxLength = 10 Me.columnUserID.MaxLength = 10 Me.columnDateLastChanged.MaxLength = 10 End Sub _ Public Function Newpo_detail_backupRow() As po_detail_backupRow Return CType(Me.NewRow,po_detail_backupRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New po_detail_backupRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(po_detail_backupRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.po_detail_backupRowChangedEvent) Is Nothing) Then RaiseEvent po_detail_backupRowChanged(Me, New po_detail_backupRowChangeEvent(CType(e.Row,po_detail_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.po_detail_backupRowChangingEvent) Is Nothing) Then RaiseEvent po_detail_backupRowChanging(Me, New po_detail_backupRowChangeEvent(CType(e.Row,po_detail_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.po_detail_backupRowDeletedEvent) Is Nothing) Then RaiseEvent po_detail_backupRowDeleted(Me, New po_detail_backupRowChangeEvent(CType(e.Row,po_detail_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.po_detail_backupRowDeletingEvent) Is Nothing) Then RaiseEvent po_detail_backupRowDeleting(Me, New po_detail_backupRowChangeEvent(CType(e.Row,po_detail_backupRow), e.Action)) End If End Sub _ Public Sub Removepo_detail_backupRow(ByVal row As po_detail_backupRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "po_detail_backupDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class po_detail_tempDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnCompany As Global.System.Data.DataColumn Private columnCodeType As Global.System.Data.DataColumn Private columnTypHD As Global.System.Data.DataColumn Private columnModeHD As Global.System.Data.DataColumn Private columnPONumber As Global.System.Data.DataColumn Private columnSONumber As Global.System.Data.DataColumn Private columnPODate As Global.System.Data.DataColumn Private columnPOLine As Global.System.Data.DataColumn Private columnCustPOLine As Global.System.Data.DataColumn Private columnSOLine As Global.System.Data.DataColumn Private columnAlvSOLine As Global.System.Data.DataColumn Private columnDueDate As Global.System.Data.DataColumn Private columnCustPartNumber As Global.System.Data.DataColumn Private columnParentPartNumber As Global.System.Data.DataColumn Private columnChildPartNumber As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columnParentPrice As Global.System.Data.DataColumn Private columns21Price As Global.System.Data.DataColumn Private columnUnitofMeasure As Global.System.Data.DataColumn Private columnTargetDate As Global.System.Data.DataColumn Private columnCustPart As Global.System.Data.DataColumn Private columnCustPartNo As Global.System.Data.DataColumn Private columnCustPartDesc As Global.System.Data.DataColumn Private columnCustGif As Global.System.Data.DataColumn Private columnFlag As Global.System.Data.DataColumn Private columnFlag1 As Global.System.Data.DataColumn Private columnFlag2 As Global.System.Data.DataColumn Private columnFlag3 As Global.System.Data.DataColumn Private columnRemarks As Global.System.Data.DataColumn Private columnField1 As Global.System.Data.DataColumn Private columnField2 As Global.System.Data.DataColumn Private columnField3 As Global.System.Data.DataColumn Private columnLineComments As Global.System.Data.DataColumn Private columnDateCreated As Global.System.Data.DataColumn Private columnTimeCreated As Global.System.Data.DataColumn Private columnUserID As Global.System.Data.DataColumn Private columnDateLastChanged As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "po_detail_temp" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property CompanyColumn() As Global.System.Data.DataColumn Get Return Me.columnCompany End Get End Property _ Public ReadOnly Property CodeTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnCodeType End Get End Property _ Public ReadOnly Property TypHDColumn() As Global.System.Data.DataColumn Get Return Me.columnTypHD End Get End Property _ Public ReadOnly Property ModeHDColumn() As Global.System.Data.DataColumn Get Return Me.columnModeHD End Get End Property _ Public ReadOnly Property PONumberColumn() As Global.System.Data.DataColumn Get Return Me.columnPONumber End Get End Property _ Public ReadOnly Property SONumberColumn() As Global.System.Data.DataColumn Get Return Me.columnSONumber End Get End Property _ Public ReadOnly Property PODateColumn() As Global.System.Data.DataColumn Get Return Me.columnPODate End Get End Property _ Public ReadOnly Property POLineColumn() As Global.System.Data.DataColumn Get Return Me.columnPOLine End Get End Property _ Public ReadOnly Property CustPOLineColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPOLine End Get End Property _ Public ReadOnly Property SOLineColumn() As Global.System.Data.DataColumn Get Return Me.columnSOLine End Get End Property _ Public ReadOnly Property AlvSOLineColumn() As Global.System.Data.DataColumn Get Return Me.columnAlvSOLine End Get End Property _ Public ReadOnly Property DueDateColumn() As Global.System.Data.DataColumn Get Return Me.columnDueDate End Get End Property _ Public ReadOnly Property CustPartNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPartNumber End Get End Property _ Public ReadOnly Property ParentPartNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnParentPartNumber End Get End Property _ Public ReadOnly Property ChildPartNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnChildPartNumber End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property ParentPriceColumn() As Global.System.Data.DataColumn Get Return Me.columnParentPrice End Get End Property _ Public ReadOnly Property s21PriceColumn() As Global.System.Data.DataColumn Get Return Me.columns21Price End Get End Property _ Public ReadOnly Property UnitofMeasureColumn() As Global.System.Data.DataColumn Get Return Me.columnUnitofMeasure End Get End Property _ Public ReadOnly Property TargetDateColumn() As Global.System.Data.DataColumn Get Return Me.columnTargetDate End Get End Property _ Public ReadOnly Property CustPartColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPart End Get End Property _ Public ReadOnly Property CustPartNoColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPartNo End Get End Property _ Public ReadOnly Property CustPartDescColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPartDesc End Get End Property _ Public ReadOnly Property CustGifColumn() As Global.System.Data.DataColumn Get Return Me.columnCustGif End Get End Property _ Public ReadOnly Property FlagColumn() As Global.System.Data.DataColumn Get Return Me.columnFlag End Get End Property _ Public ReadOnly Property Flag1Column() As Global.System.Data.DataColumn Get Return Me.columnFlag1 End Get End Property _ Public ReadOnly Property Flag2Column() As Global.System.Data.DataColumn Get Return Me.columnFlag2 End Get End Property _ Public ReadOnly Property Flag3Column() As Global.System.Data.DataColumn Get Return Me.columnFlag3 End Get End Property _ Public ReadOnly Property RemarksColumn() As Global.System.Data.DataColumn Get Return Me.columnRemarks End Get End Property _ Public ReadOnly Property Field1Column() As Global.System.Data.DataColumn Get Return Me.columnField1 End Get End Property _ Public ReadOnly Property Field2Column() As Global.System.Data.DataColumn Get Return Me.columnField2 End Get End Property _ Public ReadOnly Property Field3Column() As Global.System.Data.DataColumn Get Return Me.columnField3 End Get End Property _ Public ReadOnly Property LineCommentsColumn() As Global.System.Data.DataColumn Get Return Me.columnLineComments End Get End Property _ Public ReadOnly Property DateCreatedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateCreated End Get End Property _ Public ReadOnly Property TimeCreatedColumn() As Global.System.Data.DataColumn Get Return Me.columnTimeCreated End Get End Property _ Public ReadOnly Property UserIDColumn() As Global.System.Data.DataColumn Get Return Me.columnUserID End Get End Property _ Public ReadOnly Property DateLastChangedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateLastChanged End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As po_detail_tempRow Get Return CType(Me.Rows(index),po_detail_tempRow) End Get End Property _ Public Event po_detail_tempRowChanging As po_detail_tempRowChangeEventHandler _ Public Event po_detail_tempRowChanged As po_detail_tempRowChangeEventHandler _ Public Event po_detail_tempRowDeleting As po_detail_tempRowChangeEventHandler _ Public Event po_detail_tempRowDeleted As po_detail_tempRowChangeEventHandler _ Public Overloads Sub Addpo_detail_tempRow(ByVal row As po_detail_tempRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpo_detail_tempRow( _ ByVal Company As String, _ ByVal CodeType As String, _ ByVal TypHD As String, _ ByVal ModeHD As String, _ ByVal PONumber As String, _ ByVal SONumber As String, _ ByVal PODate As Date, _ ByVal POLine As Decimal, _ ByVal CustPOLine As Decimal, _ ByVal SOLine As String, _ ByVal AlvSOLine As Decimal, _ ByVal DueDate As Date, _ ByVal CustPartNumber As String, _ ByVal ParentPartNumber As String, _ ByVal ChildPartNumber As String, _ ByVal quantity As Decimal, _ ByVal ParentPrice As Integer, _ ByVal s21Price As Integer, _ ByVal UnitofMeasure As String, _ ByVal TargetDate As Date, _ ByVal CustPart As String, _ ByVal CustPartNo As String, _ ByVal CustPartDesc As String, _ ByVal CustGif As String, _ ByVal Flag As String, _ ByVal Flag1 As String, _ ByVal Flag2 As String, _ ByVal Flag3 As String, _ ByVal Remarks As String, _ ByVal Field1 As String, _ ByVal Field2 As String, _ ByVal Field3 As String, _ ByVal LineComments As String, _ ByVal DateCreated As Date, _ ByVal TimeCreated As String, _ ByVal UserID As String, _ ByVal DateLastChanged As String) As po_detail_tempRow Dim rowpo_detail_tempRow As po_detail_tempRow = CType(Me.NewRow,po_detail_tempRow) Dim columnValuesArray() As Object = New Object() {Company, CodeType, TypHD, ModeHD, PONumber, SONumber, PODate, POLine, CustPOLine, SOLine, AlvSOLine, DueDate, CustPartNumber, ParentPartNumber, ChildPartNumber, quantity, ParentPrice, s21Price, UnitofMeasure, TargetDate, CustPart, CustPartNo, CustPartDesc, CustGif, Flag, Flag1, Flag2, Flag3, Remarks, Field1, Field2, Field3, LineComments, DateCreated, TimeCreated, UserID, DateLastChanged} rowpo_detail_tempRow.ItemArray = columnValuesArray Me.Rows.Add(rowpo_detail_tempRow) Return rowpo_detail_tempRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As po_detail_tempDataTable = CType(MyBase.Clone,po_detail_tempDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New po_detail_tempDataTable() End Function _ Friend Sub InitVars() Me.columnCompany = MyBase.Columns("Company") Me.columnCodeType = MyBase.Columns("CodeType") Me.columnTypHD = MyBase.Columns("TypHD") Me.columnModeHD = MyBase.Columns("ModeHD") Me.columnPONumber = MyBase.Columns("PONumber") Me.columnSONumber = MyBase.Columns("SONumber") Me.columnPODate = MyBase.Columns("PODate") Me.columnPOLine = MyBase.Columns("POLine") Me.columnCustPOLine = MyBase.Columns("CustPOLine") Me.columnSOLine = MyBase.Columns("SOLine") Me.columnAlvSOLine = MyBase.Columns("AlvSOLine") Me.columnDueDate = MyBase.Columns("DueDate") Me.columnCustPartNumber = MyBase.Columns("CustPartNumber") Me.columnParentPartNumber = MyBase.Columns("ParentPartNumber") Me.columnChildPartNumber = MyBase.Columns("ChildPartNumber") Me.columnquantity = MyBase.Columns("quantity") Me.columnParentPrice = MyBase.Columns("ParentPrice") Me.columns21Price = MyBase.Columns("s21Price") Me.columnUnitofMeasure = MyBase.Columns("UnitofMeasure") Me.columnTargetDate = MyBase.Columns("TargetDate") Me.columnCustPart = MyBase.Columns("CustPart") Me.columnCustPartNo = MyBase.Columns("CustPartNo") Me.columnCustPartDesc = MyBase.Columns("CustPartDesc") Me.columnCustGif = MyBase.Columns("CustGif") Me.columnFlag = MyBase.Columns("Flag") Me.columnFlag1 = MyBase.Columns("Flag1") Me.columnFlag2 = MyBase.Columns("Flag2") Me.columnFlag3 = MyBase.Columns("Flag3") Me.columnRemarks = MyBase.Columns("Remarks") Me.columnField1 = MyBase.Columns("Field1") Me.columnField2 = MyBase.Columns("Field2") Me.columnField3 = MyBase.Columns("Field3") Me.columnLineComments = MyBase.Columns("LineComments") Me.columnDateCreated = MyBase.Columns("DateCreated") Me.columnTimeCreated = MyBase.Columns("TimeCreated") Me.columnUserID = MyBase.Columns("UserID") Me.columnDateLastChanged = MyBase.Columns("DateLastChanged") End Sub _ Private Sub InitClass() Me.columnCompany = New Global.System.Data.DataColumn("Company", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCompany) Me.columnCodeType = New Global.System.Data.DataColumn("CodeType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCodeType) Me.columnTypHD = New Global.System.Data.DataColumn("TypHD", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTypHD) Me.columnModeHD = New Global.System.Data.DataColumn("ModeHD", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModeHD) Me.columnPONumber = New Global.System.Data.DataColumn("PONumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPONumber) Me.columnSONumber = New Global.System.Data.DataColumn("SONumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSONumber) Me.columnPODate = New Global.System.Data.DataColumn("PODate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPODate) Me.columnPOLine = New Global.System.Data.DataColumn("POLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPOLine) Me.columnCustPOLine = New Global.System.Data.DataColumn("CustPOLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPOLine) Me.columnSOLine = New Global.System.Data.DataColumn("SOLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSOLine) Me.columnAlvSOLine = New Global.System.Data.DataColumn("AlvSOLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAlvSOLine) Me.columnDueDate = New Global.System.Data.DataColumn("DueDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDueDate) Me.columnCustPartNumber = New Global.System.Data.DataColumn("CustPartNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPartNumber) Me.columnParentPartNumber = New Global.System.Data.DataColumn("ParentPartNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnParentPartNumber) Me.columnChildPartNumber = New Global.System.Data.DataColumn("ChildPartNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnChildPartNumber) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columnParentPrice = New Global.System.Data.DataColumn("ParentPrice", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnParentPrice) Me.columns21Price = New Global.System.Data.DataColumn("s21Price", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columns21Price) Me.columnUnitofMeasure = New Global.System.Data.DataColumn("UnitofMeasure", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUnitofMeasure) Me.columnTargetDate = New Global.System.Data.DataColumn("TargetDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTargetDate) Me.columnCustPart = New Global.System.Data.DataColumn("CustPart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPart) Me.columnCustPartNo = New Global.System.Data.DataColumn("CustPartNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPartNo) Me.columnCustPartDesc = New Global.System.Data.DataColumn("CustPartDesc", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPartDesc) Me.columnCustGif = New Global.System.Data.DataColumn("CustGif", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustGif) Me.columnFlag = New Global.System.Data.DataColumn("Flag", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag) Me.columnFlag1 = New Global.System.Data.DataColumn("Flag1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag1) Me.columnFlag2 = New Global.System.Data.DataColumn("Flag2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag2) Me.columnFlag3 = New Global.System.Data.DataColumn("Flag3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag3) Me.columnRemarks = New Global.System.Data.DataColumn("Remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRemarks) Me.columnField1 = New Global.System.Data.DataColumn("Field1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnField1) Me.columnField2 = New Global.System.Data.DataColumn("Field2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnField2) Me.columnField3 = New Global.System.Data.DataColumn("Field3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnField3) Me.columnLineComments = New Global.System.Data.DataColumn("LineComments", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLineComments) Me.columnDateCreated = New Global.System.Data.DataColumn("DateCreated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateCreated) Me.columnTimeCreated = New Global.System.Data.DataColumn("TimeCreated", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTimeCreated) Me.columnUserID = New Global.System.Data.DataColumn("UserID", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUserID) Me.columnDateLastChanged = New Global.System.Data.DataColumn("DateLastChanged", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateLastChanged) Me.columnCompany.MaxLength = 2 Me.columnCodeType.MaxLength = 1 Me.columnTypHD.MaxLength = 10 Me.columnModeHD.MaxLength = 20 Me.columnPONumber.MaxLength = 8 Me.columnSONumber.MaxLength = 7 Me.columnSOLine.AllowDBNull = false Me.columnSOLine.MaxLength = 1 Me.columnCustPartNumber.MaxLength = 15 Me.columnParentPartNumber.AllowDBNull = false Me.columnParentPartNumber.MaxLength = 1 Me.columnChildPartNumber.AllowDBNull = false Me.columnChildPartNumber.MaxLength = 1 Me.columnParentPrice.AllowDBNull = false Me.columns21Price.AllowDBNull = false Me.columnUnitofMeasure.MaxLength = 2 Me.columnCustPart.MaxLength = 40 Me.columnCustPartNo.MaxLength = 50 Me.columnCustPartDesc.MaxLength = 48 Me.columnCustGif.MaxLength = 24 Me.columnFlag.MaxLength = 1 Me.columnFlag1.MaxLength = 1 Me.columnFlag2.MaxLength = 1 Me.columnFlag3.MaxLength = 1 Me.columnRemarks.MaxLength = 50 Me.columnField1.MaxLength = 50 Me.columnField2.MaxLength = 50 Me.columnField3.MaxLength = 50 Me.columnLineComments.MaxLength = 1040 Me.columnTimeCreated.MaxLength = 10 Me.columnUserID.MaxLength = 10 Me.columnDateLastChanged.MaxLength = 10 End Sub _ Public Function Newpo_detail_tempRow() As po_detail_tempRow Return CType(Me.NewRow,po_detail_tempRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New po_detail_tempRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(po_detail_tempRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.po_detail_tempRowChangedEvent) Is Nothing) Then RaiseEvent po_detail_tempRowChanged(Me, New po_detail_tempRowChangeEvent(CType(e.Row,po_detail_tempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.po_detail_tempRowChangingEvent) Is Nothing) Then RaiseEvent po_detail_tempRowChanging(Me, New po_detail_tempRowChangeEvent(CType(e.Row,po_detail_tempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.po_detail_tempRowDeletedEvent) Is Nothing) Then RaiseEvent po_detail_tempRowDeleted(Me, New po_detail_tempRowChangeEvent(CType(e.Row,po_detail_tempRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.po_detail_tempRowDeletingEvent) Is Nothing) Then RaiseEvent po_detail_tempRowDeleting(Me, New po_detail_tempRowChangeEvent(CType(e.Row,po_detail_tempRow), e.Action)) End If End Sub _ Public Sub Removepo_detail_tempRow(ByVal row As po_detail_tempRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "po_detail_tempDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class po_headerDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnCompany As Global.System.Data.DataColumn Private columnCodeType As Global.System.Data.DataColumn Private columnTypeHD As Global.System.Data.DataColumn Private columnModeHD As Global.System.Data.DataColumn Private columnPrefix As Global.System.Data.DataColumn Private columnGenDate As Global.System.Data.DataColumn Private columnGenHour As Global.System.Data.DataColumn Private columnPONumber As Global.System.Data.DataColumn Private columnPONumberPrev As Global.System.Data.DataColumn Private columnSONumber As Global.System.Data.DataColumn Private columnPODate As Global.System.Data.DataColumn Private columnRevision As Global.System.Data.DataColumn Private columnStatus As Global.System.Data.DataColumn Private columnAlvSO As Global.System.Data.DataColumn Private columnCustPO As Global.System.Data.DataColumn Private columnShipVia As Global.System.Data.DataColumn Private columnShipTo As Global.System.Data.DataColumn Private columnSipAdd1 As Global.System.Data.DataColumn Private columnShipAdd2 As Global.System.Data.DataColumn Private columnShipAdd3 As Global.System.Data.DataColumn Private columnCity As Global.System.Data.DataColumn Private columnState As Global.System.Data.DataColumn Private columnPostalCode As Global.System.Data.DataColumn Private columnCountryCode As Global.System.Data.DataColumn Private columnShipToNum As Global.System.Data.DataColumn Private columnFlag0 As Global.System.Data.DataColumn Private columnFlag1 As Global.System.Data.DataColumn Private columnFlag2 As Global.System.Data.DataColumn Private columnFlag3 As Global.System.Data.DataColumn Private columnRemark As Global.System.Data.DataColumn Private columnFild1 As Global.System.Data.DataColumn Private columnFild2 As Global.System.Data.DataColumn Private columnFild3 As Global.System.Data.DataColumn Private columnFild4 As Global.System.Data.DataColumn Private columnFild5 As Global.System.Data.DataColumn Private columnComments As Global.System.Data.DataColumn Private columnDateCreated As Global.System.Data.DataColumn Private columnTimeCreated As Global.System.Data.DataColumn Private columnUserID As Global.System.Data.DataColumn Private columnDateLastChanged As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "po_header" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property CompanyColumn() As Global.System.Data.DataColumn Get Return Me.columnCompany End Get End Property _ Public ReadOnly Property CodeTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnCodeType End Get End Property _ Public ReadOnly Property TypeHDColumn() As Global.System.Data.DataColumn Get Return Me.columnTypeHD End Get End Property _ Public ReadOnly Property ModeHDColumn() As Global.System.Data.DataColumn Get Return Me.columnModeHD End Get End Property _ Public ReadOnly Property PrefixColumn() As Global.System.Data.DataColumn Get Return Me.columnPrefix End Get End Property _ Public ReadOnly Property GenDateColumn() As Global.System.Data.DataColumn Get Return Me.columnGenDate End Get End Property _ Public ReadOnly Property GenHourColumn() As Global.System.Data.DataColumn Get Return Me.columnGenHour End Get End Property _ Public ReadOnly Property PONumberColumn() As Global.System.Data.DataColumn Get Return Me.columnPONumber End Get End Property _ Public ReadOnly Property PONumberPrevColumn() As Global.System.Data.DataColumn Get Return Me.columnPONumberPrev End Get End Property _ Public ReadOnly Property SONumberColumn() As Global.System.Data.DataColumn Get Return Me.columnSONumber End Get End Property _ Public ReadOnly Property PODateColumn() As Global.System.Data.DataColumn Get Return Me.columnPODate End Get End Property _ Public ReadOnly Property RevisionColumn() As Global.System.Data.DataColumn Get Return Me.columnRevision End Get End Property _ Public ReadOnly Property StatusColumn() As Global.System.Data.DataColumn Get Return Me.columnStatus End Get End Property _ Public ReadOnly Property AlvSOColumn() As Global.System.Data.DataColumn Get Return Me.columnAlvSO End Get End Property _ Public ReadOnly Property CustPOColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPO End Get End Property _ Public ReadOnly Property ShipViaColumn() As Global.System.Data.DataColumn Get Return Me.columnShipVia End Get End Property _ Public ReadOnly Property ShipToColumn() As Global.System.Data.DataColumn Get Return Me.columnShipTo End Get End Property _ Public ReadOnly Property SipAdd1Column() As Global.System.Data.DataColumn Get Return Me.columnSipAdd1 End Get End Property _ Public ReadOnly Property ShipAdd2Column() As Global.System.Data.DataColumn Get Return Me.columnShipAdd2 End Get End Property _ Public ReadOnly Property ShipAdd3Column() As Global.System.Data.DataColumn Get Return Me.columnShipAdd3 End Get End Property _ Public ReadOnly Property CityColumn() As Global.System.Data.DataColumn Get Return Me.columnCity End Get End Property _ Public ReadOnly Property StateColumn() As Global.System.Data.DataColumn Get Return Me.columnState End Get End Property _ Public ReadOnly Property PostalCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnPostalCode End Get End Property _ Public ReadOnly Property CountryCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnCountryCode End Get End Property _ Public ReadOnly Property ShipToNumColumn() As Global.System.Data.DataColumn Get Return Me.columnShipToNum End Get End Property _ Public ReadOnly Property Flag0Column() As Global.System.Data.DataColumn Get Return Me.columnFlag0 End Get End Property _ Public ReadOnly Property Flag1Column() As Global.System.Data.DataColumn Get Return Me.columnFlag1 End Get End Property _ Public ReadOnly Property Flag2Column() As Global.System.Data.DataColumn Get Return Me.columnFlag2 End Get End Property _ Public ReadOnly Property Flag3Column() As Global.System.Data.DataColumn Get Return Me.columnFlag3 End Get End Property _ Public ReadOnly Property RemarkColumn() As Global.System.Data.DataColumn Get Return Me.columnRemark End Get End Property _ Public ReadOnly Property Fild1Column() As Global.System.Data.DataColumn Get Return Me.columnFild1 End Get End Property _ Public ReadOnly Property Fild2Column() As Global.System.Data.DataColumn Get Return Me.columnFild2 End Get End Property _ Public ReadOnly Property Fild3Column() As Global.System.Data.DataColumn Get Return Me.columnFild3 End Get End Property _ Public ReadOnly Property Fild4Column() As Global.System.Data.DataColumn Get Return Me.columnFild4 End Get End Property _ Public ReadOnly Property Fild5Column() As Global.System.Data.DataColumn Get Return Me.columnFild5 End Get End Property _ Public ReadOnly Property CommentsColumn() As Global.System.Data.DataColumn Get Return Me.columnComments End Get End Property _ Public ReadOnly Property DateCreatedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateCreated End Get End Property _ Public ReadOnly Property TimeCreatedColumn() As Global.System.Data.DataColumn Get Return Me.columnTimeCreated End Get End Property _ Public ReadOnly Property UserIDColumn() As Global.System.Data.DataColumn Get Return Me.columnUserID End Get End Property _ Public ReadOnly Property DateLastChangedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateLastChanged End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As po_headerRow Get Return CType(Me.Rows(index),po_headerRow) End Get End Property _ Public Event po_headerRowChanging As po_headerRowChangeEventHandler _ Public Event po_headerRowChanged As po_headerRowChangeEventHandler _ Public Event po_headerRowDeleting As po_headerRowChangeEventHandler _ Public Event po_headerRowDeleted As po_headerRowChangeEventHandler _ Public Overloads Sub Addpo_headerRow(ByVal row As po_headerRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpo_headerRow( _ ByVal Company As String, _ ByVal CodeType As String, _ ByVal TypeHD As String, _ ByVal ModeHD As String, _ ByVal Prefix As String, _ ByVal GenDate As Date, _ ByVal GenHour As Date, _ ByVal PONumber As String, _ ByVal PONumberPrev As String, _ ByVal SONumber As String, _ ByVal PODate As Date, _ ByVal Revision As Decimal, _ ByVal Status As String, _ ByVal AlvSO As String, _ ByVal CustPO As String, _ ByVal ShipVia As String, _ ByVal ShipTo As String, _ ByVal SipAdd1 As String, _ ByVal ShipAdd2 As String, _ ByVal ShipAdd3 As String, _ ByVal City As String, _ ByVal State As String, _ ByVal PostalCode As String, _ ByVal CountryCode As String, _ ByVal ShipToNum As String, _ ByVal Flag0 As String, _ ByVal Flag1 As String, _ ByVal Flag2 As String, _ ByVal Flag3 As String, _ ByVal Remark As String, _ ByVal Fild1 As String, _ ByVal Fild2 As String, _ ByVal Fild3 As String, _ ByVal Fild4 As String, _ ByVal Fild5 As String, _ ByVal Comments As String, _ ByVal DateCreated As Date, _ ByVal TimeCreated As String, _ ByVal UserID As String, _ ByVal DateLastChanged As String) As po_headerRow Dim rowpo_headerRow As po_headerRow = CType(Me.NewRow,po_headerRow) Dim columnValuesArray() As Object = New Object() {Company, CodeType, TypeHD, ModeHD, Prefix, GenDate, GenHour, PONumber, PONumberPrev, SONumber, PODate, Revision, Status, AlvSO, CustPO, ShipVia, ShipTo, SipAdd1, ShipAdd2, ShipAdd3, City, State, PostalCode, CountryCode, ShipToNum, Flag0, Flag1, Flag2, Flag3, Remark, Fild1, Fild2, Fild3, Fild4, Fild5, Comments, DateCreated, TimeCreated, UserID, DateLastChanged} rowpo_headerRow.ItemArray = columnValuesArray Me.Rows.Add(rowpo_headerRow) Return rowpo_headerRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As po_headerDataTable = CType(MyBase.Clone,po_headerDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New po_headerDataTable() End Function _ Friend Sub InitVars() Me.columnCompany = MyBase.Columns("Company") Me.columnCodeType = MyBase.Columns("CodeType") Me.columnTypeHD = MyBase.Columns("TypeHD") Me.columnModeHD = MyBase.Columns("ModeHD") Me.columnPrefix = MyBase.Columns("Prefix") Me.columnGenDate = MyBase.Columns("GenDate") Me.columnGenHour = MyBase.Columns("GenHour") Me.columnPONumber = MyBase.Columns("PONumber") Me.columnPONumberPrev = MyBase.Columns("PONumberPrev") Me.columnSONumber = MyBase.Columns("SONumber") Me.columnPODate = MyBase.Columns("PODate") Me.columnRevision = MyBase.Columns("Revision") Me.columnStatus = MyBase.Columns("Status") Me.columnAlvSO = MyBase.Columns("AlvSO") Me.columnCustPO = MyBase.Columns("CustPO") Me.columnShipVia = MyBase.Columns("ShipVia") Me.columnShipTo = MyBase.Columns("ShipTo") Me.columnSipAdd1 = MyBase.Columns("SipAdd1") Me.columnShipAdd2 = MyBase.Columns("ShipAdd2") Me.columnShipAdd3 = MyBase.Columns("ShipAdd3") Me.columnCity = MyBase.Columns("City") Me.columnState = MyBase.Columns("State") Me.columnPostalCode = MyBase.Columns("PostalCode") Me.columnCountryCode = MyBase.Columns("CountryCode") Me.columnShipToNum = MyBase.Columns("ShipToNum") Me.columnFlag0 = MyBase.Columns("Flag0") Me.columnFlag1 = MyBase.Columns("Flag1") Me.columnFlag2 = MyBase.Columns("Flag2") Me.columnFlag3 = MyBase.Columns("Flag3") Me.columnRemark = MyBase.Columns("Remark") Me.columnFild1 = MyBase.Columns("Fild1") Me.columnFild2 = MyBase.Columns("Fild2") Me.columnFild3 = MyBase.Columns("Fild3") Me.columnFild4 = MyBase.Columns("Fild4") Me.columnFild5 = MyBase.Columns("Fild5") Me.columnComments = MyBase.Columns("Comments") Me.columnDateCreated = MyBase.Columns("DateCreated") Me.columnTimeCreated = MyBase.Columns("TimeCreated") Me.columnUserID = MyBase.Columns("UserID") Me.columnDateLastChanged = MyBase.Columns("DateLastChanged") End Sub _ Private Sub InitClass() Me.columnCompany = New Global.System.Data.DataColumn("Company", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCompany) Me.columnCodeType = New Global.System.Data.DataColumn("CodeType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCodeType) Me.columnTypeHD = New Global.System.Data.DataColumn("TypeHD", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTypeHD) Me.columnModeHD = New Global.System.Data.DataColumn("ModeHD", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModeHD) Me.columnPrefix = New Global.System.Data.DataColumn("Prefix", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPrefix) Me.columnGenDate = New Global.System.Data.DataColumn("GenDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGenDate) Me.columnGenHour = New Global.System.Data.DataColumn("GenHour", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGenHour) Me.columnPONumber = New Global.System.Data.DataColumn("PONumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPONumber) Me.columnPONumberPrev = New Global.System.Data.DataColumn("PONumberPrev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPONumberPrev) Me.columnSONumber = New Global.System.Data.DataColumn("SONumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSONumber) Me.columnPODate = New Global.System.Data.DataColumn("PODate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPODate) Me.columnRevision = New Global.System.Data.DataColumn("Revision", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRevision) Me.columnStatus = New Global.System.Data.DataColumn("Status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnStatus) Me.columnAlvSO = New Global.System.Data.DataColumn("AlvSO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAlvSO) Me.columnCustPO = New Global.System.Data.DataColumn("CustPO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPO) Me.columnShipVia = New Global.System.Data.DataColumn("ShipVia", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipVia) Me.columnShipTo = New Global.System.Data.DataColumn("ShipTo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipTo) Me.columnSipAdd1 = New Global.System.Data.DataColumn("SipAdd1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSipAdd1) Me.columnShipAdd2 = New Global.System.Data.DataColumn("ShipAdd2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipAdd2) Me.columnShipAdd3 = New Global.System.Data.DataColumn("ShipAdd3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipAdd3) Me.columnCity = New Global.System.Data.DataColumn("City", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCity) Me.columnState = New Global.System.Data.DataColumn("State", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnState) Me.columnPostalCode = New Global.System.Data.DataColumn("PostalCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPostalCode) Me.columnCountryCode = New Global.System.Data.DataColumn("CountryCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCountryCode) Me.columnShipToNum = New Global.System.Data.DataColumn("ShipToNum", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipToNum) Me.columnFlag0 = New Global.System.Data.DataColumn("Flag0", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag0) Me.columnFlag1 = New Global.System.Data.DataColumn("Flag1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag1) Me.columnFlag2 = New Global.System.Data.DataColumn("Flag2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag2) Me.columnFlag3 = New Global.System.Data.DataColumn("Flag3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag3) Me.columnRemark = New Global.System.Data.DataColumn("Remark", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRemark) Me.columnFild1 = New Global.System.Data.DataColumn("Fild1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFild1) Me.columnFild2 = New Global.System.Data.DataColumn("Fild2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFild2) Me.columnFild3 = New Global.System.Data.DataColumn("Fild3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFild3) Me.columnFild4 = New Global.System.Data.DataColumn("Fild4", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFild4) Me.columnFild5 = New Global.System.Data.DataColumn("Fild5", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFild5) Me.columnComments = New Global.System.Data.DataColumn("Comments", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnComments) Me.columnDateCreated = New Global.System.Data.DataColumn("DateCreated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateCreated) Me.columnTimeCreated = New Global.System.Data.DataColumn("TimeCreated", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTimeCreated) Me.columnUserID = New Global.System.Data.DataColumn("UserID", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUserID) Me.columnDateLastChanged = New Global.System.Data.DataColumn("DateLastChanged", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateLastChanged) Me.columnCompany.MaxLength = 2 Me.columnCodeType.MaxLength = 1 Me.columnTypeHD.MaxLength = 10 Me.columnModeHD.MaxLength = 20 Me.columnPrefix.MaxLength = 2 Me.columnPONumber.MaxLength = 8 Me.columnPONumberPrev.MaxLength = 8 Me.columnSONumber.MaxLength = 7 Me.columnStatus.MaxLength = 2 Me.columnAlvSO.MaxLength = 10 Me.columnCustPO.MaxLength = 8 Me.columnShipVia.MaxLength = 20 Me.columnShipTo.MaxLength = 28 Me.columnSipAdd1.MaxLength = 28 Me.columnShipAdd2.MaxLength = 28 Me.columnShipAdd3.MaxLength = 28 Me.columnCity.MaxLength = 20 Me.columnState.MaxLength = 4 Me.columnPostalCode.MaxLength = 10 Me.columnCountryCode.MaxLength = 28 Me.columnShipToNum.MaxLength = 20 Me.columnFlag0.MaxLength = 1 Me.columnFlag1.MaxLength = 1 Me.columnFlag2.MaxLength = 1 Me.columnFlag3.MaxLength = 1 Me.columnRemark.MaxLength = 100 Me.columnFild1.MaxLength = 50 Me.columnFild2.MaxLength = 50 Me.columnFild3.MaxLength = 50 Me.columnFild4.MaxLength = 50 Me.columnFild5.MaxLength = 50 Me.columnComments.MaxLength = 1040 Me.columnTimeCreated.MaxLength = 10 Me.columnUserID.MaxLength = 10 Me.columnDateLastChanged.MaxLength = 10 End Sub _ Public Function Newpo_headerRow() As po_headerRow Return CType(Me.NewRow,po_headerRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New po_headerRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(po_headerRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.po_headerRowChangedEvent) Is Nothing) Then RaiseEvent po_headerRowChanged(Me, New po_headerRowChangeEvent(CType(e.Row,po_headerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.po_headerRowChangingEvent) Is Nothing) Then RaiseEvent po_headerRowChanging(Me, New po_headerRowChangeEvent(CType(e.Row,po_headerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.po_headerRowDeletedEvent) Is Nothing) Then RaiseEvent po_headerRowDeleted(Me, New po_headerRowChangeEvent(CType(e.Row,po_headerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.po_headerRowDeletingEvent) Is Nothing) Then RaiseEvent po_headerRowDeleting(Me, New po_headerRowChangeEvent(CType(e.Row,po_headerRow), e.Action)) End If End Sub _ Public Sub Removepo_headerRow(ByVal row As po_headerRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "po_headerDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class po_header_backupDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnCompany As Global.System.Data.DataColumn Private columnCodeType As Global.System.Data.DataColumn Private columnTypeHD As Global.System.Data.DataColumn Private columnModeHD As Global.System.Data.DataColumn Private columnPrefix As Global.System.Data.DataColumn Private columnGenDate As Global.System.Data.DataColumn Private columnGenHour As Global.System.Data.DataColumn Private columnPONumber As Global.System.Data.DataColumn Private columnSONumber As Global.System.Data.DataColumn Private columnPODate As Global.System.Data.DataColumn Private columnRevision As Global.System.Data.DataColumn Private columnStatus As Global.System.Data.DataColumn Private columnCustPO As Global.System.Data.DataColumn Private columnShipVia As Global.System.Data.DataColumn Private columnShipTo As Global.System.Data.DataColumn Private columnSipAdd1 As Global.System.Data.DataColumn Private columnShipAdd2 As Global.System.Data.DataColumn Private columnShipAdd3 As Global.System.Data.DataColumn Private columnCity As Global.System.Data.DataColumn Private columnState As Global.System.Data.DataColumn Private columnPostalCode As Global.System.Data.DataColumn Private columnCountryCode As Global.System.Data.DataColumn Private columnFlag0 As Global.System.Data.DataColumn Private columnFlag1 As Global.System.Data.DataColumn Private columnFlag2 As Global.System.Data.DataColumn Private columnFlag3 As Global.System.Data.DataColumn Private columnRemark As Global.System.Data.DataColumn Private columnFild1 As Global.System.Data.DataColumn Private columnFild2 As Global.System.Data.DataColumn Private columnFild3 As Global.System.Data.DataColumn Private columnComments As Global.System.Data.DataColumn Private columnDateCreated As Global.System.Data.DataColumn Private columnTimeCreated As Global.System.Data.DataColumn Private columnUserID As Global.System.Data.DataColumn Private columnDateLastChanged As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "po_header_backup" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property CompanyColumn() As Global.System.Data.DataColumn Get Return Me.columnCompany End Get End Property _ Public ReadOnly Property CodeTypeColumn() As Global.System.Data.DataColumn Get Return Me.columnCodeType End Get End Property _ Public ReadOnly Property TypeHDColumn() As Global.System.Data.DataColumn Get Return Me.columnTypeHD End Get End Property _ Public ReadOnly Property ModeHDColumn() As Global.System.Data.DataColumn Get Return Me.columnModeHD End Get End Property _ Public ReadOnly Property PrefixColumn() As Global.System.Data.DataColumn Get Return Me.columnPrefix End Get End Property _ Public ReadOnly Property GenDateColumn() As Global.System.Data.DataColumn Get Return Me.columnGenDate End Get End Property _ Public ReadOnly Property GenHourColumn() As Global.System.Data.DataColumn Get Return Me.columnGenHour End Get End Property _ Public ReadOnly Property PONumberColumn() As Global.System.Data.DataColumn Get Return Me.columnPONumber End Get End Property _ Public ReadOnly Property SONumberColumn() As Global.System.Data.DataColumn Get Return Me.columnSONumber End Get End Property _ Public ReadOnly Property PODateColumn() As Global.System.Data.DataColumn Get Return Me.columnPODate End Get End Property _ Public ReadOnly Property RevisionColumn() As Global.System.Data.DataColumn Get Return Me.columnRevision End Get End Property _ Public ReadOnly Property StatusColumn() As Global.System.Data.DataColumn Get Return Me.columnStatus End Get End Property _ Public ReadOnly Property CustPOColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPO End Get End Property _ Public ReadOnly Property ShipViaColumn() As Global.System.Data.DataColumn Get Return Me.columnShipVia End Get End Property _ Public ReadOnly Property ShipToColumn() As Global.System.Data.DataColumn Get Return Me.columnShipTo End Get End Property _ Public ReadOnly Property SipAdd1Column() As Global.System.Data.DataColumn Get Return Me.columnSipAdd1 End Get End Property _ Public ReadOnly Property ShipAdd2Column() As Global.System.Data.DataColumn Get Return Me.columnShipAdd2 End Get End Property _ Public ReadOnly Property ShipAdd3Column() As Global.System.Data.DataColumn Get Return Me.columnShipAdd3 End Get End Property _ Public ReadOnly Property CityColumn() As Global.System.Data.DataColumn Get Return Me.columnCity End Get End Property _ Public ReadOnly Property StateColumn() As Global.System.Data.DataColumn Get Return Me.columnState End Get End Property _ Public ReadOnly Property PostalCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnPostalCode End Get End Property _ Public ReadOnly Property CountryCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnCountryCode End Get End Property _ Public ReadOnly Property Flag0Column() As Global.System.Data.DataColumn Get Return Me.columnFlag0 End Get End Property _ Public ReadOnly Property Flag1Column() As Global.System.Data.DataColumn Get Return Me.columnFlag1 End Get End Property _ Public ReadOnly Property Flag2Column() As Global.System.Data.DataColumn Get Return Me.columnFlag2 End Get End Property _ Public ReadOnly Property Flag3Column() As Global.System.Data.DataColumn Get Return Me.columnFlag3 End Get End Property _ Public ReadOnly Property RemarkColumn() As Global.System.Data.DataColumn Get Return Me.columnRemark End Get End Property _ Public ReadOnly Property Fild1Column() As Global.System.Data.DataColumn Get Return Me.columnFild1 End Get End Property _ Public ReadOnly Property Fild2Column() As Global.System.Data.DataColumn Get Return Me.columnFild2 End Get End Property _ Public ReadOnly Property Fild3Column() As Global.System.Data.DataColumn Get Return Me.columnFild3 End Get End Property _ Public ReadOnly Property CommentsColumn() As Global.System.Data.DataColumn Get Return Me.columnComments End Get End Property _ Public ReadOnly Property DateCreatedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateCreated End Get End Property _ Public ReadOnly Property TimeCreatedColumn() As Global.System.Data.DataColumn Get Return Me.columnTimeCreated End Get End Property _ Public ReadOnly Property UserIDColumn() As Global.System.Data.DataColumn Get Return Me.columnUserID End Get End Property _ Public ReadOnly Property DateLastChangedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateLastChanged End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As po_header_backupRow Get Return CType(Me.Rows(index),po_header_backupRow) End Get End Property _ Public Event po_header_backupRowChanging As po_header_backupRowChangeEventHandler _ Public Event po_header_backupRowChanged As po_header_backupRowChangeEventHandler _ Public Event po_header_backupRowDeleting As po_header_backupRowChangeEventHandler _ Public Event po_header_backupRowDeleted As po_header_backupRowChangeEventHandler _ Public Overloads Sub Addpo_header_backupRow(ByVal row As po_header_backupRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpo_header_backupRow( _ ByVal Company As String, _ ByVal CodeType As String, _ ByVal TypeHD As String, _ ByVal ModeHD As String, _ ByVal Prefix As String, _ ByVal GenDate As Date, _ ByVal GenHour As Date, _ ByVal PONumber As String, _ ByVal SONumber As String, _ ByVal PODate As Date, _ ByVal Revision As Decimal, _ ByVal Status As String, _ ByVal CustPO As String, _ ByVal ShipVia As String, _ ByVal ShipTo As String, _ ByVal SipAdd1 As String, _ ByVal ShipAdd2 As String, _ ByVal ShipAdd3 As String, _ ByVal City As String, _ ByVal State As String, _ ByVal PostalCode As String, _ ByVal CountryCode As String, _ ByVal Flag0 As String, _ ByVal Flag1 As String, _ ByVal Flag2 As String, _ ByVal Flag3 As String, _ ByVal Remark As String, _ ByVal Fild1 As String, _ ByVal Fild2 As String, _ ByVal Fild3 As String, _ ByVal Comments As String, _ ByVal DateCreated As Date, _ ByVal TimeCreated As String, _ ByVal UserID As String, _ ByVal DateLastChanged As String) As po_header_backupRow Dim rowpo_header_backupRow As po_header_backupRow = CType(Me.NewRow,po_header_backupRow) Dim columnValuesArray() As Object = New Object() {Company, CodeType, TypeHD, ModeHD, Prefix, GenDate, GenHour, PONumber, SONumber, PODate, Revision, Status, CustPO, ShipVia, ShipTo, SipAdd1, ShipAdd2, ShipAdd3, City, State, PostalCode, CountryCode, Flag0, Flag1, Flag2, Flag3, Remark, Fild1, Fild2, Fild3, Comments, DateCreated, TimeCreated, UserID, DateLastChanged} rowpo_header_backupRow.ItemArray = columnValuesArray Me.Rows.Add(rowpo_header_backupRow) Return rowpo_header_backupRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As po_header_backupDataTable = CType(MyBase.Clone,po_header_backupDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New po_header_backupDataTable() End Function _ Friend Sub InitVars() Me.columnCompany = MyBase.Columns("Company") Me.columnCodeType = MyBase.Columns("CodeType") Me.columnTypeHD = MyBase.Columns("TypeHD") Me.columnModeHD = MyBase.Columns("ModeHD") Me.columnPrefix = MyBase.Columns("Prefix") Me.columnGenDate = MyBase.Columns("GenDate") Me.columnGenHour = MyBase.Columns("GenHour") Me.columnPONumber = MyBase.Columns("PONumber") Me.columnSONumber = MyBase.Columns("SONumber") Me.columnPODate = MyBase.Columns("PODate") Me.columnRevision = MyBase.Columns("Revision") Me.columnStatus = MyBase.Columns("Status") Me.columnCustPO = MyBase.Columns("CustPO") Me.columnShipVia = MyBase.Columns("ShipVia") Me.columnShipTo = MyBase.Columns("ShipTo") Me.columnSipAdd1 = MyBase.Columns("SipAdd1") Me.columnShipAdd2 = MyBase.Columns("ShipAdd2") Me.columnShipAdd3 = MyBase.Columns("ShipAdd3") Me.columnCity = MyBase.Columns("City") Me.columnState = MyBase.Columns("State") Me.columnPostalCode = MyBase.Columns("PostalCode") Me.columnCountryCode = MyBase.Columns("CountryCode") Me.columnFlag0 = MyBase.Columns("Flag0") Me.columnFlag1 = MyBase.Columns("Flag1") Me.columnFlag2 = MyBase.Columns("Flag2") Me.columnFlag3 = MyBase.Columns("Flag3") Me.columnRemark = MyBase.Columns("Remark") Me.columnFild1 = MyBase.Columns("Fild1") Me.columnFild2 = MyBase.Columns("Fild2") Me.columnFild3 = MyBase.Columns("Fild3") Me.columnComments = MyBase.Columns("Comments") Me.columnDateCreated = MyBase.Columns("DateCreated") Me.columnTimeCreated = MyBase.Columns("TimeCreated") Me.columnUserID = MyBase.Columns("UserID") Me.columnDateLastChanged = MyBase.Columns("DateLastChanged") End Sub _ Private Sub InitClass() Me.columnCompany = New Global.System.Data.DataColumn("Company", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCompany) Me.columnCodeType = New Global.System.Data.DataColumn("CodeType", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCodeType) Me.columnTypeHD = New Global.System.Data.DataColumn("TypeHD", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTypeHD) Me.columnModeHD = New Global.System.Data.DataColumn("ModeHD", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModeHD) Me.columnPrefix = New Global.System.Data.DataColumn("Prefix", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPrefix) Me.columnGenDate = New Global.System.Data.DataColumn("GenDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGenDate) Me.columnGenHour = New Global.System.Data.DataColumn("GenHour", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnGenHour) Me.columnPONumber = New Global.System.Data.DataColumn("PONumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPONumber) Me.columnSONumber = New Global.System.Data.DataColumn("SONumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSONumber) Me.columnPODate = New Global.System.Data.DataColumn("PODate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPODate) Me.columnRevision = New Global.System.Data.DataColumn("Revision", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRevision) Me.columnStatus = New Global.System.Data.DataColumn("Status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnStatus) Me.columnCustPO = New Global.System.Data.DataColumn("CustPO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPO) Me.columnShipVia = New Global.System.Data.DataColumn("ShipVia", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipVia) Me.columnShipTo = New Global.System.Data.DataColumn("ShipTo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipTo) Me.columnSipAdd1 = New Global.System.Data.DataColumn("SipAdd1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSipAdd1) Me.columnShipAdd2 = New Global.System.Data.DataColumn("ShipAdd2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipAdd2) Me.columnShipAdd3 = New Global.System.Data.DataColumn("ShipAdd3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipAdd3) Me.columnCity = New Global.System.Data.DataColumn("City", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCity) Me.columnState = New Global.System.Data.DataColumn("State", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnState) Me.columnPostalCode = New Global.System.Data.DataColumn("PostalCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPostalCode) Me.columnCountryCode = New Global.System.Data.DataColumn("CountryCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCountryCode) Me.columnFlag0 = New Global.System.Data.DataColumn("Flag0", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag0) Me.columnFlag1 = New Global.System.Data.DataColumn("Flag1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag1) Me.columnFlag2 = New Global.System.Data.DataColumn("Flag2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag2) Me.columnFlag3 = New Global.System.Data.DataColumn("Flag3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag3) Me.columnRemark = New Global.System.Data.DataColumn("Remark", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRemark) Me.columnFild1 = New Global.System.Data.DataColumn("Fild1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFild1) Me.columnFild2 = New Global.System.Data.DataColumn("Fild2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFild2) Me.columnFild3 = New Global.System.Data.DataColumn("Fild3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFild3) Me.columnComments = New Global.System.Data.DataColumn("Comments", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnComments) Me.columnDateCreated = New Global.System.Data.DataColumn("DateCreated", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateCreated) Me.columnTimeCreated = New Global.System.Data.DataColumn("TimeCreated", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnTimeCreated) Me.columnUserID = New Global.System.Data.DataColumn("UserID", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUserID) Me.columnDateLastChanged = New Global.System.Data.DataColumn("DateLastChanged", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateLastChanged) Me.columnCompany.MaxLength = 2 Me.columnCodeType.MaxLength = 1 Me.columnTypeHD.MaxLength = 10 Me.columnModeHD.MaxLength = 20 Me.columnPrefix.MaxLength = 2 Me.columnPONumber.MaxLength = 8 Me.columnSONumber.MaxLength = 7 Me.columnStatus.MaxLength = 2 Me.columnCustPO.MaxLength = 8 Me.columnShipVia.MaxLength = 20 Me.columnShipTo.MaxLength = 28 Me.columnSipAdd1.MaxLength = 28 Me.columnShipAdd2.MaxLength = 28 Me.columnShipAdd3.MaxLength = 28 Me.columnCity.MaxLength = 20 Me.columnState.MaxLength = 4 Me.columnPostalCode.MaxLength = 10 Me.columnCountryCode.MaxLength = 28 Me.columnFlag0.MaxLength = 1 Me.columnFlag1.MaxLength = 1 Me.columnFlag2.MaxLength = 1 Me.columnFlag3.MaxLength = 1 Me.columnRemark.MaxLength = 100 Me.columnFild1.MaxLength = 50 Me.columnFild2.MaxLength = 50 Me.columnFild3.MaxLength = 50 Me.columnComments.MaxLength = 1040 Me.columnTimeCreated.MaxLength = 10 Me.columnUserID.MaxLength = 10 Me.columnDateLastChanged.MaxLength = 10 End Sub _ Public Function Newpo_header_backupRow() As po_header_backupRow Return CType(Me.NewRow,po_header_backupRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New po_header_backupRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(po_header_backupRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.po_header_backupRowChangedEvent) Is Nothing) Then RaiseEvent po_header_backupRowChanged(Me, New po_header_backupRowChangeEvent(CType(e.Row,po_header_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.po_header_backupRowChangingEvent) Is Nothing) Then RaiseEvent po_header_backupRowChanging(Me, New po_header_backupRowChangeEvent(CType(e.Row,po_header_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.po_header_backupRowDeletedEvent) Is Nothing) Then RaiseEvent po_header_backupRowDeleted(Me, New po_header_backupRowChangeEvent(CType(e.Row,po_header_backupRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.po_header_backupRowDeletingEvent) Is Nothing) Then RaiseEvent po_header_backupRowDeleting(Me, New po_header_backupRowChangeEvent(CType(e.Row,po_header_backupRow), e.Action)) End If End Sub _ Public Sub Removepo_header_backupRow(ByVal row As po_header_backupRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "po_header_backupDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class po_history_detailDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnpoNumber As Global.System.Data.DataColumn Private columnrevision As Global.System.Data.DataColumn Private columnchg_type As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columnchange As Global.System.Data.DataColumn Private columnfrom_value As Global.System.Data.DataColumn Private columnto_value As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columncontent As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "po_history_detail" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property poNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnpoNumber End Get End Property _ Public ReadOnly Property revisionColumn() As Global.System.Data.DataColumn Get Return Me.columnrevision End Get End Property _ Public ReadOnly Property chg_typeColumn() As Global.System.Data.DataColumn Get Return Me.columnchg_type End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property changeColumn() As Global.System.Data.DataColumn Get Return Me.columnchange End Get End Property _ Public ReadOnly Property from_valueColumn() As Global.System.Data.DataColumn Get Return Me.columnfrom_value End Get End Property _ Public ReadOnly Property to_valueColumn() As Global.System.Data.DataColumn Get Return Me.columnto_value End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property contentColumn() As Global.System.Data.DataColumn Get Return Me.columncontent End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As po_history_detailRow Get Return CType(Me.Rows(index),po_history_detailRow) End Get End Property _ Public Event po_history_detailRowChanging As po_history_detailRowChangeEventHandler _ Public Event po_history_detailRowChanged As po_history_detailRowChangeEventHandler _ Public Event po_history_detailRowDeleting As po_history_detailRowChangeEventHandler _ Public Event po_history_detailRowDeleted As po_history_detailRowChangeEventHandler _ Public Overloads Sub Addpo_history_detailRow(ByVal row As po_history_detailRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpo_history_detailRow(ByVal poNumber As String, ByVal revision As String, ByVal chg_type As String, ByVal poLine As String, ByVal change As String, ByVal from_value As String, ByVal to_value As String, ByVal lastupdate As Date, ByVal content As String) As po_history_detailRow Dim rowpo_history_detailRow As po_history_detailRow = CType(Me.NewRow,po_history_detailRow) Dim columnValuesArray() As Object = New Object() {poNumber, revision, chg_type, poLine, change, from_value, to_value, lastupdate, content} rowpo_history_detailRow.ItemArray = columnValuesArray Me.Rows.Add(rowpo_history_detailRow) Return rowpo_history_detailRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As po_history_detailDataTable = CType(MyBase.Clone,po_history_detailDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New po_history_detailDataTable() End Function _ Friend Sub InitVars() Me.columnpoNumber = MyBase.Columns("poNumber") Me.columnrevision = MyBase.Columns("revision") Me.columnchg_type = MyBase.Columns("chg_type") Me.columnpoLine = MyBase.Columns("poLine") Me.columnchange = MyBase.Columns("change") Me.columnfrom_value = MyBase.Columns("from_value") Me.columnto_value = MyBase.Columns("to_value") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columncontent = MyBase.Columns("content") End Sub _ Private Sub InitClass() Me.columnpoNumber = New Global.System.Data.DataColumn("poNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoNumber) Me.columnrevision = New Global.System.Data.DataColumn("revision", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnrevision) Me.columnchg_type = New Global.System.Data.DataColumn("chg_type", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnchg_type) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columnchange = New Global.System.Data.DataColumn("change", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnchange) Me.columnfrom_value = New Global.System.Data.DataColumn("from_value", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnfrom_value) Me.columnto_value = New Global.System.Data.DataColumn("to_value", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnto_value) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columncontent = New Global.System.Data.DataColumn("content", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncontent) Me.columnpoNumber.MaxLength = 50 Me.columnrevision.MaxLength = 20 Me.columnchg_type.MaxLength = 200 Me.columnpoLine.MaxLength = 20 Me.columnchange.MaxLength = 200 Me.columnfrom_value.MaxLength = 2147483647 Me.columnto_value.MaxLength = 2147483647 Me.columncontent.MaxLength = 2147483647 End Sub _ Public Function Newpo_history_detailRow() As po_history_detailRow Return CType(Me.NewRow,po_history_detailRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New po_history_detailRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(po_history_detailRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.po_history_detailRowChangedEvent) Is Nothing) Then RaiseEvent po_history_detailRowChanged(Me, New po_history_detailRowChangeEvent(CType(e.Row,po_history_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.po_history_detailRowChangingEvent) Is Nothing) Then RaiseEvent po_history_detailRowChanging(Me, New po_history_detailRowChangeEvent(CType(e.Row,po_history_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.po_history_detailRowDeletedEvent) Is Nothing) Then RaiseEvent po_history_detailRowDeleted(Me, New po_history_detailRowChangeEvent(CType(e.Row,po_history_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.po_history_detailRowDeletingEvent) Is Nothing) Then RaiseEvent po_history_detailRowDeleting(Me, New po_history_detailRowChangeEvent(CType(e.Row,po_history_detailRow), e.Action)) End If End Sub _ Public Sub Removepo_history_detailRow(ByVal row As po_history_detailRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "po_history_detailDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class po_orig_detailDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnpoNumber As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columnsoLine As Global.System.Data.DataColumn Private columntargetDate As Global.System.Data.DataColumn Private columnlineComments As Global.System.Data.DataColumn Private columncustPartNumber As Global.System.Data.DataColumn Private columnquantity As Global.System.Data.DataColumn Private columnunitPrice As Global.System.Data.DataColumn Private columncustPartNo As Global.System.Data.DataColumn Private columndueDate As Global.System.Data.DataColumn Private columncustPart As Global.System.Data.DataColumn Private columncustPartGif As Global.System.Data.DataColumn Private columncustPartDesc As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "po_orig_detail" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property poNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnpoNumber End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property soLineColumn() As Global.System.Data.DataColumn Get Return Me.columnsoLine End Get End Property _ Public ReadOnly Property targetDateColumn() As Global.System.Data.DataColumn Get Return Me.columntargetDate End Get End Property _ Public ReadOnly Property lineCommentsColumn() As Global.System.Data.DataColumn Get Return Me.columnlineComments End Get End Property _ Public ReadOnly Property custPartNumberColumn() As Global.System.Data.DataColumn Get Return Me.columncustPartNumber End Get End Property _ Public ReadOnly Property quantityColumn() As Global.System.Data.DataColumn Get Return Me.columnquantity End Get End Property _ Public ReadOnly Property unitPriceColumn() As Global.System.Data.DataColumn Get Return Me.columnunitPrice End Get End Property _ Public ReadOnly Property custPartNoColumn() As Global.System.Data.DataColumn Get Return Me.columncustPartNo End Get End Property _ Public ReadOnly Property dueDateColumn() As Global.System.Data.DataColumn Get Return Me.columndueDate End Get End Property _ Public ReadOnly Property custPartColumn() As Global.System.Data.DataColumn Get Return Me.columncustPart End Get End Property _ Public ReadOnly Property custPartGifColumn() As Global.System.Data.DataColumn Get Return Me.columncustPartGif End Get End Property _ Public ReadOnly Property custPartDescColumn() As Global.System.Data.DataColumn Get Return Me.columncustPartDesc End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As po_orig_detailRow Get Return CType(Me.Rows(index),po_orig_detailRow) End Get End Property _ Public Event po_orig_detailRowChanging As po_orig_detailRowChangeEventHandler _ Public Event po_orig_detailRowChanged As po_orig_detailRowChangeEventHandler _ Public Event po_orig_detailRowDeleting As po_orig_detailRowChangeEventHandler _ Public Event po_orig_detailRowDeleted As po_orig_detailRowChangeEventHandler _ Public Overloads Sub Addpo_orig_detailRow(ByVal row As po_orig_detailRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpo_orig_detailRow(ByVal poNumber As String, ByVal poLine As String, ByVal soLine As String, ByVal targetDate As Date, ByVal lineComments As String, ByVal custPartNumber As String, ByVal quantity As Integer, ByVal unitPrice As Integer, ByVal custPartNo As String, ByVal dueDate As Date, ByVal custPart As String, ByVal custPartGif As String, ByVal custPartDesc As String) As po_orig_detailRow Dim rowpo_orig_detailRow As po_orig_detailRow = CType(Me.NewRow,po_orig_detailRow) Dim columnValuesArray() As Object = New Object() {poNumber, poLine, soLine, targetDate, lineComments, custPartNumber, quantity, unitPrice, custPartNo, dueDate, custPart, custPartGif, custPartDesc} rowpo_orig_detailRow.ItemArray = columnValuesArray Me.Rows.Add(rowpo_orig_detailRow) Return rowpo_orig_detailRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As po_orig_detailDataTable = CType(MyBase.Clone,po_orig_detailDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New po_orig_detailDataTable() End Function _ Friend Sub InitVars() Me.columnpoNumber = MyBase.Columns("poNumber") Me.columnpoLine = MyBase.Columns("poLine") Me.columnsoLine = MyBase.Columns("soLine") Me.columntargetDate = MyBase.Columns("targetDate") Me.columnlineComments = MyBase.Columns("lineComments") Me.columncustPartNumber = MyBase.Columns("custPartNumber") Me.columnquantity = MyBase.Columns("quantity") Me.columnunitPrice = MyBase.Columns("unitPrice") Me.columncustPartNo = MyBase.Columns("custPartNo") Me.columndueDate = MyBase.Columns("dueDate") Me.columncustPart = MyBase.Columns("custPart") Me.columncustPartGif = MyBase.Columns("custPartGif") Me.columncustPartDesc = MyBase.Columns("custPartDesc") End Sub _ Private Sub InitClass() Me.columnpoNumber = New Global.System.Data.DataColumn("poNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoNumber) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columnsoLine = New Global.System.Data.DataColumn("soLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsoLine) Me.columntargetDate = New Global.System.Data.DataColumn("targetDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columntargetDate) Me.columnlineComments = New Global.System.Data.DataColumn("lineComments", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineComments) Me.columncustPartNumber = New Global.System.Data.DataColumn("custPartNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustPartNumber) Me.columnquantity = New Global.System.Data.DataColumn("quantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnquantity) Me.columnunitPrice = New Global.System.Data.DataColumn("unitPrice", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnunitPrice) Me.columncustPartNo = New Global.System.Data.DataColumn("custPartNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustPartNo) Me.columndueDate = New Global.System.Data.DataColumn("dueDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndueDate) Me.columncustPart = New Global.System.Data.DataColumn("custPart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustPart) Me.columncustPartGif = New Global.System.Data.DataColumn("custPartGif", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustPartGif) Me.columncustPartDesc = New Global.System.Data.DataColumn("custPartDesc", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustPartDesc) Me.columnpoNumber.MaxLength = 50 Me.columnpoLine.MaxLength = 20 Me.columnsoLine.MaxLength = 20 Me.columnlineComments.MaxLength = 2147483647 Me.columncustPartNumber.MaxLength = 250 Me.columncustPartNo.MaxLength = 250 Me.columncustPart.MaxLength = 250 Me.columncustPartGif.MaxLength = 200 Me.columncustPartDesc.MaxLength = 250 End Sub _ Public Function Newpo_orig_detailRow() As po_orig_detailRow Return CType(Me.NewRow,po_orig_detailRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New po_orig_detailRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(po_orig_detailRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.po_orig_detailRowChangedEvent) Is Nothing) Then RaiseEvent po_orig_detailRowChanged(Me, New po_orig_detailRowChangeEvent(CType(e.Row,po_orig_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.po_orig_detailRowChangingEvent) Is Nothing) Then RaiseEvent po_orig_detailRowChanging(Me, New po_orig_detailRowChangeEvent(CType(e.Row,po_orig_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.po_orig_detailRowDeletedEvent) Is Nothing) Then RaiseEvent po_orig_detailRowDeleted(Me, New po_orig_detailRowChangeEvent(CType(e.Row,po_orig_detailRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.po_orig_detailRowDeletingEvent) Is Nothing) Then RaiseEvent po_orig_detailRowDeleting(Me, New po_orig_detailRowChangeEvent(CType(e.Row,po_orig_detailRow), e.Action)) End If End Sub _ Public Sub Removepo_orig_detailRow(ByVal row As po_orig_detailRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "po_orig_detailDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class po_orig_headerDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnpoNumber As Global.System.Data.DataColumn Private columnpoDate As Global.System.Data.DataColumn Private columnpoRev As Global.System.Data.DataColumn Private columncomments As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columncustPo As Global.System.Data.DataColumn Private columnalvSo As Global.System.Data.DataColumn Private columnshipVia As Global.System.Data.DataColumn Private columnshipTo As Global.System.Data.DataColumn Private columnshipAdd1 As Global.System.Data.DataColumn Private columnshipAdd2 As Global.System.Data.DataColumn Private columnshipAdd3 As Global.System.Data.DataColumn Private columnshipToNum As Global.System.Data.DataColumn Private columncity As Global.System.Data.DataColumn Private columnstate As Global.System.Data.DataColumn Private columnpostalCode As Global.System.Data.DataColumn Private columncountryCode As Global.System.Data.DataColumn Private columninsertDate As Global.System.Data.DataColumn Private columncontent As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "po_orig_header" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property poNumberColumn() As Global.System.Data.DataColumn Get Return Me.columnpoNumber End Get End Property _ Public ReadOnly Property poDateColumn() As Global.System.Data.DataColumn Get Return Me.columnpoDate End Get End Property _ Public ReadOnly Property poRevColumn() As Global.System.Data.DataColumn Get Return Me.columnpoRev End Get End Property _ Public ReadOnly Property commentsColumn() As Global.System.Data.DataColumn Get Return Me.columncomments End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property custPoColumn() As Global.System.Data.DataColumn Get Return Me.columncustPo End Get End Property _ Public ReadOnly Property alvSoColumn() As Global.System.Data.DataColumn Get Return Me.columnalvSo End Get End Property _ Public ReadOnly Property shipViaColumn() As Global.System.Data.DataColumn Get Return Me.columnshipVia End Get End Property _ Public ReadOnly Property shipToColumn() As Global.System.Data.DataColumn Get Return Me.columnshipTo End Get End Property _ Public ReadOnly Property shipAdd1Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd1 End Get End Property _ Public ReadOnly Property shipAdd2Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd2 End Get End Property _ Public ReadOnly Property shipAdd3Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd3 End Get End Property _ Public ReadOnly Property shipToNumColumn() As Global.System.Data.DataColumn Get Return Me.columnshipToNum End Get End Property _ Public ReadOnly Property cityColumn() As Global.System.Data.DataColumn Get Return Me.columncity End Get End Property _ Public ReadOnly Property stateColumn() As Global.System.Data.DataColumn Get Return Me.columnstate End Get End Property _ Public ReadOnly Property postalCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnpostalCode End Get End Property _ Public ReadOnly Property countryCodeColumn() As Global.System.Data.DataColumn Get Return Me.columncountryCode End Get End Property _ Public ReadOnly Property insertDateColumn() As Global.System.Data.DataColumn Get Return Me.columninsertDate End Get End Property _ Public ReadOnly Property contentColumn() As Global.System.Data.DataColumn Get Return Me.columncontent End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As po_orig_headerRow Get Return CType(Me.Rows(index),po_orig_headerRow) End Get End Property _ Public Event po_orig_headerRowChanging As po_orig_headerRowChangeEventHandler _ Public Event po_orig_headerRowChanged As po_orig_headerRowChangeEventHandler _ Public Event po_orig_headerRowDeleting As po_orig_headerRowChangeEventHandler _ Public Event po_orig_headerRowDeleted As po_orig_headerRowChangeEventHandler _ Public Overloads Sub Addpo_orig_headerRow(ByVal row As po_orig_headerRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpo_orig_headerRow( _ ByVal poNumber As String, _ ByVal poDate As Date, _ ByVal poRev As String, _ ByVal comments As String, _ ByVal status As String, _ ByVal custPo As String, _ ByVal alvSo As String, _ ByVal shipVia As String, _ ByVal shipTo As String, _ ByVal shipAdd1 As String, _ ByVal shipAdd2 As String, _ ByVal shipAdd3 As String, _ ByVal shipToNum As String, _ ByVal city As String, _ ByVal state As String, _ ByVal postalCode As String, _ ByVal countryCode As String, _ ByVal insertDate As Date, _ ByVal content As String) As po_orig_headerRow Dim rowpo_orig_headerRow As po_orig_headerRow = CType(Me.NewRow,po_orig_headerRow) Dim columnValuesArray() As Object = New Object() {poNumber, poDate, poRev, comments, status, custPo, alvSo, shipVia, shipTo, shipAdd1, shipAdd2, shipAdd3, shipToNum, city, state, postalCode, countryCode, insertDate, content} rowpo_orig_headerRow.ItemArray = columnValuesArray Me.Rows.Add(rowpo_orig_headerRow) Return rowpo_orig_headerRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As po_orig_headerDataTable = CType(MyBase.Clone,po_orig_headerDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New po_orig_headerDataTable() End Function _ Friend Sub InitVars() Me.columnpoNumber = MyBase.Columns("poNumber") Me.columnpoDate = MyBase.Columns("poDate") Me.columnpoRev = MyBase.Columns("poRev") Me.columncomments = MyBase.Columns("comments") Me.columnstatus = MyBase.Columns("status") Me.columncustPo = MyBase.Columns("custPo") Me.columnalvSo = MyBase.Columns("alvSo") Me.columnshipVia = MyBase.Columns("shipVia") Me.columnshipTo = MyBase.Columns("shipTo") Me.columnshipAdd1 = MyBase.Columns("shipAdd1") Me.columnshipAdd2 = MyBase.Columns("shipAdd2") Me.columnshipAdd3 = MyBase.Columns("shipAdd3") Me.columnshipToNum = MyBase.Columns("shipToNum") Me.columncity = MyBase.Columns("city") Me.columnstate = MyBase.Columns("state") Me.columnpostalCode = MyBase.Columns("postalCode") Me.columncountryCode = MyBase.Columns("countryCode") Me.columninsertDate = MyBase.Columns("insertDate") Me.columncontent = MyBase.Columns("content") End Sub _ Private Sub InitClass() Me.columnpoNumber = New Global.System.Data.DataColumn("poNumber", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoNumber) Me.columnpoDate = New Global.System.Data.DataColumn("poDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoDate) Me.columnpoRev = New Global.System.Data.DataColumn("poRev", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoRev) Me.columncomments = New Global.System.Data.DataColumn("comments", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncomments) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columncustPo = New Global.System.Data.DataColumn("custPo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustPo) Me.columnalvSo = New Global.System.Data.DataColumn("alvSo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnalvSo) Me.columnshipVia = New Global.System.Data.DataColumn("shipVia", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipVia) Me.columnshipTo = New Global.System.Data.DataColumn("shipTo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipTo) Me.columnshipAdd1 = New Global.System.Data.DataColumn("shipAdd1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd1) Me.columnshipAdd2 = New Global.System.Data.DataColumn("shipAdd2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd2) Me.columnshipAdd3 = New Global.System.Data.DataColumn("shipAdd3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd3) Me.columnshipToNum = New Global.System.Data.DataColumn("shipToNum", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipToNum) Me.columncity = New Global.System.Data.DataColumn("city", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncity) Me.columnstate = New Global.System.Data.DataColumn("state", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstate) Me.columnpostalCode = New Global.System.Data.DataColumn("postalCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpostalCode) Me.columncountryCode = New Global.System.Data.DataColumn("countryCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncountryCode) Me.columninsertDate = New Global.System.Data.DataColumn("insertDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columninsertDate) Me.columncontent = New Global.System.Data.DataColumn("content", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncontent) Me.columnpoNumber.MaxLength = 50 Me.columnpoRev.MaxLength = 20 Me.columncomments.MaxLength = 2147483647 Me.columnstatus.MaxLength = 20 Me.columncustPo.MaxLength = 50 Me.columnalvSo.MaxLength = 50 Me.columnshipVia.MaxLength = 100 Me.columnshipTo.MaxLength = 500 Me.columnshipAdd1.MaxLength = 500 Me.columnshipAdd2.MaxLength = 500 Me.columnshipAdd3.MaxLength = 500 Me.columnshipToNum.MaxLength = 100 Me.columncity.MaxLength = 100 Me.columnstate.MaxLength = 100 Me.columnpostalCode.MaxLength = 100 Me.columncountryCode.MaxLength = 100 Me.columncontent.MaxLength = 2147483647 End Sub _ Public Function Newpo_orig_headerRow() As po_orig_headerRow Return CType(Me.NewRow,po_orig_headerRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New po_orig_headerRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(po_orig_headerRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.po_orig_headerRowChangedEvent) Is Nothing) Then RaiseEvent po_orig_headerRowChanged(Me, New po_orig_headerRowChangeEvent(CType(e.Row,po_orig_headerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.po_orig_headerRowChangingEvent) Is Nothing) Then RaiseEvent po_orig_headerRowChanging(Me, New po_orig_headerRowChangeEvent(CType(e.Row,po_orig_headerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.po_orig_headerRowDeletedEvent) Is Nothing) Then RaiseEvent po_orig_headerRowDeleted(Me, New po_orig_headerRowChangeEvent(CType(e.Row,po_orig_headerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.po_orig_headerRowDeletingEvent) Is Nothing) Then RaiseEvent po_orig_headerRowDeleting(Me, New po_orig_headerRowChangeEvent(CType(e.Row,po_orig_headerRow), e.Action)) End If End Sub _ Public Sub Removepo_orig_headerRow(ByVal row As po_orig_headerRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "po_orig_headerDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class printerDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnprinterName As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "printer" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property printerNameColumn() As Global.System.Data.DataColumn Get Return Me.columnprinterName End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As printerRow Get Return CType(Me.Rows(index),printerRow) End Get End Property _ Public Event printerRowChanging As printerRowChangeEventHandler _ Public Event printerRowChanged As printerRowChangeEventHandler _ Public Event printerRowDeleting As printerRowChangeEventHandler _ Public Event printerRowDeleted As printerRowChangeEventHandler _ Public Overloads Sub AddprinterRow(ByVal row As printerRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddprinterRow(ByVal printerName As String) As printerRow Dim rowprinterRow As printerRow = CType(Me.NewRow,printerRow) Dim columnValuesArray() As Object = New Object() {printerName} rowprinterRow.ItemArray = columnValuesArray Me.Rows.Add(rowprinterRow) Return rowprinterRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As printerDataTable = CType(MyBase.Clone,printerDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New printerDataTable() End Function _ Friend Sub InitVars() Me.columnprinterName = MyBase.Columns("printerName") End Sub _ Private Sub InitClass() Me.columnprinterName = New Global.System.Data.DataColumn("printerName", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnprinterName) Me.columnprinterName.MaxLength = 100 End Sub _ Public Function NewprinterRow() As printerRow Return CType(Me.NewRow,printerRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New printerRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(printerRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.printerRowChangedEvent) Is Nothing) Then RaiseEvent printerRowChanged(Me, New printerRowChangeEvent(CType(e.Row,printerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.printerRowChangingEvent) Is Nothing) Then RaiseEvent printerRowChanging(Me, New printerRowChangeEvent(CType(e.Row,printerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.printerRowDeletedEvent) Is Nothing) Then RaiseEvent printerRowDeleted(Me, New printerRowChangeEvent(CType(e.Row,printerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.printerRowDeletingEvent) Is Nothing) Then RaiseEvent printerRowDeleting(Me, New printerRowChangeEvent(CType(e.Row,printerRow), e.Action)) End If End Sub _ Public Sub RemoveprinterRow(ByVal row As printerRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "printerDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class ptDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnptID As Global.System.Data.DataColumn Private columnbatchNo As Global.System.Data.DataColumn Private columnptNo As Global.System.Data.DataColumn Private columnpartNo As Global.System.Data.DataColumn Private columncurtstage As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnptParent As Global.System.Data.DataColumn Private columnptStart As Global.System.Data.DataColumn Private columnprefix As Global.System.Data.DataColumn Private columnsuffix As Global.System.Data.DataColumn Private columnorigQuantity As Global.System.Data.DataColumn Private columncurrQuantity As Global.System.Data.DataColumn Private columnstartTime As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "pt" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property ptIDColumn() As Global.System.Data.DataColumn Get Return Me.columnptID End Get End Property _ Public ReadOnly Property batchNoColumn() As Global.System.Data.DataColumn Get Return Me.columnbatchNo End Get End Property _ Public ReadOnly Property ptNoColumn() As Global.System.Data.DataColumn Get Return Me.columnptNo End Get End Property _ Public ReadOnly Property partNoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartNo End Get End Property _ Public ReadOnly Property curtstageColumn() As Global.System.Data.DataColumn Get Return Me.columncurtstage End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property ptParentColumn() As Global.System.Data.DataColumn Get Return Me.columnptParent End Get End Property _ Public ReadOnly Property ptStartColumn() As Global.System.Data.DataColumn Get Return Me.columnptStart End Get End Property _ Public ReadOnly Property prefixColumn() As Global.System.Data.DataColumn Get Return Me.columnprefix End Get End Property _ Public ReadOnly Property suffixColumn() As Global.System.Data.DataColumn Get Return Me.columnsuffix End Get End Property _ Public ReadOnly Property origQuantityColumn() As Global.System.Data.DataColumn Get Return Me.columnorigQuantity End Get End Property _ Public ReadOnly Property currQuantityColumn() As Global.System.Data.DataColumn Get Return Me.columncurrQuantity End Get End Property _ Public ReadOnly Property startTimeColumn() As Global.System.Data.DataColumn Get Return Me.columnstartTime End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As ptRow Get Return CType(Me.Rows(index),ptRow) End Get End Property _ Public Event ptRowChanging As ptRowChangeEventHandler _ Public Event ptRowChanged As ptRowChangeEventHandler _ Public Event ptRowDeleting As ptRowChangeEventHandler _ Public Event ptRowDeleted As ptRowChangeEventHandler _ Public Overloads Sub AddptRow(ByVal row As ptRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddptRow(ByVal batchNo As String, ByVal ptNo As String, ByVal partNo As String, ByVal curtstage As String, ByVal status As String, ByVal ptParent As String, ByVal ptStart As String, ByVal prefix As String, ByVal suffix As Integer, ByVal origQuantity As Integer, ByVal currQuantity As Integer, ByVal startTime As Date, ByVal lastupdate As Date, ByVal lastupdatedby As String) As ptRow Dim rowptRow As ptRow = CType(Me.NewRow,ptRow) Dim columnValuesArray() As Object = New Object() {Nothing, batchNo, ptNo, partNo, curtstage, status, ptParent, ptStart, prefix, suffix, origQuantity, currQuantity, startTime, lastupdate, lastupdatedby} rowptRow.ItemArray = columnValuesArray Me.Rows.Add(rowptRow) Return rowptRow End Function _ Public Function FindByptID(ByVal ptID As Integer) As ptRow Return CType(Me.Rows.Find(New Object() {ptID}),ptRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As ptDataTable = CType(MyBase.Clone,ptDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New ptDataTable() End Function _ Friend Sub InitVars() Me.columnptID = MyBase.Columns("ptID") Me.columnbatchNo = MyBase.Columns("batchNo") Me.columnptNo = MyBase.Columns("ptNo") Me.columnpartNo = MyBase.Columns("partNo") Me.columncurtstage = MyBase.Columns("curtstage") Me.columnstatus = MyBase.Columns("status") Me.columnptParent = MyBase.Columns("ptParent") Me.columnptStart = MyBase.Columns("ptStart") Me.columnprefix = MyBase.Columns("prefix") Me.columnsuffix = MyBase.Columns("suffix") Me.columnorigQuantity = MyBase.Columns("origQuantity") Me.columncurrQuantity = MyBase.Columns("currQuantity") Me.columnstartTime = MyBase.Columns("startTime") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnptID = New Global.System.Data.DataColumn("ptID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptID) Me.columnbatchNo = New Global.System.Data.DataColumn("batchNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatchNo) Me.columnptNo = New Global.System.Data.DataColumn("ptNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptNo) Me.columnpartNo = New Global.System.Data.DataColumn("partNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartNo) Me.columncurtstage = New Global.System.Data.DataColumn("curtstage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncurtstage) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnptParent = New Global.System.Data.DataColumn("ptParent", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptParent) Me.columnptStart = New Global.System.Data.DataColumn("ptStart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptStart) Me.columnprefix = New Global.System.Data.DataColumn("prefix", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnprefix) Me.columnsuffix = New Global.System.Data.DataColumn("suffix", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsuffix) Me.columnorigQuantity = New Global.System.Data.DataColumn("origQuantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnorigQuantity) Me.columncurrQuantity = New Global.System.Data.DataColumn("currQuantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncurrQuantity) Me.columnstartTime = New Global.System.Data.DataColumn("startTime", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstartTime) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnptID}, true)) Me.columnptID.AutoIncrement = true Me.columnptID.AutoIncrementSeed = -1 Me.columnptID.AutoIncrementStep = -1 Me.columnptID.AllowDBNull = false Me.columnptID.ReadOnly = true Me.columnptID.Unique = true Me.columnbatchNo.MaxLength = 50 Me.columnptNo.MaxLength = 50 Me.columnpartNo.MaxLength = 50 Me.columncurtstage.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnptParent.MaxLength = 50 Me.columnptStart.MaxLength = 50 Me.columnprefix.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewptRow() As ptRow Return CType(Me.NewRow,ptRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New ptRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(ptRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.ptRowChangedEvent) Is Nothing) Then RaiseEvent ptRowChanged(Me, New ptRowChangeEvent(CType(e.Row,ptRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.ptRowChangingEvent) Is Nothing) Then RaiseEvent ptRowChanging(Me, New ptRowChangeEvent(CType(e.Row,ptRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.ptRowDeletedEvent) Is Nothing) Then RaiseEvent ptRowDeleted(Me, New ptRowChangeEvent(CType(e.Row,ptRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.ptRowDeletingEvent) Is Nothing) Then RaiseEvent ptRowDeleting(Me, New ptRowChangeEvent(CType(e.Row,ptRow), e.Action)) End If End Sub _ Public Sub RemoveptRow(ByVal row As ptRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "ptDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class pt_HistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnptID As Global.System.Data.DataColumn Private columnbatchNo As Global.System.Data.DataColumn Private columnptNo As Global.System.Data.DataColumn Private columnpartNo As Global.System.Data.DataColumn Private columncurtstage As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnptParent As Global.System.Data.DataColumn Private columnptStart As Global.System.Data.DataColumn Private columnprefix As Global.System.Data.DataColumn Private columnsuffix As Global.System.Data.DataColumn Private columnorigQuantity As Global.System.Data.DataColumn Private columncurrQuantity As Global.System.Data.DataColumn Private columnstartTime As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "pt_Hist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property ptIDColumn() As Global.System.Data.DataColumn Get Return Me.columnptID End Get End Property _ Public ReadOnly Property batchNoColumn() As Global.System.Data.DataColumn Get Return Me.columnbatchNo End Get End Property _ Public ReadOnly Property ptNoColumn() As Global.System.Data.DataColumn Get Return Me.columnptNo End Get End Property _ Public ReadOnly Property partNoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartNo End Get End Property _ Public ReadOnly Property curtstageColumn() As Global.System.Data.DataColumn Get Return Me.columncurtstage End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property ptParentColumn() As Global.System.Data.DataColumn Get Return Me.columnptParent End Get End Property _ Public ReadOnly Property ptStartColumn() As Global.System.Data.DataColumn Get Return Me.columnptStart End Get End Property _ Public ReadOnly Property prefixColumn() As Global.System.Data.DataColumn Get Return Me.columnprefix End Get End Property _ Public ReadOnly Property suffixColumn() As Global.System.Data.DataColumn Get Return Me.columnsuffix End Get End Property _ Public ReadOnly Property origQuantityColumn() As Global.System.Data.DataColumn Get Return Me.columnorigQuantity End Get End Property _ Public ReadOnly Property currQuantityColumn() As Global.System.Data.DataColumn Get Return Me.columncurrQuantity End Get End Property _ Public ReadOnly Property startTimeColumn() As Global.System.Data.DataColumn Get Return Me.columnstartTime End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As pt_HistRow Get Return CType(Me.Rows(index),pt_HistRow) End Get End Property _ Public Event pt_HistRowChanging As pt_HistRowChangeEventHandler _ Public Event pt_HistRowChanged As pt_HistRowChangeEventHandler _ Public Event pt_HistRowDeleting As pt_HistRowChangeEventHandler _ Public Event pt_HistRowDeleted As pt_HistRowChangeEventHandler _ Public Overloads Sub Addpt_HistRow(ByVal row As pt_HistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addpt_HistRow(ByVal batchNo As String, ByVal ptNo As String, ByVal partNo As String, ByVal curtstage As String, ByVal status As String, ByVal ptParent As String, ByVal ptStart As String, ByVal prefix As String, ByVal suffix As Integer, ByVal origQuantity As Integer, ByVal currQuantity As Integer, ByVal startTime As Date, ByVal lastupdate As Date, ByVal lastupdatedby As String) As pt_HistRow Dim rowpt_HistRow As pt_HistRow = CType(Me.NewRow,pt_HistRow) Dim columnValuesArray() As Object = New Object() {Nothing, batchNo, ptNo, partNo, curtstage, status, ptParent, ptStart, prefix, suffix, origQuantity, currQuantity, startTime, lastupdate, lastupdatedby} rowpt_HistRow.ItemArray = columnValuesArray Me.Rows.Add(rowpt_HistRow) Return rowpt_HistRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As pt_HistDataTable = CType(MyBase.Clone,pt_HistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New pt_HistDataTable() End Function _ Friend Sub InitVars() Me.columnptID = MyBase.Columns("ptID") Me.columnbatchNo = MyBase.Columns("batchNo") Me.columnptNo = MyBase.Columns("ptNo") Me.columnpartNo = MyBase.Columns("partNo") Me.columncurtstage = MyBase.Columns("curtstage") Me.columnstatus = MyBase.Columns("status") Me.columnptParent = MyBase.Columns("ptParent") Me.columnptStart = MyBase.Columns("ptStart") Me.columnprefix = MyBase.Columns("prefix") Me.columnsuffix = MyBase.Columns("suffix") Me.columnorigQuantity = MyBase.Columns("origQuantity") Me.columncurrQuantity = MyBase.Columns("currQuantity") Me.columnstartTime = MyBase.Columns("startTime") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnptID = New Global.System.Data.DataColumn("ptID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptID) Me.columnbatchNo = New Global.System.Data.DataColumn("batchNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnbatchNo) Me.columnptNo = New Global.System.Data.DataColumn("ptNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptNo) Me.columnpartNo = New Global.System.Data.DataColumn("partNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartNo) Me.columncurtstage = New Global.System.Data.DataColumn("curtstage", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncurtstage) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnptParent = New Global.System.Data.DataColumn("ptParent", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptParent) Me.columnptStart = New Global.System.Data.DataColumn("ptStart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnptStart) Me.columnprefix = New Global.System.Data.DataColumn("prefix", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnprefix) Me.columnsuffix = New Global.System.Data.DataColumn("suffix", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsuffix) Me.columnorigQuantity = New Global.System.Data.DataColumn("origQuantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnorigQuantity) Me.columncurrQuantity = New Global.System.Data.DataColumn("currQuantity", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncurrQuantity) Me.columnstartTime = New Global.System.Data.DataColumn("startTime", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstartTime) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.columnptID.AutoIncrement = true Me.columnptID.AutoIncrementSeed = -1 Me.columnptID.AutoIncrementStep = -1 Me.columnptID.AllowDBNull = false Me.columnptID.ReadOnly = true Me.columnbatchNo.MaxLength = 50 Me.columnptNo.MaxLength = 50 Me.columnpartNo.MaxLength = 50 Me.columncurtstage.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnptParent.MaxLength = 50 Me.columnptStart.MaxLength = 50 Me.columnprefix.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function Newpt_HistRow() As pt_HistRow Return CType(Me.NewRow,pt_HistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New pt_HistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(pt_HistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.pt_HistRowChangedEvent) Is Nothing) Then RaiseEvent pt_HistRowChanged(Me, New pt_HistRowChangeEvent(CType(e.Row,pt_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.pt_HistRowChangingEvent) Is Nothing) Then RaiseEvent pt_HistRowChanging(Me, New pt_HistRowChangeEvent(CType(e.Row,pt_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.pt_HistRowDeletedEvent) Is Nothing) Then RaiseEvent pt_HistRowDeleted(Me, New pt_HistRowChangeEvent(CType(e.Row,pt_HistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.pt_HistRowDeletingEvent) Is Nothing) Then RaiseEvent pt_HistRowDeleting(Me, New pt_HistRowChangeEvent(CType(e.Row,pt_HistRow), e.Action)) End If End Sub _ Public Sub Removept_HistRow(ByVal row As pt_HistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "pt_HistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class serialAlvarisetDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncardno As Global.System.Data.DataColumn Private columnmpPartno As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "serialAlvariset" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property mpPartnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmpPartno End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As serialAlvarisetRow Get Return CType(Me.Rows(index),serialAlvarisetRow) End Get End Property _ Public Event serialAlvarisetRowChanging As serialAlvarisetRowChangeEventHandler _ Public Event serialAlvarisetRowChanged As serialAlvarisetRowChangeEventHandler _ Public Event serialAlvarisetRowDeleting As serialAlvarisetRowChangeEventHandler _ Public Event serialAlvarisetRowDeleted As serialAlvarisetRowChangeEventHandler _ Public Overloads Sub AddserialAlvarisetRow(ByVal row As serialAlvarisetRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddserialAlvarisetRow(ByVal cardno As String, ByVal mpPartno As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As serialAlvarisetRow Dim rowserialAlvarisetRow As serialAlvarisetRow = CType(Me.NewRow,serialAlvarisetRow) Dim columnValuesArray() As Object = New Object() {cardno, mpPartno, lastupdate, lastupdatedby} rowserialAlvarisetRow.ItemArray = columnValuesArray Me.Rows.Add(rowserialAlvarisetRow) Return rowserialAlvarisetRow End Function _ Public Function FindBycardno(ByVal cardno As String) As serialAlvarisetRow Return CType(Me.Rows.Find(New Object() {cardno}),serialAlvarisetRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As serialAlvarisetDataTable = CType(MyBase.Clone,serialAlvarisetDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New serialAlvarisetDataTable() End Function _ Friend Sub InitVars() Me.columncardno = MyBase.Columns("cardno") Me.columnmpPartno = MyBase.Columns("mpPartno") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnmpPartno = New Global.System.Data.DataColumn("mpPartno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmpPartno) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columncardno}, true)) Me.columncardno.AllowDBNull = false Me.columncardno.Unique = true Me.columncardno.MaxLength = 50 Me.columnmpPartno.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewserialAlvarisetRow() As serialAlvarisetRow Return CType(Me.NewRow,serialAlvarisetRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New serialAlvarisetRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(serialAlvarisetRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.serialAlvarisetRowChangedEvent) Is Nothing) Then RaiseEvent serialAlvarisetRowChanged(Me, New serialAlvarisetRowChangeEvent(CType(e.Row,serialAlvarisetRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.serialAlvarisetRowChangingEvent) Is Nothing) Then RaiseEvent serialAlvarisetRowChanging(Me, New serialAlvarisetRowChangeEvent(CType(e.Row,serialAlvarisetRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.serialAlvarisetRowDeletedEvent) Is Nothing) Then RaiseEvent serialAlvarisetRowDeleted(Me, New serialAlvarisetRowChangeEvent(CType(e.Row,serialAlvarisetRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.serialAlvarisetRowDeletingEvent) Is Nothing) Then RaiseEvent serialAlvarisetRowDeleting(Me, New serialAlvarisetRowChangeEvent(CType(e.Row,serialAlvarisetRow), e.Action)) End If End Sub _ Public Sub RemoveserialAlvarisetRow(ByVal row As serialAlvarisetRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "serialAlvarisetDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class serialMacDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncardno As Global.System.Data.DataColumn Private columnmacaddress As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "serialMac" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cardnoColumn() As Global.System.Data.DataColumn Get Return Me.columncardno End Get End Property _ Public ReadOnly Property macaddressColumn() As Global.System.Data.DataColumn Get Return Me.columnmacaddress End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As serialMacRow Get Return CType(Me.Rows(index),serialMacRow) End Get End Property _ Public Event serialMacRowChanging As serialMacRowChangeEventHandler _ Public Event serialMacRowChanged As serialMacRowChangeEventHandler _ Public Event serialMacRowDeleting As serialMacRowChangeEventHandler _ Public Event serialMacRowDeleted As serialMacRowChangeEventHandler _ Public Overloads Sub AddserialMacRow(ByVal row As serialMacRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddserialMacRow(ByVal cardno As String, ByVal macaddress As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As serialMacRow Dim rowserialMacRow As serialMacRow = CType(Me.NewRow,serialMacRow) Dim columnValuesArray() As Object = New Object() {cardno, macaddress, lastupdate, lastupdatedby} rowserialMacRow.ItemArray = columnValuesArray Me.Rows.Add(rowserialMacRow) Return rowserialMacRow End Function _ Public Function FindBycardno(ByVal cardno As String) As serialMacRow Return CType(Me.Rows.Find(New Object() {cardno}),serialMacRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As serialMacDataTable = CType(MyBase.Clone,serialMacDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New serialMacDataTable() End Function _ Friend Sub InitVars() Me.columncardno = MyBase.Columns("cardno") Me.columnmacaddress = MyBase.Columns("macaddress") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columncardno = New Global.System.Data.DataColumn("cardno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncardno) Me.columnmacaddress = New Global.System.Data.DataColumn("macaddress", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmacaddress) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columncardno}, true)) Me.columncardno.AllowDBNull = false Me.columncardno.Unique = true Me.columncardno.MaxLength = 50 Me.columnmacaddress.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewserialMacRow() As serialMacRow Return CType(Me.NewRow,serialMacRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New serialMacRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(serialMacRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.serialMacRowChangedEvent) Is Nothing) Then RaiseEvent serialMacRowChanged(Me, New serialMacRowChangeEvent(CType(e.Row,serialMacRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.serialMacRowChangingEvent) Is Nothing) Then RaiseEvent serialMacRowChanging(Me, New serialMacRowChangeEvent(CType(e.Row,serialMacRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.serialMacRowDeletedEvent) Is Nothing) Then RaiseEvent serialMacRowDeleted(Me, New serialMacRowChangeEvent(CType(e.Row,serialMacRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.serialMacRowDeletingEvent) Is Nothing) Then RaiseEvent serialMacRowDeleting(Me, New serialMacRowChangeEvent(CType(e.Row,serialMacRow), e.Action)) End If End Sub _ Public Sub RemoveserialMacRow(ByVal row As serialMacRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "serialMacDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class SHIPPER_REPORT_TABLEDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncnNo As Global.System.Data.DataColumn Private columnshipno As Global.System.Data.DataColumn Private columnshipDate As Global.System.Data.DataColumn Private columnshipto As Global.System.Data.DataColumn Private columnsipAdd1 As Global.System.Data.DataColumn Private columnshipAdd2 As Global.System.Data.DataColumn Private columnshipAdd3 As Global.System.Data.DataColumn Private columnZIP As Global.System.Data.DataColumn Private columncountryCode As Global.System.Data.DataColumn Private columnPhone As Global.System.Data.DataColumn Private columnshipVia As Global.System.Data.DataColumn Private columnPOLine As Global.System.Data.DataColumn Private columnmodelDesc1 As Global.System.Data.DataColumn Private columnCustPO As Global.System.Data.DataColumn Private columnAlvSO As Global.System.Data.DataColumn Private columnAlvSOLine As Global.System.Data.DataColumn Private columnFlag3 As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columncustPart As Global.System.Data.DataColumn Private columnSNQty As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnlayer As Global.System.Data.DataColumn Private columndimension As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "SHIPPER_REPORT_TABLE" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cnNoColumn() As Global.System.Data.DataColumn Get Return Me.columncnNo End Get End Property _ Public ReadOnly Property shipnoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipno End Get End Property _ Public ReadOnly Property shipDateColumn() As Global.System.Data.DataColumn Get Return Me.columnshipDate End Get End Property _ Public ReadOnly Property shiptoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipto End Get End Property _ Public ReadOnly Property sipAdd1Column() As Global.System.Data.DataColumn Get Return Me.columnsipAdd1 End Get End Property _ Public ReadOnly Property shipAdd2Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd2 End Get End Property _ Public ReadOnly Property shipAdd3Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd3 End Get End Property _ Public ReadOnly Property ZIPColumn() As Global.System.Data.DataColumn Get Return Me.columnZIP End Get End Property _ Public ReadOnly Property countryCodeColumn() As Global.System.Data.DataColumn Get Return Me.columncountryCode End Get End Property _ Public ReadOnly Property PhoneColumn() As Global.System.Data.DataColumn Get Return Me.columnPhone End Get End Property _ Public ReadOnly Property shipViaColumn() As Global.System.Data.DataColumn Get Return Me.columnshipVia End Get End Property _ Public ReadOnly Property POLineColumn() As Global.System.Data.DataColumn Get Return Me.columnPOLine End Get End Property _ Public ReadOnly Property modelDesc1Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc1 End Get End Property _ Public ReadOnly Property CustPOColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPO End Get End Property _ Public ReadOnly Property AlvSOColumn() As Global.System.Data.DataColumn Get Return Me.columnAlvSO End Get End Property _ Public ReadOnly Property AlvSOLineColumn() As Global.System.Data.DataColumn Get Return Me.columnAlvSOLine End Get End Property _ Public ReadOnly Property Flag3Column() As Global.System.Data.DataColumn Get Return Me.columnFlag3 End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property custPartColumn() As Global.System.Data.DataColumn Get Return Me.columncustPart End Get End Property _ Public ReadOnly Property SNQtyColumn() As Global.System.Data.DataColumn Get Return Me.columnSNQty End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property layerColumn() As Global.System.Data.DataColumn Get Return Me.columnlayer End Get End Property _ Public ReadOnly Property dimensionColumn() As Global.System.Data.DataColumn Get Return Me.columndimension End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As SHIPPER_REPORT_TABLERow Get Return CType(Me.Rows(index),SHIPPER_REPORT_TABLERow) End Get End Property _ Public Event SHIPPER_REPORT_TABLERowChanging As SHIPPER_REPORT_TABLERowChangeEventHandler _ Public Event SHIPPER_REPORT_TABLERowChanged As SHIPPER_REPORT_TABLERowChangeEventHandler _ Public Event SHIPPER_REPORT_TABLERowDeleting As SHIPPER_REPORT_TABLERowChangeEventHandler _ Public Event SHIPPER_REPORT_TABLERowDeleted As SHIPPER_REPORT_TABLERowChangeEventHandler _ Public Overloads Sub AddSHIPPER_REPORT_TABLERow(ByVal row As SHIPPER_REPORT_TABLERow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddSHIPPER_REPORT_TABLERow( _ ByVal cnNo As String, _ ByVal shipno As String, _ ByVal shipDate As Date, _ ByVal shipto As String, _ ByVal sipAdd1 As String, _ ByVal shipAdd2 As String, _ ByVal shipAdd3 As String, _ ByVal ZIP As String, _ ByVal countryCode As String, _ ByVal Phone As String, _ ByVal shipVia As String, _ ByVal POLine As String, _ ByVal modelDesc1 As String, _ ByVal CustPO As String, _ ByVal AlvSO As String, _ ByVal AlvSOLine As Decimal, _ ByVal Flag3 As String, _ ByVal model As String, _ ByVal custPart As String, _ ByVal SNQty As Integer, _ ByVal serialno As String, _ ByVal layer As Single, _ ByVal dimension As String) As SHIPPER_REPORT_TABLERow Dim rowSHIPPER_REPORT_TABLERow As SHIPPER_REPORT_TABLERow = CType(Me.NewRow,SHIPPER_REPORT_TABLERow) Dim columnValuesArray() As Object = New Object() {cnNo, shipno, shipDate, shipto, sipAdd1, shipAdd2, shipAdd3, ZIP, countryCode, Phone, shipVia, POLine, modelDesc1, CustPO, AlvSO, AlvSOLine, Flag3, model, custPart, SNQty, serialno, layer, dimension} rowSHIPPER_REPORT_TABLERow.ItemArray = columnValuesArray Me.Rows.Add(rowSHIPPER_REPORT_TABLERow) Return rowSHIPPER_REPORT_TABLERow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As SHIPPER_REPORT_TABLEDataTable = CType(MyBase.Clone,SHIPPER_REPORT_TABLEDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New SHIPPER_REPORT_TABLEDataTable() End Function _ Friend Sub InitVars() Me.columncnNo = MyBase.Columns("cnNo") Me.columnshipno = MyBase.Columns("shipno") Me.columnshipDate = MyBase.Columns("shipDate") Me.columnshipto = MyBase.Columns("shipto") Me.columnsipAdd1 = MyBase.Columns("sipAdd1") Me.columnshipAdd2 = MyBase.Columns("shipAdd2") Me.columnshipAdd3 = MyBase.Columns("shipAdd3") Me.columnZIP = MyBase.Columns("ZIP") Me.columncountryCode = MyBase.Columns("countryCode") Me.columnPhone = MyBase.Columns("Phone") Me.columnshipVia = MyBase.Columns("shipVia") Me.columnPOLine = MyBase.Columns("POLine") Me.columnmodelDesc1 = MyBase.Columns("modelDesc1") Me.columnCustPO = MyBase.Columns("CustPO") Me.columnAlvSO = MyBase.Columns("AlvSO") Me.columnAlvSOLine = MyBase.Columns("AlvSOLine") Me.columnFlag3 = MyBase.Columns("Flag3") Me.columnmodel = MyBase.Columns("model") Me.columncustPart = MyBase.Columns("custPart") Me.columnSNQty = MyBase.Columns("SNQty") Me.columnserialno = MyBase.Columns("serialno") Me.columnlayer = MyBase.Columns("layer") Me.columndimension = MyBase.Columns("dimension") End Sub _ Private Sub InitClass() Me.columncnNo = New Global.System.Data.DataColumn("cnNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncnNo) Me.columnshipno = New Global.System.Data.DataColumn("shipno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipno) Me.columnshipDate = New Global.System.Data.DataColumn("shipDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipDate) Me.columnshipto = New Global.System.Data.DataColumn("shipto", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipto) Me.columnsipAdd1 = New Global.System.Data.DataColumn("sipAdd1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsipAdd1) Me.columnshipAdd2 = New Global.System.Data.DataColumn("shipAdd2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd2) Me.columnshipAdd3 = New Global.System.Data.DataColumn("shipAdd3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd3) Me.columnZIP = New Global.System.Data.DataColumn("ZIP", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnZIP) Me.columncountryCode = New Global.System.Data.DataColumn("countryCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncountryCode) Me.columnPhone = New Global.System.Data.DataColumn("Phone", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPhone) Me.columnshipVia = New Global.System.Data.DataColumn("shipVia", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipVia) Me.columnPOLine = New Global.System.Data.DataColumn("POLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPOLine) Me.columnmodelDesc1 = New Global.System.Data.DataColumn("modelDesc1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc1) Me.columnCustPO = New Global.System.Data.DataColumn("CustPO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPO) Me.columnAlvSO = New Global.System.Data.DataColumn("AlvSO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAlvSO) Me.columnAlvSOLine = New Global.System.Data.DataColumn("AlvSOLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAlvSOLine) Me.columnFlag3 = New Global.System.Data.DataColumn("Flag3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag3) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columncustPart = New Global.System.Data.DataColumn("custPart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncustPart) Me.columnSNQty = New Global.System.Data.DataColumn("SNQty", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSNQty) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnlayer = New Global.System.Data.DataColumn("layer", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayer) Me.columndimension = New Global.System.Data.DataColumn("dimension", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimension) Me.columncnNo.MaxLength = 50 Me.columnshipno.AllowDBNull = false Me.columnshipno.MaxLength = 50 Me.columnshipto.MaxLength = 28 Me.columnsipAdd1.MaxLength = 28 Me.columnshipAdd2.MaxLength = 28 Me.columnshipAdd3.MaxLength = 28 Me.columnZIP.MaxLength = 41 Me.columncountryCode.MaxLength = 28 Me.columnPhone.MaxLength = 27 Me.columnshipVia.MaxLength = 20 Me.columnPOLine.MaxLength = 24 Me.columnmodelDesc1.MaxLength = 200 Me.columnCustPO.MaxLength = 8 Me.columnAlvSO.MaxLength = 10 Me.columnFlag3.MaxLength = 1 Me.columnmodel.MaxLength = 50 Me.columncustPart.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columndimension.MaxLength = 50 End Sub _ Public Function NewSHIPPER_REPORT_TABLERow() As SHIPPER_REPORT_TABLERow Return CType(Me.NewRow,SHIPPER_REPORT_TABLERow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New SHIPPER_REPORT_TABLERow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(SHIPPER_REPORT_TABLERow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.SHIPPER_REPORT_TABLERowChangedEvent) Is Nothing) Then RaiseEvent SHIPPER_REPORT_TABLERowChanged(Me, New SHIPPER_REPORT_TABLERowChangeEvent(CType(e.Row,SHIPPER_REPORT_TABLERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.SHIPPER_REPORT_TABLERowChangingEvent) Is Nothing) Then RaiseEvent SHIPPER_REPORT_TABLERowChanging(Me, New SHIPPER_REPORT_TABLERowChangeEvent(CType(e.Row,SHIPPER_REPORT_TABLERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.SHIPPER_REPORT_TABLERowDeletedEvent) Is Nothing) Then RaiseEvent SHIPPER_REPORT_TABLERowDeleted(Me, New SHIPPER_REPORT_TABLERowChangeEvent(CType(e.Row,SHIPPER_REPORT_TABLERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.SHIPPER_REPORT_TABLERowDeletingEvent) Is Nothing) Then RaiseEvent SHIPPER_REPORT_TABLERowDeleting(Me, New SHIPPER_REPORT_TABLERowChangeEvent(CType(e.Row,SHIPPER_REPORT_TABLERow), e.Action)) End If End Sub _ Public Sub RemoveSHIPPER_REPORT_TABLERow(ByVal row As SHIPPER_REPORT_TABLERow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "SHIPPER_REPORT_TABLEDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class SHIPPER_STATUSDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnShipno As Global.System.Data.DataColumn Private columnProcess As Global.System.Data.DataColumn Private columnResult As Global.System.Data.DataColumn Private columnRemarks As Global.System.Data.DataColumn Private columnUPDTime As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "SHIPPER_STATUS" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property ShipnoColumn() As Global.System.Data.DataColumn Get Return Me.columnShipno End Get End Property _ Public ReadOnly Property ProcessColumn() As Global.System.Data.DataColumn Get Return Me.columnProcess End Get End Property _ Public ReadOnly Property ResultColumn() As Global.System.Data.DataColumn Get Return Me.columnResult End Get End Property _ Public ReadOnly Property RemarksColumn() As Global.System.Data.DataColumn Get Return Me.columnRemarks End Get End Property _ Public ReadOnly Property UPDTimeColumn() As Global.System.Data.DataColumn Get Return Me.columnUPDTime End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As SHIPPER_STATUSRow Get Return CType(Me.Rows(index),SHIPPER_STATUSRow) End Get End Property _ Public Event SHIPPER_STATUSRowChanging As SHIPPER_STATUSRowChangeEventHandler _ Public Event SHIPPER_STATUSRowChanged As SHIPPER_STATUSRowChangeEventHandler _ Public Event SHIPPER_STATUSRowDeleting As SHIPPER_STATUSRowChangeEventHandler _ Public Event SHIPPER_STATUSRowDeleted As SHIPPER_STATUSRowChangeEventHandler _ Public Overloads Sub AddSHIPPER_STATUSRow(ByVal row As SHIPPER_STATUSRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddSHIPPER_STATUSRow(ByVal Shipno As String, ByVal Process As String, ByVal Result As String, ByVal Remarks As String, ByVal UPDTime As Date) As SHIPPER_STATUSRow Dim rowSHIPPER_STATUSRow As SHIPPER_STATUSRow = CType(Me.NewRow,SHIPPER_STATUSRow) Dim columnValuesArray() As Object = New Object() {Shipno, Process, Result, Remarks, UPDTime} rowSHIPPER_STATUSRow.ItemArray = columnValuesArray Me.Rows.Add(rowSHIPPER_STATUSRow) Return rowSHIPPER_STATUSRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As SHIPPER_STATUSDataTable = CType(MyBase.Clone,SHIPPER_STATUSDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New SHIPPER_STATUSDataTable() End Function _ Friend Sub InitVars() Me.columnShipno = MyBase.Columns("Shipno") Me.columnProcess = MyBase.Columns("Process") Me.columnResult = MyBase.Columns("Result") Me.columnRemarks = MyBase.Columns("Remarks") Me.columnUPDTime = MyBase.Columns("UPDTime") End Sub _ Private Sub InitClass() Me.columnShipno = New Global.System.Data.DataColumn("Shipno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnShipno) Me.columnProcess = New Global.System.Data.DataColumn("Process", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnProcess) Me.columnResult = New Global.System.Data.DataColumn("Result", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnResult) Me.columnRemarks = New Global.System.Data.DataColumn("Remarks", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnRemarks) Me.columnUPDTime = New Global.System.Data.DataColumn("UPDTime", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnUPDTime) Me.columnShipno.MaxLength = 8 Me.columnProcess.MaxLength = 4 Me.columnResult.MaxLength = 30 Me.columnRemarks.MaxLength = 500 End Sub _ Public Function NewSHIPPER_STATUSRow() As SHIPPER_STATUSRow Return CType(Me.NewRow,SHIPPER_STATUSRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New SHIPPER_STATUSRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(SHIPPER_STATUSRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.SHIPPER_STATUSRowChangedEvent) Is Nothing) Then RaiseEvent SHIPPER_STATUSRowChanged(Me, New SHIPPER_STATUSRowChangeEvent(CType(e.Row,SHIPPER_STATUSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.SHIPPER_STATUSRowChangingEvent) Is Nothing) Then RaiseEvent SHIPPER_STATUSRowChanging(Me, New SHIPPER_STATUSRowChangeEvent(CType(e.Row,SHIPPER_STATUSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.SHIPPER_STATUSRowDeletedEvent) Is Nothing) Then RaiseEvent SHIPPER_STATUSRowDeleted(Me, New SHIPPER_STATUSRowChangeEvent(CType(e.Row,SHIPPER_STATUSRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.SHIPPER_STATUSRowDeletingEvent) Is Nothing) Then RaiseEvent SHIPPER_STATUSRowDeleting(Me, New SHIPPER_STATUSRowChangeEvent(CType(e.Row,SHIPPER_STATUSRow), e.Action)) End If End Sub _ Public Sub RemoveSHIPPER_STATUSRow(ByVal row As SHIPPER_STATUSRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "SHIPPER_STATUSDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class SHIPPER_SUMMARY_TABLEDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columncnNo As Global.System.Data.DataColumn Private columnshipno As Global.System.Data.DataColumn Private columnshipDate As Global.System.Data.DataColumn Private columnshipto As Global.System.Data.DataColumn Private columnsipAdd1 As Global.System.Data.DataColumn Private columnshipAdd2 As Global.System.Data.DataColumn Private columnshipAdd3 As Global.System.Data.DataColumn Private columnZIP As Global.System.Data.DataColumn Private columncountryCode As Global.System.Data.DataColumn Private columnPhone As Global.System.Data.DataColumn Private columnshipVia As Global.System.Data.DataColumn Private columnPOLine As Global.System.Data.DataColumn Private columnmodelDesc1 As Global.System.Data.DataColumn Private columnCustPO As Global.System.Data.DataColumn Private columnAlvSO As Global.System.Data.DataColumn Private columnAlvSOLine As Global.System.Data.DataColumn Private columnFlag3 As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnCustPart As Global.System.Data.DataColumn Private columnSNQty As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnlayer As Global.System.Data.DataColumn Private columndimension As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "SHIPPER_SUMMARY_TABLE" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property cnNoColumn() As Global.System.Data.DataColumn Get Return Me.columncnNo End Get End Property _ Public ReadOnly Property shipnoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipno End Get End Property _ Public ReadOnly Property shipDateColumn() As Global.System.Data.DataColumn Get Return Me.columnshipDate End Get End Property _ Public ReadOnly Property shiptoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipto End Get End Property _ Public ReadOnly Property sipAdd1Column() As Global.System.Data.DataColumn Get Return Me.columnsipAdd1 End Get End Property _ Public ReadOnly Property shipAdd2Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd2 End Get End Property _ Public ReadOnly Property shipAdd3Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd3 End Get End Property _ Public ReadOnly Property ZIPColumn() As Global.System.Data.DataColumn Get Return Me.columnZIP End Get End Property _ Public ReadOnly Property countryCodeColumn() As Global.System.Data.DataColumn Get Return Me.columncountryCode End Get End Property _ Public ReadOnly Property PhoneColumn() As Global.System.Data.DataColumn Get Return Me.columnPhone End Get End Property _ Public ReadOnly Property shipViaColumn() As Global.System.Data.DataColumn Get Return Me.columnshipVia End Get End Property _ Public ReadOnly Property POLineColumn() As Global.System.Data.DataColumn Get Return Me.columnPOLine End Get End Property _ Public ReadOnly Property modelDesc1Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc1 End Get End Property _ Public ReadOnly Property CustPOColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPO End Get End Property _ Public ReadOnly Property AlvSOColumn() As Global.System.Data.DataColumn Get Return Me.columnAlvSO End Get End Property _ Public ReadOnly Property AlvSOLineColumn() As Global.System.Data.DataColumn Get Return Me.columnAlvSOLine End Get End Property _ Public ReadOnly Property Flag3Column() As Global.System.Data.DataColumn Get Return Me.columnFlag3 End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property CustPartColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPart End Get End Property _ Public ReadOnly Property SNQtyColumn() As Global.System.Data.DataColumn Get Return Me.columnSNQty End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property layerColumn() As Global.System.Data.DataColumn Get Return Me.columnlayer End Get End Property _ Public ReadOnly Property dimensionColumn() As Global.System.Data.DataColumn Get Return Me.columndimension End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As SHIPPER_SUMMARY_TABLERow Get Return CType(Me.Rows(index),SHIPPER_SUMMARY_TABLERow) End Get End Property _ Public Event SHIPPER_SUMMARY_TABLERowChanging As SHIPPER_SUMMARY_TABLERowChangeEventHandler _ Public Event SHIPPER_SUMMARY_TABLERowChanged As SHIPPER_SUMMARY_TABLERowChangeEventHandler _ Public Event SHIPPER_SUMMARY_TABLERowDeleting As SHIPPER_SUMMARY_TABLERowChangeEventHandler _ Public Event SHIPPER_SUMMARY_TABLERowDeleted As SHIPPER_SUMMARY_TABLERowChangeEventHandler _ Public Overloads Sub AddSHIPPER_SUMMARY_TABLERow(ByVal row As SHIPPER_SUMMARY_TABLERow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddSHIPPER_SUMMARY_TABLERow( _ ByVal cnNo As String, _ ByVal shipno As String, _ ByVal shipDate As Date, _ ByVal shipto As String, _ ByVal sipAdd1 As String, _ ByVal shipAdd2 As String, _ ByVal shipAdd3 As String, _ ByVal ZIP As String, _ ByVal countryCode As String, _ ByVal Phone As String, _ ByVal shipVia As String, _ ByVal POLine As String, _ ByVal modelDesc1 As String, _ ByVal CustPO As String, _ ByVal AlvSO As String, _ ByVal AlvSOLine As Decimal, _ ByVal Flag3 As String, _ ByVal model As String, _ ByVal CustPart As String, _ ByVal SNQty As Integer, _ ByVal serialno As String, _ ByVal layer As Single, _ ByVal dimension As String) As SHIPPER_SUMMARY_TABLERow Dim rowSHIPPER_SUMMARY_TABLERow As SHIPPER_SUMMARY_TABLERow = CType(Me.NewRow,SHIPPER_SUMMARY_TABLERow) Dim columnValuesArray() As Object = New Object() {cnNo, shipno, shipDate, shipto, sipAdd1, shipAdd2, shipAdd3, ZIP, countryCode, Phone, shipVia, POLine, modelDesc1, CustPO, AlvSO, AlvSOLine, Flag3, model, CustPart, SNQty, serialno, layer, dimension} rowSHIPPER_SUMMARY_TABLERow.ItemArray = columnValuesArray Me.Rows.Add(rowSHIPPER_SUMMARY_TABLERow) Return rowSHIPPER_SUMMARY_TABLERow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As SHIPPER_SUMMARY_TABLEDataTable = CType(MyBase.Clone,SHIPPER_SUMMARY_TABLEDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New SHIPPER_SUMMARY_TABLEDataTable() End Function _ Friend Sub InitVars() Me.columncnNo = MyBase.Columns("cnNo") Me.columnshipno = MyBase.Columns("shipno") Me.columnshipDate = MyBase.Columns("shipDate") Me.columnshipto = MyBase.Columns("shipto") Me.columnsipAdd1 = MyBase.Columns("sipAdd1") Me.columnshipAdd2 = MyBase.Columns("shipAdd2") Me.columnshipAdd3 = MyBase.Columns("shipAdd3") Me.columnZIP = MyBase.Columns("ZIP") Me.columncountryCode = MyBase.Columns("countryCode") Me.columnPhone = MyBase.Columns("Phone") Me.columnshipVia = MyBase.Columns("shipVia") Me.columnPOLine = MyBase.Columns("POLine") Me.columnmodelDesc1 = MyBase.Columns("modelDesc1") Me.columnCustPO = MyBase.Columns("CustPO") Me.columnAlvSO = MyBase.Columns("AlvSO") Me.columnAlvSOLine = MyBase.Columns("AlvSOLine") Me.columnFlag3 = MyBase.Columns("Flag3") Me.columnmodel = MyBase.Columns("model") Me.columnCustPart = MyBase.Columns("CustPart") Me.columnSNQty = MyBase.Columns("SNQty") Me.columnserialno = MyBase.Columns("serialno") Me.columnlayer = MyBase.Columns("layer") Me.columndimension = MyBase.Columns("dimension") End Sub _ Private Sub InitClass() Me.columncnNo = New Global.System.Data.DataColumn("cnNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncnNo) Me.columnshipno = New Global.System.Data.DataColumn("shipno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipno) Me.columnshipDate = New Global.System.Data.DataColumn("shipDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipDate) Me.columnshipto = New Global.System.Data.DataColumn("shipto", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipto) Me.columnsipAdd1 = New Global.System.Data.DataColumn("sipAdd1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsipAdd1) Me.columnshipAdd2 = New Global.System.Data.DataColumn("shipAdd2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd2) Me.columnshipAdd3 = New Global.System.Data.DataColumn("shipAdd3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd3) Me.columnZIP = New Global.System.Data.DataColumn("ZIP", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnZIP) Me.columncountryCode = New Global.System.Data.DataColumn("countryCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncountryCode) Me.columnPhone = New Global.System.Data.DataColumn("Phone", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPhone) Me.columnshipVia = New Global.System.Data.DataColumn("shipVia", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipVia) Me.columnPOLine = New Global.System.Data.DataColumn("POLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPOLine) Me.columnmodelDesc1 = New Global.System.Data.DataColumn("modelDesc1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc1) Me.columnCustPO = New Global.System.Data.DataColumn("CustPO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPO) Me.columnAlvSO = New Global.System.Data.DataColumn("AlvSO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAlvSO) Me.columnAlvSOLine = New Global.System.Data.DataColumn("AlvSOLine", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnAlvSOLine) Me.columnFlag3 = New Global.System.Data.DataColumn("Flag3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag3) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnCustPart = New Global.System.Data.DataColumn("CustPart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPart) Me.columnSNQty = New Global.System.Data.DataColumn("SNQty", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnSNQty) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnlayer = New Global.System.Data.DataColumn("layer", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayer) Me.columndimension = New Global.System.Data.DataColumn("dimension", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimension) Me.columncnNo.MaxLength = 50 Me.columnshipno.AllowDBNull = false Me.columnshipno.MaxLength = 50 Me.columnshipto.MaxLength = 28 Me.columnsipAdd1.MaxLength = 28 Me.columnshipAdd2.MaxLength = 28 Me.columnshipAdd3.MaxLength = 28 Me.columnZIP.MaxLength = 41 Me.columncountryCode.MaxLength = 28 Me.columnPhone.MaxLength = 27 Me.columnshipVia.MaxLength = 20 Me.columnPOLine.MaxLength = 24 Me.columnmodelDesc1.MaxLength = 200 Me.columnCustPO.MaxLength = 8 Me.columnAlvSO.MaxLength = 10 Me.columnFlag3.MaxLength = 1 Me.columnmodel.MaxLength = 50 Me.columnCustPart.MaxLength = 40 Me.columnserialno.MaxLength = 50 Me.columndimension.MaxLength = 50 End Sub _ Public Function NewSHIPPER_SUMMARY_TABLERow() As SHIPPER_SUMMARY_TABLERow Return CType(Me.NewRow,SHIPPER_SUMMARY_TABLERow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New SHIPPER_SUMMARY_TABLERow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(SHIPPER_SUMMARY_TABLERow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.SHIPPER_SUMMARY_TABLERowChangedEvent) Is Nothing) Then RaiseEvent SHIPPER_SUMMARY_TABLERowChanged(Me, New SHIPPER_SUMMARY_TABLERowChangeEvent(CType(e.Row,SHIPPER_SUMMARY_TABLERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.SHIPPER_SUMMARY_TABLERowChangingEvent) Is Nothing) Then RaiseEvent SHIPPER_SUMMARY_TABLERowChanging(Me, New SHIPPER_SUMMARY_TABLERowChangeEvent(CType(e.Row,SHIPPER_SUMMARY_TABLERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.SHIPPER_SUMMARY_TABLERowDeletedEvent) Is Nothing) Then RaiseEvent SHIPPER_SUMMARY_TABLERowDeleted(Me, New SHIPPER_SUMMARY_TABLERowChangeEvent(CType(e.Row,SHIPPER_SUMMARY_TABLERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.SHIPPER_SUMMARY_TABLERowDeletingEvent) Is Nothing) Then RaiseEvent SHIPPER_SUMMARY_TABLERowDeleting(Me, New SHIPPER_SUMMARY_TABLERowChangeEvent(CType(e.Row,SHIPPER_SUMMARY_TABLERow), e.Action)) End If End Sub _ Public Sub RemoveSHIPPER_SUMMARY_TABLERow(ByVal row As SHIPPER_SUMMARY_TABLERow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "SHIPPER_SUMMARY_TABLEDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class stationDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnstation As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnsequence As Global.System.Data.DataColumn Private columnstype As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "station" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property stationColumn() As Global.System.Data.DataColumn Get Return Me.columnstation End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property sequenceColumn() As Global.System.Data.DataColumn Get Return Me.columnsequence End Get End Property _ Public ReadOnly Property stypeColumn() As Global.System.Data.DataColumn Get Return Me.columnstype End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As stationRow Get Return CType(Me.Rows(index),stationRow) End Get End Property _ Public Event stationRowChanging As stationRowChangeEventHandler _ Public Event stationRowChanged As stationRowChangeEventHandler _ Public Event stationRowDeleting As stationRowChangeEventHandler _ Public Event stationRowDeleted As stationRowChangeEventHandler _ Public Overloads Sub AddstationRow(ByVal row As stationRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddstationRow(ByVal station As String, ByVal description As String, ByVal sequence As Integer, ByVal stype As String, ByVal active As Integer, ByVal lastupdate As Date, ByVal lastupdatedby As String) As stationRow Dim rowstationRow As stationRow = CType(Me.NewRow,stationRow) Dim columnValuesArray() As Object = New Object() {station, description, sequence, stype, active, lastupdate, lastupdatedby} rowstationRow.ItemArray = columnValuesArray Me.Rows.Add(rowstationRow) Return rowstationRow End Function _ Public Function FindBystation(ByVal station As String) As stationRow Return CType(Me.Rows.Find(New Object() {station}),stationRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As stationDataTable = CType(MyBase.Clone,stationDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New stationDataTable() End Function _ Friend Sub InitVars() Me.columnstation = MyBase.Columns("station") Me.columndescription = MyBase.Columns("description") Me.columnsequence = MyBase.Columns("sequence") Me.columnstype = MyBase.Columns("stype") Me.columnactive = MyBase.Columns("active") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnstation = New Global.System.Data.DataColumn("station", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnsequence = New Global.System.Data.DataColumn("sequence", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsequence) Me.columnstype = New Global.System.Data.DataColumn("stype", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstype) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnstation}, true)) Me.columnstation.AllowDBNull = false Me.columnstation.Unique = true Me.columnstation.MaxLength = 50 Me.columndescription.MaxLength = 100 Me.columnstype.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewstationRow() As stationRow Return CType(Me.NewRow,stationRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New stationRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(stationRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.stationRowChangedEvent) Is Nothing) Then RaiseEvent stationRowChanged(Me, New stationRowChangeEvent(CType(e.Row,stationRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.stationRowChangingEvent) Is Nothing) Then RaiseEvent stationRowChanging(Me, New stationRowChangeEvent(CType(e.Row,stationRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.stationRowDeletedEvent) Is Nothing) Then RaiseEvent stationRowDeleted(Me, New stationRowChangeEvent(CType(e.Row,stationRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.stationRowDeletingEvent) Is Nothing) Then RaiseEvent stationRowDeleting(Me, New stationRowChangeEvent(CType(e.Row,stationRow), e.Action)) End If End Sub _ Public Sub RemovestationRow(ByVal row As stationRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "stationDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class station_convertDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnioStation As Global.System.Data.DataColumn Private columnalvStation As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "station_convert" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property ioStationColumn() As Global.System.Data.DataColumn Get Return Me.columnioStation End Get End Property _ Public ReadOnly Property alvStationColumn() As Global.System.Data.DataColumn Get Return Me.columnalvStation End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As station_convertRow Get Return CType(Me.Rows(index),station_convertRow) End Get End Property _ Public Event station_convertRowChanging As station_convertRowChangeEventHandler _ Public Event station_convertRowChanged As station_convertRowChangeEventHandler _ Public Event station_convertRowDeleting As station_convertRowChangeEventHandler _ Public Event station_convertRowDeleted As station_convertRowChangeEventHandler _ Public Overloads Sub Addstation_convertRow(ByVal row As station_convertRow) Me.Rows.Add(row) End Sub _ Public Overloads Function Addstation_convertRow(ByVal ioStation As String, ByVal alvStation As String) As station_convertRow Dim rowstation_convertRow As station_convertRow = CType(Me.NewRow,station_convertRow) Dim columnValuesArray() As Object = New Object() {ioStation, alvStation} rowstation_convertRow.ItemArray = columnValuesArray Me.Rows.Add(rowstation_convertRow) Return rowstation_convertRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As station_convertDataTable = CType(MyBase.Clone,station_convertDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New station_convertDataTable() End Function _ Friend Sub InitVars() Me.columnioStation = MyBase.Columns("ioStation") Me.columnalvStation = MyBase.Columns("alvStation") End Sub _ Private Sub InitClass() Me.columnioStation = New Global.System.Data.DataColumn("ioStation", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnioStation) Me.columnalvStation = New Global.System.Data.DataColumn("alvStation", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnalvStation) Me.columnioStation.MaxLength = 100 Me.columnalvStation.MaxLength = 100 End Sub _ Public Function Newstation_convertRow() As station_convertRow Return CType(Me.NewRow,station_convertRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New station_convertRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(station_convertRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.station_convertRowChangedEvent) Is Nothing) Then RaiseEvent station_convertRowChanged(Me, New station_convertRowChangeEvent(CType(e.Row,station_convertRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.station_convertRowChangingEvent) Is Nothing) Then RaiseEvent station_convertRowChanging(Me, New station_convertRowChangeEvent(CType(e.Row,station_convertRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.station_convertRowDeletedEvent) Is Nothing) Then RaiseEvent station_convertRowDeleted(Me, New station_convertRowChangeEvent(CType(e.Row,station_convertRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.station_convertRowDeletingEvent) Is Nothing) Then RaiseEvent station_convertRowDeleting(Me, New station_convertRowChangeEvent(CType(e.Row,station_convertRow), e.Action)) End If End Sub _ Public Sub Removestation_convertRow(ByVal row As station_convertRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "station_convertDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class stationHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnstation As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnsequence As Global.System.Data.DataColumn Private columnstype As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn Private columnstatus As Global.System.Data.DataColumn Private columnlastupdate As Global.System.Data.DataColumn Private columnlastupdatedby As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "stationHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property stationColumn() As Global.System.Data.DataColumn Get Return Me.columnstation End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property sequenceColumn() As Global.System.Data.DataColumn Get Return Me.columnsequence End Get End Property _ Public ReadOnly Property stypeColumn() As Global.System.Data.DataColumn Get Return Me.columnstype End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property statusColumn() As Global.System.Data.DataColumn Get Return Me.columnstatus End Get End Property _ Public ReadOnly Property lastupdateColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdate End Get End Property _ Public ReadOnly Property lastupdatedbyColumn() As Global.System.Data.DataColumn Get Return Me.columnlastupdatedby End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As stationHistRow Get Return CType(Me.Rows(index),stationHistRow) End Get End Property _ Public Event stationHistRowChanging As stationHistRowChangeEventHandler _ Public Event stationHistRowChanged As stationHistRowChangeEventHandler _ Public Event stationHistRowDeleting As stationHistRowChangeEventHandler _ Public Event stationHistRowDeleted As stationHistRowChangeEventHandler _ Public Overloads Sub AddstationHistRow(ByVal row As stationHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddstationHistRow(ByVal station As String, ByVal description As String, ByVal sequence As Integer, ByVal stype As String, ByVal active As Integer, ByVal status As String, ByVal lastupdate As Date, ByVal lastupdatedby As String) As stationHistRow Dim rowstationHistRow As stationHistRow = CType(Me.NewRow,stationHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, station, description, sequence, stype, active, status, lastupdate, lastupdatedby} rowstationHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowstationHistRow) Return rowstationHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As stationHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),stationHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As stationHistDataTable = CType(MyBase.Clone,stationHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New stationHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnstation = MyBase.Columns("station") Me.columndescription = MyBase.Columns("description") Me.columnsequence = MyBase.Columns("sequence") Me.columnstype = MyBase.Columns("stype") Me.columnactive = MyBase.Columns("active") Me.columnstatus = MyBase.Columns("status") Me.columnlastupdate = MyBase.Columns("lastupdate") Me.columnlastupdatedby = MyBase.Columns("lastupdatedby") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnstation = New Global.System.Data.DataColumn("station", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnsequence = New Global.System.Data.DataColumn("sequence", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsequence) Me.columnstype = New Global.System.Data.DataColumn("stype", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstype) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.columnstatus = New Global.System.Data.DataColumn("status", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstatus) Me.columnlastupdate = New Global.System.Data.DataColumn("lastupdate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdate) Me.columnlastupdatedby = New Global.System.Data.DataColumn("lastupdatedby", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlastupdatedby) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnstation.MaxLength = 50 Me.columndescription.MaxLength = 50 Me.columnstype.MaxLength = 50 Me.columnstatus.MaxLength = 50 Me.columnlastupdatedby.MaxLength = 50 End Sub _ Public Function NewstationHistRow() As stationHistRow Return CType(Me.NewRow,stationHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New stationHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(stationHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.stationHistRowChangedEvent) Is Nothing) Then RaiseEvent stationHistRowChanged(Me, New stationHistRowChangeEvent(CType(e.Row,stationHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.stationHistRowChangingEvent) Is Nothing) Then RaiseEvent stationHistRowChanging(Me, New stationHistRowChangeEvent(CType(e.Row,stationHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.stationHistRowDeletedEvent) Is Nothing) Then RaiseEvent stationHistRowDeleted(Me, New stationHistRowChangeEvent(CType(e.Row,stationHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.stationHistRowDeletingEvent) Is Nothing) Then RaiseEvent stationHistRowDeleting(Me, New stationHistRowChangeEvent(CType(e.Row,stationHistRow), e.Action)) End If End Sub _ Public Sub RemovestationHistRow(ByVal row As stationHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "stationHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class usersDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnusername As Global.System.Data.DataColumn Private columnpassword As Global.System.Data.DataColumn Private columnemployeeCode As Global.System.Data.DataColumn Private columndateJoined As Global.System.Data.DataColumn Private columnauthentication As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "users" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property usernameColumn() As Global.System.Data.DataColumn Get Return Me.columnusername End Get End Property _ Public ReadOnly Property passwordColumn() As Global.System.Data.DataColumn Get Return Me.columnpassword End Get End Property _ Public ReadOnly Property employeeCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnemployeeCode End Get End Property _ Public ReadOnly Property dateJoinedColumn() As Global.System.Data.DataColumn Get Return Me.columndateJoined End Get End Property _ Public ReadOnly Property authenticationColumn() As Global.System.Data.DataColumn Get Return Me.columnauthentication End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As usersRow Get Return CType(Me.Rows(index),usersRow) End Get End Property _ Public Event usersRowChanging As usersRowChangeEventHandler _ Public Event usersRowChanged As usersRowChangeEventHandler _ Public Event usersRowDeleting As usersRowChangeEventHandler _ Public Event usersRowDeleted As usersRowChangeEventHandler _ Public Overloads Sub AddusersRow(ByVal row As usersRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddusersRow(ByVal username As String, ByVal password As String, ByVal employeeCode As String, ByVal dateJoined As Date, ByVal authentication As String, ByVal active As Integer) As usersRow Dim rowusersRow As usersRow = CType(Me.NewRow,usersRow) Dim columnValuesArray() As Object = New Object() {username, password, employeeCode, dateJoined, authentication, active} rowusersRow.ItemArray = columnValuesArray Me.Rows.Add(rowusersRow) Return rowusersRow End Function _ Public Function FindByusername(ByVal username As String) As usersRow Return CType(Me.Rows.Find(New Object() {username}),usersRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As usersDataTable = CType(MyBase.Clone,usersDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New usersDataTable() End Function _ Friend Sub InitVars() Me.columnusername = MyBase.Columns("username") Me.columnpassword = MyBase.Columns("password") Me.columnemployeeCode = MyBase.Columns("employeeCode") Me.columndateJoined = MyBase.Columns("dateJoined") Me.columnauthentication = MyBase.Columns("authentication") Me.columnactive = MyBase.Columns("active") End Sub _ Private Sub InitClass() Me.columnusername = New Global.System.Data.DataColumn("username", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnusername) Me.columnpassword = New Global.System.Data.DataColumn("password", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpassword) Me.columnemployeeCode = New Global.System.Data.DataColumn("employeeCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnemployeeCode) Me.columndateJoined = New Global.System.Data.DataColumn("dateJoined", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndateJoined) Me.columnauthentication = New Global.System.Data.DataColumn("authentication", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnauthentication) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnusername}, true)) Me.columnusername.AllowDBNull = false Me.columnusername.Unique = true Me.columnusername.MaxLength = 50 Me.columnpassword.MaxLength = 100 Me.columnemployeeCode.MaxLength = 25 Me.columnauthentication.MaxLength = 50 End Sub _ Public Function NewusersRow() As usersRow Return CType(Me.NewRow,usersRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New usersRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(usersRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.usersRowChangedEvent) Is Nothing) Then RaiseEvent usersRowChanged(Me, New usersRowChangeEvent(CType(e.Row,usersRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.usersRowChangingEvent) Is Nothing) Then RaiseEvent usersRowChanging(Me, New usersRowChangeEvent(CType(e.Row,usersRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.usersRowDeletedEvent) Is Nothing) Then RaiseEvent usersRowDeleted(Me, New usersRowChangeEvent(CType(e.Row,usersRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.usersRowDeletingEvent) Is Nothing) Then RaiseEvent usersRowDeleting(Me, New usersRowChangeEvent(CType(e.Row,usersRow), e.Action)) End If End Sub _ Public Sub RemoveusersRow(ByVal row As usersRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "usersDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class usersHistDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnlineNum As Global.System.Data.DataColumn Private columnusername As Global.System.Data.DataColumn Private columnpassword As Global.System.Data.DataColumn Private columnemployeeCode As Global.System.Data.DataColumn Private columndateJoined As Global.System.Data.DataColumn Private columnauthentication As Global.System.Data.DataColumn Private columnactive As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "usersHist" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property lineNumColumn() As Global.System.Data.DataColumn Get Return Me.columnlineNum End Get End Property _ Public ReadOnly Property usernameColumn() As Global.System.Data.DataColumn Get Return Me.columnusername End Get End Property _ Public ReadOnly Property passwordColumn() As Global.System.Data.DataColumn Get Return Me.columnpassword End Get End Property _ Public ReadOnly Property employeeCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnemployeeCode End Get End Property _ Public ReadOnly Property dateJoinedColumn() As Global.System.Data.DataColumn Get Return Me.columndateJoined End Get End Property _ Public ReadOnly Property authenticationColumn() As Global.System.Data.DataColumn Get Return Me.columnauthentication End Get End Property _ Public ReadOnly Property activeColumn() As Global.System.Data.DataColumn Get Return Me.columnactive End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As usersHistRow Get Return CType(Me.Rows(index),usersHistRow) End Get End Property _ Public Event usersHistRowChanging As usersHistRowChangeEventHandler _ Public Event usersHistRowChanged As usersHistRowChangeEventHandler _ Public Event usersHistRowDeleting As usersHistRowChangeEventHandler _ Public Event usersHistRowDeleted As usersHistRowChangeEventHandler _ Public Overloads Sub AddusersHistRow(ByVal row As usersHistRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddusersHistRow(ByVal username As String, ByVal password As String, ByVal employeeCode As String, ByVal dateJoined As Date, ByVal authentication As String, ByVal active As Integer) As usersHistRow Dim rowusersHistRow As usersHistRow = CType(Me.NewRow,usersHistRow) Dim columnValuesArray() As Object = New Object() {Nothing, username, password, employeeCode, dateJoined, authentication, active} rowusersHistRow.ItemArray = columnValuesArray Me.Rows.Add(rowusersHistRow) Return rowusersHistRow End Function _ Public Function FindBylineNum(ByVal lineNum As Long) As usersHistRow Return CType(Me.Rows.Find(New Object() {lineNum}),usersHistRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As usersHistDataTable = CType(MyBase.Clone,usersHistDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New usersHistDataTable() End Function _ Friend Sub InitVars() Me.columnlineNum = MyBase.Columns("lineNum") Me.columnusername = MyBase.Columns("username") Me.columnpassword = MyBase.Columns("password") Me.columnemployeeCode = MyBase.Columns("employeeCode") Me.columndateJoined = MyBase.Columns("dateJoined") Me.columnauthentication = MyBase.Columns("authentication") Me.columnactive = MyBase.Columns("active") End Sub _ Private Sub InitClass() Me.columnlineNum = New Global.System.Data.DataColumn("lineNum", GetType(Long), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlineNum) Me.columnusername = New Global.System.Data.DataColumn("username", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnusername) Me.columnpassword = New Global.System.Data.DataColumn("password", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpassword) Me.columnemployeeCode = New Global.System.Data.DataColumn("employeeCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnemployeeCode) Me.columndateJoined = New Global.System.Data.DataColumn("dateJoined", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndateJoined) Me.columnauthentication = New Global.System.Data.DataColumn("authentication", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnauthentication) Me.columnactive = New Global.System.Data.DataColumn("active", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnactive) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnlineNum}, true)) Me.columnlineNum.AutoIncrement = true Me.columnlineNum.AutoIncrementSeed = -1 Me.columnlineNum.AutoIncrementStep = -1 Me.columnlineNum.AllowDBNull = false Me.columnlineNum.ReadOnly = true Me.columnlineNum.Unique = true Me.columnusername.MaxLength = 50 Me.columnpassword.MaxLength = 100 Me.columnemployeeCode.MaxLength = 25 Me.columnauthentication.MaxLength = 50 End Sub _ Public Function NewusersHistRow() As usersHistRow Return CType(Me.NewRow,usersHistRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New usersHistRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(usersHistRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.usersHistRowChangedEvent) Is Nothing) Then RaiseEvent usersHistRowChanged(Me, New usersHistRowChangeEvent(CType(e.Row,usersHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.usersHistRowChangingEvent) Is Nothing) Then RaiseEvent usersHistRowChanging(Me, New usersHistRowChangeEvent(CType(e.Row,usersHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.usersHistRowDeletedEvent) Is Nothing) Then RaiseEvent usersHistRowDeleted(Me, New usersHistRowChangeEvent(CType(e.Row,usersHistRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.usersHistRowDeletingEvent) Is Nothing) Then RaiseEvent usersHistRowDeleting(Me, New usersHistRowChangeEvent(CType(e.Row,usersHistRow), e.Action)) End If End Sub _ Public Sub RemoveusersHistRow(ByVal row As usersHistRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "usersHistDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class WIP_TEMPDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnmodelno As Global.System.Data.DataColumn Private columnstation As Global.System.Data.DataColumn Private columnprevious As Global.System.Data.DataColumn Private columndescription As Global.System.Data.DataColumn Private columnWIP As Global.System.Data.DataColumn Private columndate As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "WIP_TEMP" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property modelnoColumn() As Global.System.Data.DataColumn Get Return Me.columnmodelno End Get End Property _ Public ReadOnly Property stationColumn() As Global.System.Data.DataColumn Get Return Me.columnstation End Get End Property _ Public ReadOnly Property previousColumn() As Global.System.Data.DataColumn Get Return Me.columnprevious End Get End Property _ Public ReadOnly Property descriptionColumn() As Global.System.Data.DataColumn Get Return Me.columndescription End Get End Property _ Public ReadOnly Property WIPColumn() As Global.System.Data.DataColumn Get Return Me.columnWIP End Get End Property _ Public ReadOnly Property dateColumn() As Global.System.Data.DataColumn Get Return Me.columndate End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As WIP_TEMPRow Get Return CType(Me.Rows(index),WIP_TEMPRow) End Get End Property _ Public Event WIP_TEMPRowChanging As WIP_TEMPRowChangeEventHandler _ Public Event WIP_TEMPRowChanged As WIP_TEMPRowChangeEventHandler _ Public Event WIP_TEMPRowDeleting As WIP_TEMPRowChangeEventHandler _ Public Event WIP_TEMPRowDeleted As WIP_TEMPRowChangeEventHandler _ Public Overloads Sub AddWIP_TEMPRow(ByVal row As WIP_TEMPRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddWIP_TEMPRow(ByVal modelno As String, ByVal station As String, ByVal previous As String, ByVal description As String, ByVal WIP As Integer, ByVal _date As Date) As WIP_TEMPRow Dim rowWIP_TEMPRow As WIP_TEMPRow = CType(Me.NewRow,WIP_TEMPRow) Dim columnValuesArray() As Object = New Object() {modelno, station, previous, description, WIP, _date} rowWIP_TEMPRow.ItemArray = columnValuesArray Me.Rows.Add(rowWIP_TEMPRow) Return rowWIP_TEMPRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As WIP_TEMPDataTable = CType(MyBase.Clone,WIP_TEMPDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New WIP_TEMPDataTable() End Function _ Friend Sub InitVars() Me.columnmodelno = MyBase.Columns("modelno") Me.columnstation = MyBase.Columns("station") Me.columnprevious = MyBase.Columns("previous") Me.columndescription = MyBase.Columns("description") Me.columnWIP = MyBase.Columns("WIP") Me.columndate = MyBase.Columns("date") End Sub _ Private Sub InitClass() Me.columnmodelno = New Global.System.Data.DataColumn("modelno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelno) Me.columnstation = New Global.System.Data.DataColumn("station", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstation) Me.columnprevious = New Global.System.Data.DataColumn("previous", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnprevious) Me.columndescription = New Global.System.Data.DataColumn("description", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndescription) Me.columnWIP = New Global.System.Data.DataColumn("WIP", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnWIP) Me.columndate = New Global.System.Data.DataColumn("date", GetType(Date), Nothing, Global.System.Data.MappingType.Element) Me.columndate.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "dateColumn") Me.columndate.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "columndate") Me.columndate.ExtendedProperties.Add("Generator_UserColumnName", "date") MyBase.Columns.Add(Me.columndate) Me.columnmodelno.AllowDBNull = false Me.columnmodelno.MaxLength = 50 Me.columnstation.AllowDBNull = false Me.columnstation.MaxLength = 50 Me.columnprevious.MaxLength = 50 Me.columndescription.MaxLength = 100 End Sub _ Public Function NewWIP_TEMPRow() As WIP_TEMPRow Return CType(Me.NewRow,WIP_TEMPRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New WIP_TEMPRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(WIP_TEMPRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.WIP_TEMPRowChangedEvent) Is Nothing) Then RaiseEvent WIP_TEMPRowChanged(Me, New WIP_TEMPRowChangeEvent(CType(e.Row,WIP_TEMPRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.WIP_TEMPRowChangingEvent) Is Nothing) Then RaiseEvent WIP_TEMPRowChanging(Me, New WIP_TEMPRowChangeEvent(CType(e.Row,WIP_TEMPRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.WIP_TEMPRowDeletedEvent) Is Nothing) Then RaiseEvent WIP_TEMPRowDeleted(Me, New WIP_TEMPRowChangeEvent(CType(e.Row,WIP_TEMPRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.WIP_TEMPRowDeletingEvent) Is Nothing) Then RaiseEvent WIP_TEMPRowDeleting(Me, New WIP_TEMPRowChangeEvent(CType(e.Row,WIP_TEMPRow), e.Action)) End If End Sub _ Public Sub RemoveWIP_TEMPRow(ByVal row As WIP_TEMPRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "WIP_TEMPDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class _CTSB9_00001DataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnModuleAndFeeder As Global.System.Data.DataColumn Private columnPartNo As Global.System.Data.DataColumn Private columnLot As Global.System.Data.DataColumn Private columnLocation As Global.System.Data.DataColumn Private columnDateAndTimeMounted As Global.System.Data.DataColumn Private columnOperator As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "CTSB9-00001" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property ModuleAndFeederColumn() As Global.System.Data.DataColumn Get Return Me.columnModuleAndFeeder End Get End Property _ Public ReadOnly Property PartNoColumn() As Global.System.Data.DataColumn Get Return Me.columnPartNo End Get End Property _ Public ReadOnly Property LotColumn() As Global.System.Data.DataColumn Get Return Me.columnLot End Get End Property _ Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn Get Return Me.columnLocation End Get End Property _ Public ReadOnly Property DateAndTimeMountedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateAndTimeMounted End Get End Property _ Public ReadOnly Property OperatorColumn() As Global.System.Data.DataColumn Get Return Me.columnOperator End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As _CTSB9_00001Row Get Return CType(Me.Rows(index),_CTSB9_00001Row) End Get End Property _ Public Event _CTSB9_00001RowChanging As _CTSB9_00001RowChangeEventHandler _ Public Event _CTSB9_00001RowChanged As _CTSB9_00001RowChangeEventHandler _ Public Event _CTSB9_00001RowDeleting As _CTSB9_00001RowChangeEventHandler _ Public Event _CTSB9_00001RowDeleted As _CTSB9_00001RowChangeEventHandler _ Public Overloads Sub Add_CTSB9_00001Row(ByVal row As _CTSB9_00001Row) Me.Rows.Add(row) End Sub _ Public Overloads Function Add_CTSB9_00001Row(ByVal ModuleAndFeeder As String, ByVal PartNo As String, ByVal Lot As String, ByVal Location As String, ByVal DateAndTimeMounted As Date, ByVal _Operator As String) As _CTSB9_00001Row Dim row_CTSB9_00001Row As _CTSB9_00001Row = CType(Me.NewRow,_CTSB9_00001Row) Dim columnValuesArray() As Object = New Object() {ModuleAndFeeder, PartNo, Lot, Location, DateAndTimeMounted, _Operator} row_CTSB9_00001Row.ItemArray = columnValuesArray Me.Rows.Add(row_CTSB9_00001Row) Return row_CTSB9_00001Row End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As _CTSB9_00001DataTable = CType(MyBase.Clone,_CTSB9_00001DataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New _CTSB9_00001DataTable() End Function _ Friend Sub InitVars() Me.columnModuleAndFeeder = MyBase.Columns("ModuleAndFeeder") Me.columnPartNo = MyBase.Columns("PartNo") Me.columnLot = MyBase.Columns("Lot") Me.columnLocation = MyBase.Columns("Location") Me.columnDateAndTimeMounted = MyBase.Columns("DateAndTimeMounted") Me.columnOperator = MyBase.Columns("Operator") End Sub _ Private Sub InitClass() Me.columnModuleAndFeeder = New Global.System.Data.DataColumn("ModuleAndFeeder", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModuleAndFeeder) Me.columnPartNo = New Global.System.Data.DataColumn("PartNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPartNo) Me.columnLot = New Global.System.Data.DataColumn("Lot", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLot) Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLocation) Me.columnDateAndTimeMounted = New Global.System.Data.DataColumn("DateAndTimeMounted", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateAndTimeMounted) Me.columnOperator = New Global.System.Data.DataColumn("Operator", GetType(String), Nothing, Global.System.Data.MappingType.Element) Me.columnOperator.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "OperatorColumn") Me.columnOperator.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "columnOperator") Me.columnOperator.ExtendedProperties.Add("Generator_UserColumnName", "Operator") MyBase.Columns.Add(Me.columnOperator) Me.columnModuleAndFeeder.MaxLength = 2147483647 Me.columnPartNo.MaxLength = 2147483647 Me.columnLot.MaxLength = 2147483647 Me.columnLocation.MaxLength = 2147483647 Me.columnOperator.MaxLength = 2147483647 Me.ExtendedProperties.Add("Generator_TableVarName", "_tableCTSB9_00001") Me.ExtendedProperties.Add("Generator_UserTableName", "CTSB9-00001") End Sub _ Public Function New_CTSB9_00001Row() As _CTSB9_00001Row Return CType(Me.NewRow,_CTSB9_00001Row) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New _CTSB9_00001Row(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(_CTSB9_00001Row) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me._CTSB9_00001RowChangedEvent) Is Nothing) Then RaiseEvent _CTSB9_00001RowChanged(Me, New _CTSB9_00001RowChangeEvent(CType(e.Row,_CTSB9_00001Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me._CTSB9_00001RowChangingEvent) Is Nothing) Then RaiseEvent _CTSB9_00001RowChanging(Me, New _CTSB9_00001RowChangeEvent(CType(e.Row,_CTSB9_00001Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me._CTSB9_00001RowDeletedEvent) Is Nothing) Then RaiseEvent _CTSB9_00001RowDeleted(Me, New _CTSB9_00001RowChangeEvent(CType(e.Row,_CTSB9_00001Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me._CTSB9_00001RowDeletingEvent) Is Nothing) Then RaiseEvent _CTSB9_00001RowDeleting(Me, New _CTSB9_00001RowChangeEvent(CType(e.Row,_CTSB9_00001Row), e.Action)) End If End Sub _ Public Sub Remove_CTSB9_00001Row(ByVal row As _CTSB9_00001Row) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "_CTSB9_00001DataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class _CTSB9_00002DataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnModuleAndFeeder As Global.System.Data.DataColumn Private columnPartNo As Global.System.Data.DataColumn Private columnLot As Global.System.Data.DataColumn Private columnLocation As Global.System.Data.DataColumn Private columnDateAndTimeMounted As Global.System.Data.DataColumn Private columnOperator As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "CTSB9-00002" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property ModuleAndFeederColumn() As Global.System.Data.DataColumn Get Return Me.columnModuleAndFeeder End Get End Property _ Public ReadOnly Property PartNoColumn() As Global.System.Data.DataColumn Get Return Me.columnPartNo End Get End Property _ Public ReadOnly Property LotColumn() As Global.System.Data.DataColumn Get Return Me.columnLot End Get End Property _ Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn Get Return Me.columnLocation End Get End Property _ Public ReadOnly Property DateAndTimeMountedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateAndTimeMounted End Get End Property _ Public ReadOnly Property OperatorColumn() As Global.System.Data.DataColumn Get Return Me.columnOperator End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As _CTSB9_00002Row Get Return CType(Me.Rows(index),_CTSB9_00002Row) End Get End Property _ Public Event _CTSB9_00002RowChanging As _CTSB9_00002RowChangeEventHandler _ Public Event _CTSB9_00002RowChanged As _CTSB9_00002RowChangeEventHandler _ Public Event _CTSB9_00002RowDeleting As _CTSB9_00002RowChangeEventHandler _ Public Event _CTSB9_00002RowDeleted As _CTSB9_00002RowChangeEventHandler _ Public Overloads Sub Add_CTSB9_00002Row(ByVal row As _CTSB9_00002Row) Me.Rows.Add(row) End Sub _ Public Overloads Function Add_CTSB9_00002Row(ByVal ModuleAndFeeder As String, ByVal PartNo As String, ByVal Lot As String, ByVal Location As String, ByVal DateAndTimeMounted As Date, ByVal _Operator As String) As _CTSB9_00002Row Dim row_CTSB9_00002Row As _CTSB9_00002Row = CType(Me.NewRow,_CTSB9_00002Row) Dim columnValuesArray() As Object = New Object() {ModuleAndFeeder, PartNo, Lot, Location, DateAndTimeMounted, _Operator} row_CTSB9_00002Row.ItemArray = columnValuesArray Me.Rows.Add(row_CTSB9_00002Row) Return row_CTSB9_00002Row End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As _CTSB9_00002DataTable = CType(MyBase.Clone,_CTSB9_00002DataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New _CTSB9_00002DataTable() End Function _ Friend Sub InitVars() Me.columnModuleAndFeeder = MyBase.Columns("ModuleAndFeeder") Me.columnPartNo = MyBase.Columns("PartNo") Me.columnLot = MyBase.Columns("Lot") Me.columnLocation = MyBase.Columns("Location") Me.columnDateAndTimeMounted = MyBase.Columns("DateAndTimeMounted") Me.columnOperator = MyBase.Columns("Operator") End Sub _ Private Sub InitClass() Me.columnModuleAndFeeder = New Global.System.Data.DataColumn("ModuleAndFeeder", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModuleAndFeeder) Me.columnPartNo = New Global.System.Data.DataColumn("PartNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPartNo) Me.columnLot = New Global.System.Data.DataColumn("Lot", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLot) Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLocation) Me.columnDateAndTimeMounted = New Global.System.Data.DataColumn("DateAndTimeMounted", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateAndTimeMounted) Me.columnOperator = New Global.System.Data.DataColumn("Operator", GetType(String), Nothing, Global.System.Data.MappingType.Element) Me.columnOperator.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "OperatorColumn") Me.columnOperator.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "columnOperator") Me.columnOperator.ExtendedProperties.Add("Generator_UserColumnName", "Operator") MyBase.Columns.Add(Me.columnOperator) Me.columnModuleAndFeeder.MaxLength = 2147483647 Me.columnPartNo.MaxLength = 2147483647 Me.columnLot.MaxLength = 2147483647 Me.columnLocation.MaxLength = 2147483647 Me.columnOperator.MaxLength = 2147483647 Me.ExtendedProperties.Add("Generator_TableVarName", "_tableCTSB9_00002") Me.ExtendedProperties.Add("Generator_UserTableName", "CTSB9-00002") End Sub _ Public Function New_CTSB9_00002Row() As _CTSB9_00002Row Return CType(Me.NewRow,_CTSB9_00002Row) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New _CTSB9_00002Row(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(_CTSB9_00002Row) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me._CTSB9_00002RowChangedEvent) Is Nothing) Then RaiseEvent _CTSB9_00002RowChanged(Me, New _CTSB9_00002RowChangeEvent(CType(e.Row,_CTSB9_00002Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me._CTSB9_00002RowChangingEvent) Is Nothing) Then RaiseEvent _CTSB9_00002RowChanging(Me, New _CTSB9_00002RowChangeEvent(CType(e.Row,_CTSB9_00002Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me._CTSB9_00002RowDeletedEvent) Is Nothing) Then RaiseEvent _CTSB9_00002RowDeleted(Me, New _CTSB9_00002RowChangeEvent(CType(e.Row,_CTSB9_00002Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me._CTSB9_00002RowDeletingEvent) Is Nothing) Then RaiseEvent _CTSB9_00002RowDeleting(Me, New _CTSB9_00002RowChangeEvent(CType(e.Row,_CTSB9_00002Row), e.Action)) End If End Sub _ Public Sub Remove_CTSB9_00002Row(ByVal row As _CTSB9_00002Row) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "_CTSB9_00002DataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class getMaxDateDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable _ Public Sub New() MyBase.New Me.TableName = "getMaxDate" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As getMaxDateRow Get Return CType(Me.Rows(index),getMaxDateRow) End Get End Property _ Public Event getMaxDateRowChanging As getMaxDateRowChangeEventHandler _ Public Event getMaxDateRowChanged As getMaxDateRowChangeEventHandler _ Public Event getMaxDateRowDeleting As getMaxDateRowChangeEventHandler _ Public Event getMaxDateRowDeleted As getMaxDateRowChangeEventHandler _ Public Overloads Sub AddgetMaxDateRow(ByVal row As getMaxDateRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddgetMaxDateRow() As getMaxDateRow Dim rowgetMaxDateRow As getMaxDateRow = CType(Me.NewRow,getMaxDateRow) Dim columnValuesArray(-1) As Object rowgetMaxDateRow.ItemArray = columnValuesArray Me.Rows.Add(rowgetMaxDateRow) Return rowgetMaxDateRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As getMaxDateDataTable = CType(MyBase.Clone,getMaxDateDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New getMaxDateDataTable() End Function _ Friend Sub InitVars() End Sub _ Private Sub InitClass() End Sub _ Public Function NewgetMaxDateRow() As getMaxDateRow Return CType(Me.NewRow,getMaxDateRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New getMaxDateRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(getMaxDateRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.getMaxDateRowChangedEvent) Is Nothing) Then RaiseEvent getMaxDateRowChanged(Me, New getMaxDateRowChangeEvent(CType(e.Row,getMaxDateRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.getMaxDateRowChangingEvent) Is Nothing) Then RaiseEvent getMaxDateRowChanging(Me, New getMaxDateRowChangeEvent(CType(e.Row,getMaxDateRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.getMaxDateRowDeletedEvent) Is Nothing) Then RaiseEvent getMaxDateRowDeleted(Me, New getMaxDateRowChangeEvent(CType(e.Row,getMaxDateRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.getMaxDateRowDeletingEvent) Is Nothing) Then RaiseEvent getMaxDateRowDeleting(Me, New getMaxDateRowChangeEvent(CType(e.Row,getMaxDateRow), e.Action)) End If End Sub _ Public Sub RemovegetMaxDateRow(ByVal row As getMaxDateRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "getMaxDateDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class getMinDateDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable _ Public Sub New() MyBase.New Me.TableName = "getMinDate" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As getMinDateRow Get Return CType(Me.Rows(index),getMinDateRow) End Get End Property _ Public Event getMinDateRowChanging As getMinDateRowChangeEventHandler _ Public Event getMinDateRowChanged As getMinDateRowChangeEventHandler _ Public Event getMinDateRowDeleting As getMinDateRowChangeEventHandler _ Public Event getMinDateRowDeleted As getMinDateRowChangeEventHandler _ Public Overloads Sub AddgetMinDateRow(ByVal row As getMinDateRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddgetMinDateRow() As getMinDateRow Dim rowgetMinDateRow As getMinDateRow = CType(Me.NewRow,getMinDateRow) Dim columnValuesArray(-1) As Object rowgetMinDateRow.ItemArray = columnValuesArray Me.Rows.Add(rowgetMinDateRow) Return rowgetMinDateRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As getMinDateDataTable = CType(MyBase.Clone,getMinDateDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New getMinDateDataTable() End Function _ Friend Sub InitVars() End Sub _ Private Sub InitClass() End Sub _ Public Function NewgetMinDateRow() As getMinDateRow Return CType(Me.NewRow,getMinDateRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New getMinDateRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(getMinDateRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.getMinDateRowChangedEvent) Is Nothing) Then RaiseEvent getMinDateRowChanged(Me, New getMinDateRowChangeEvent(CType(e.Row,getMinDateRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.getMinDateRowChangingEvent) Is Nothing) Then RaiseEvent getMinDateRowChanging(Me, New getMinDateRowChangeEvent(CType(e.Row,getMinDateRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.getMinDateRowDeletedEvent) Is Nothing) Then RaiseEvent getMinDateRowDeleted(Me, New getMinDateRowChangeEvent(CType(e.Row,getMinDateRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.getMinDateRowDeletingEvent) Is Nothing) Then RaiseEvent getMinDateRowDeleting(Me, New getMinDateRowChangeEvent(CType(e.Row,getMinDateRow), e.Action)) End If End Sub _ Public Sub RemovegetMinDateRow(ByVal row As getMinDateRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "getMinDateDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class Shipper_FileDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnshipno As Global.System.Data.DataColumn Private columnshipDate As Global.System.Data.DataColumn Private columnshipVia As Global.System.Data.DataColumn Private columnshipto As Global.System.Data.DataColumn Private columnsipAdd1 As Global.System.Data.DataColumn Private columnshipAdd2 As Global.System.Data.DataColumn Private columnshipAdd3 As Global.System.Data.DataColumn Private columncity As Global.System.Data.DataColumn Private columnstate As Global.System.Data.DataColumn Private columnpostalCode As Global.System.Data.DataColumn Private columncountryCode As Global.System.Data.DataColumn Private columncnNo As Global.System.Data.DataColumn Private columnlayer As Global.System.Data.DataColumn Private columndimension As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "Shipper_File" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property shipnoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipno End Get End Property _ Public ReadOnly Property shipDateColumn() As Global.System.Data.DataColumn Get Return Me.columnshipDate End Get End Property _ Public ReadOnly Property shipViaColumn() As Global.System.Data.DataColumn Get Return Me.columnshipVia End Get End Property _ Public ReadOnly Property shiptoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipto End Get End Property _ Public ReadOnly Property sipAdd1Column() As Global.System.Data.DataColumn Get Return Me.columnsipAdd1 End Get End Property _ Public ReadOnly Property shipAdd2Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd2 End Get End Property _ Public ReadOnly Property shipAdd3Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd3 End Get End Property _ Public ReadOnly Property cityColumn() As Global.System.Data.DataColumn Get Return Me.columncity End Get End Property _ Public ReadOnly Property stateColumn() As Global.System.Data.DataColumn Get Return Me.columnstate End Get End Property _ Public ReadOnly Property postalCodeColumn() As Global.System.Data.DataColumn Get Return Me.columnpostalCode End Get End Property _ Public ReadOnly Property countryCodeColumn() As Global.System.Data.DataColumn Get Return Me.columncountryCode End Get End Property _ Public ReadOnly Property cnNoColumn() As Global.System.Data.DataColumn Get Return Me.columncnNo End Get End Property _ Public ReadOnly Property layerColumn() As Global.System.Data.DataColumn Get Return Me.columnlayer End Get End Property _ Public ReadOnly Property dimensionColumn() As Global.System.Data.DataColumn Get Return Me.columndimension End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As Shipper_FileRow Get Return CType(Me.Rows(index),Shipper_FileRow) End Get End Property _ Public Event Shipper_FileRowChanging As Shipper_FileRowChangeEventHandler _ Public Event Shipper_FileRowChanged As Shipper_FileRowChangeEventHandler _ Public Event Shipper_FileRowDeleting As Shipper_FileRowChangeEventHandler _ Public Event Shipper_FileRowDeleted As Shipper_FileRowChangeEventHandler _ Public Overloads Sub AddShipper_FileRow(ByVal row As Shipper_FileRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddShipper_FileRow( _ ByVal shipno As String, _ ByVal shipDate As Date, _ ByVal shipVia As String, _ ByVal shipto As String, _ ByVal sipAdd1 As String, _ ByVal shipAdd2 As String, _ ByVal shipAdd3 As String, _ ByVal city As String, _ ByVal state As String, _ ByVal postalCode As String, _ ByVal countryCode As String, _ ByVal cnNo As String, _ ByVal layer As Single, _ ByVal dimension As String, _ ByVal serialno As String, _ ByVal poLine As String, _ ByVal model As String) As Shipper_FileRow Dim rowShipper_FileRow As Shipper_FileRow = CType(Me.NewRow,Shipper_FileRow) Dim columnValuesArray() As Object = New Object() {shipno, shipDate, shipVia, shipto, sipAdd1, shipAdd2, shipAdd3, city, state, postalCode, countryCode, cnNo, layer, dimension, serialno, poLine, model} rowShipper_FileRow.ItemArray = columnValuesArray Me.Rows.Add(rowShipper_FileRow) Return rowShipper_FileRow End Function _ Public Function FindByshipno(ByVal shipno As String) As Shipper_FileRow Return CType(Me.Rows.Find(New Object() {shipno}),Shipper_FileRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As Shipper_FileDataTable = CType(MyBase.Clone,Shipper_FileDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New Shipper_FileDataTable() End Function _ Friend Sub InitVars() Me.columnshipno = MyBase.Columns("shipno") Me.columnshipDate = MyBase.Columns("shipDate") Me.columnshipVia = MyBase.Columns("shipVia") Me.columnshipto = MyBase.Columns("shipto") Me.columnsipAdd1 = MyBase.Columns("sipAdd1") Me.columnshipAdd2 = MyBase.Columns("shipAdd2") Me.columnshipAdd3 = MyBase.Columns("shipAdd3") Me.columncity = MyBase.Columns("city") Me.columnstate = MyBase.Columns("state") Me.columnpostalCode = MyBase.Columns("postalCode") Me.columncountryCode = MyBase.Columns("countryCode") Me.columncnNo = MyBase.Columns("cnNo") Me.columnlayer = MyBase.Columns("layer") Me.columndimension = MyBase.Columns("dimension") Me.columnserialno = MyBase.Columns("serialno") Me.columnpoLine = MyBase.Columns("poLine") Me.columnmodel = MyBase.Columns("model") End Sub _ Private Sub InitClass() Me.columnshipno = New Global.System.Data.DataColumn("shipno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipno) Me.columnshipDate = New Global.System.Data.DataColumn("shipDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipDate) Me.columnshipVia = New Global.System.Data.DataColumn("shipVia", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipVia) Me.columnshipto = New Global.System.Data.DataColumn("shipto", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipto) Me.columnsipAdd1 = New Global.System.Data.DataColumn("sipAdd1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsipAdd1) Me.columnshipAdd2 = New Global.System.Data.DataColumn("shipAdd2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd2) Me.columnshipAdd3 = New Global.System.Data.DataColumn("shipAdd3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd3) Me.columncity = New Global.System.Data.DataColumn("city", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncity) Me.columnstate = New Global.System.Data.DataColumn("state", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnstate) Me.columnpostalCode = New Global.System.Data.DataColumn("postalCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpostalCode) Me.columncountryCode = New Global.System.Data.DataColumn("countryCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncountryCode) Me.columncnNo = New Global.System.Data.DataColumn("cnNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncnNo) Me.columnlayer = New Global.System.Data.DataColumn("layer", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayer) Me.columndimension = New Global.System.Data.DataColumn("dimension", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimension) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnshipno}, true)) Me.columnshipno.AllowDBNull = false Me.columnshipno.Unique = true Me.columnshipno.MaxLength = 50 Me.columnshipVia.MaxLength = 20 Me.columnshipto.MaxLength = 28 Me.columnsipAdd1.MaxLength = 28 Me.columnshipAdd2.MaxLength = 28 Me.columnshipAdd3.MaxLength = 28 Me.columncity.MaxLength = 20 Me.columnstate.MaxLength = 4 Me.columnpostalCode.MaxLength = 10 Me.columncountryCode.MaxLength = 28 Me.columncnNo.MaxLength = 50 Me.columndimension.MaxLength = 50 Me.columnserialno.MaxLength = 50 Me.columnpoLine.MaxLength = 15 Me.columnmodel.MaxLength = 50 End Sub _ Public Function NewShipper_FileRow() As Shipper_FileRow Return CType(Me.NewRow,Shipper_FileRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New Shipper_FileRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(Shipper_FileRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.Shipper_FileRowChangedEvent) Is Nothing) Then RaiseEvent Shipper_FileRowChanged(Me, New Shipper_FileRowChangeEvent(CType(e.Row,Shipper_FileRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.Shipper_FileRowChangingEvent) Is Nothing) Then RaiseEvent Shipper_FileRowChanging(Me, New Shipper_FileRowChangeEvent(CType(e.Row,Shipper_FileRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.Shipper_FileRowDeletedEvent) Is Nothing) Then RaiseEvent Shipper_FileRowDeleted(Me, New Shipper_FileRowChangeEvent(CType(e.Row,Shipper_FileRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.Shipper_FileRowDeletingEvent) Is Nothing) Then RaiseEvent Shipper_FileRowDeleting(Me, New Shipper_FileRowChangeEvent(CType(e.Row,Shipper_FileRow), e.Action)) End If End Sub _ Public Sub RemoveShipper_FileRow(ByVal row As Shipper_FileRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "Shipper_FileDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class Shipper_File_BodyDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnPOLine As Global.System.Data.DataColumn Private columnmodelDesc1 As Global.System.Data.DataColumn Private columnCustPO As Global.System.Data.DataColumn Private columnFlag3 As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn Private columnCustPart As Global.System.Data.DataColumn Private columnserialno As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "Shipper_File_Body" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property POLineColumn() As Global.System.Data.DataColumn Get Return Me.columnPOLine End Get End Property _ Public ReadOnly Property modelDesc1Column() As Global.System.Data.DataColumn Get Return Me.columnmodelDesc1 End Get End Property _ Public ReadOnly Property CustPOColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPO End Get End Property _ Public ReadOnly Property Flag3Column() As Global.System.Data.DataColumn Get Return Me.columnFlag3 End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property CustPartColumn() As Global.System.Data.DataColumn Get Return Me.columnCustPart End Get End Property _ Public ReadOnly Property serialnoColumn() As Global.System.Data.DataColumn Get Return Me.columnserialno End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As Shipper_File_BodyRow Get Return CType(Me.Rows(index),Shipper_File_BodyRow) End Get End Property _ Public Event Shipper_File_BodyRowChanging As Shipper_File_BodyRowChangeEventHandler _ Public Event Shipper_File_BodyRowChanged As Shipper_File_BodyRowChangeEventHandler _ Public Event Shipper_File_BodyRowDeleting As Shipper_File_BodyRowChangeEventHandler _ Public Event Shipper_File_BodyRowDeleted As Shipper_File_BodyRowChangeEventHandler _ Public Overloads Sub AddShipper_File_BodyRow(ByVal row As Shipper_File_BodyRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddShipper_File_BodyRow(ByVal POLine As String, ByVal modelDesc1 As String, ByVal CustPO As String, ByVal Flag3 As String, ByVal model As String, ByVal CustPart As String, ByVal serialno As String) As Shipper_File_BodyRow Dim rowShipper_File_BodyRow As Shipper_File_BodyRow = CType(Me.NewRow,Shipper_File_BodyRow) Dim columnValuesArray() As Object = New Object() {POLine, modelDesc1, CustPO, Flag3, model, CustPart, serialno} rowShipper_File_BodyRow.ItemArray = columnValuesArray Me.Rows.Add(rowShipper_File_BodyRow) Return rowShipper_File_BodyRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As Shipper_File_BodyDataTable = CType(MyBase.Clone,Shipper_File_BodyDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New Shipper_File_BodyDataTable() End Function _ Friend Sub InitVars() Me.columnPOLine = MyBase.Columns("POLine") Me.columnmodelDesc1 = MyBase.Columns("modelDesc1") Me.columnCustPO = MyBase.Columns("CustPO") Me.columnFlag3 = MyBase.Columns("Flag3") Me.columnmodel = MyBase.Columns("model") Me.columnCustPart = MyBase.Columns("CustPart") Me.columnserialno = MyBase.Columns("serialno") End Sub _ Private Sub InitClass() Me.columnPOLine = New Global.System.Data.DataColumn("POLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPOLine) Me.columnmodelDesc1 = New Global.System.Data.DataColumn("modelDesc1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodelDesc1) Me.columnCustPO = New Global.System.Data.DataColumn("CustPO", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPO) Me.columnFlag3 = New Global.System.Data.DataColumn("Flag3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnFlag3) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.columnCustPart = New Global.System.Data.DataColumn("CustPart", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnCustPart) Me.columnserialno = New Global.System.Data.DataColumn("serialno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnserialno) Me.columnPOLine.ReadOnly = true Me.columnPOLine.MaxLength = 24 Me.columnmodelDesc1.MaxLength = 200 Me.columnCustPO.MaxLength = 8 Me.columnFlag3.MaxLength = 1 Me.columnmodel.MaxLength = 50 Me.columnCustPart.MaxLength = 40 Me.columnserialno.MaxLength = 50 End Sub _ Public Function NewShipper_File_BodyRow() As Shipper_File_BodyRow Return CType(Me.NewRow,Shipper_File_BodyRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New Shipper_File_BodyRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(Shipper_File_BodyRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.Shipper_File_BodyRowChangedEvent) Is Nothing) Then RaiseEvent Shipper_File_BodyRowChanged(Me, New Shipper_File_BodyRowChangeEvent(CType(e.Row,Shipper_File_BodyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.Shipper_File_BodyRowChangingEvent) Is Nothing) Then RaiseEvent Shipper_File_BodyRowChanging(Me, New Shipper_File_BodyRowChangeEvent(CType(e.Row,Shipper_File_BodyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.Shipper_File_BodyRowDeletedEvent) Is Nothing) Then RaiseEvent Shipper_File_BodyRowDeleted(Me, New Shipper_File_BodyRowChangeEvent(CType(e.Row,Shipper_File_BodyRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.Shipper_File_BodyRowDeletingEvent) Is Nothing) Then RaiseEvent Shipper_File_BodyRowDeleting(Me, New Shipper_File_BodyRowChangeEvent(CType(e.Row,Shipper_File_BodyRow), e.Action)) End If End Sub _ Public Sub RemoveShipper_File_BodyRow(ByVal row As Shipper_File_BodyRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "Shipper_File_BodyDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class Shipper_File_HeaderDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnshipno As Global.System.Data.DataColumn Private columnshipDate As Global.System.Data.DataColumn Private columnshipVia As Global.System.Data.DataColumn Private columnshipto As Global.System.Data.DataColumn Private columnsipAdd1 As Global.System.Data.DataColumn Private columnshipAdd2 As Global.System.Data.DataColumn Private columnshipAdd3 As Global.System.Data.DataColumn Private columnZIP As Global.System.Data.DataColumn Private columncountryCode As Global.System.Data.DataColumn Private columncnNo As Global.System.Data.DataColumn Private columnlayer As Global.System.Data.DataColumn Private columndimension As Global.System.Data.DataColumn Private columnpoLine As Global.System.Data.DataColumn Private columnmodel As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "Shipper_File_Header" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property shipnoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipno End Get End Property _ Public ReadOnly Property shipDateColumn() As Global.System.Data.DataColumn Get Return Me.columnshipDate End Get End Property _ Public ReadOnly Property shipViaColumn() As Global.System.Data.DataColumn Get Return Me.columnshipVia End Get End Property _ Public ReadOnly Property shiptoColumn() As Global.System.Data.DataColumn Get Return Me.columnshipto End Get End Property _ Public ReadOnly Property sipAdd1Column() As Global.System.Data.DataColumn Get Return Me.columnsipAdd1 End Get End Property _ Public ReadOnly Property shipAdd2Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd2 End Get End Property _ Public ReadOnly Property shipAdd3Column() As Global.System.Data.DataColumn Get Return Me.columnshipAdd3 End Get End Property _ Public ReadOnly Property ZIPColumn() As Global.System.Data.DataColumn Get Return Me.columnZIP End Get End Property _ Public ReadOnly Property countryCodeColumn() As Global.System.Data.DataColumn Get Return Me.columncountryCode End Get End Property _ Public ReadOnly Property cnNoColumn() As Global.System.Data.DataColumn Get Return Me.columncnNo End Get End Property _ Public ReadOnly Property layerColumn() As Global.System.Data.DataColumn Get Return Me.columnlayer End Get End Property _ Public ReadOnly Property dimensionColumn() As Global.System.Data.DataColumn Get Return Me.columndimension End Get End Property _ Public ReadOnly Property poLineColumn() As Global.System.Data.DataColumn Get Return Me.columnpoLine End Get End Property _ Public ReadOnly Property modelColumn() As Global.System.Data.DataColumn Get Return Me.columnmodel End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As Shipper_File_HeaderRow Get Return CType(Me.Rows(index),Shipper_File_HeaderRow) End Get End Property _ Public Event Shipper_File_HeaderRowChanging As Shipper_File_HeaderRowChangeEventHandler _ Public Event Shipper_File_HeaderRowChanged As Shipper_File_HeaderRowChangeEventHandler _ Public Event Shipper_File_HeaderRowDeleting As Shipper_File_HeaderRowChangeEventHandler _ Public Event Shipper_File_HeaderRowDeleted As Shipper_File_HeaderRowChangeEventHandler _ Public Overloads Sub AddShipper_File_HeaderRow(ByVal row As Shipper_File_HeaderRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddShipper_File_HeaderRow(ByVal shipno As String, ByVal shipDate As Date, ByVal shipVia As String, ByVal shipto As String, ByVal sipAdd1 As String, ByVal shipAdd2 As String, ByVal shipAdd3 As String, ByVal ZIP As String, ByVal countryCode As String, ByVal cnNo As String, ByVal layer As Single, ByVal dimension As String, ByVal poLine As String, ByVal model As String) As Shipper_File_HeaderRow Dim rowShipper_File_HeaderRow As Shipper_File_HeaderRow = CType(Me.NewRow,Shipper_File_HeaderRow) Dim columnValuesArray() As Object = New Object() {shipno, shipDate, shipVia, shipto, sipAdd1, shipAdd2, shipAdd3, ZIP, countryCode, cnNo, layer, dimension, poLine, model} rowShipper_File_HeaderRow.ItemArray = columnValuesArray Me.Rows.Add(rowShipper_File_HeaderRow) Return rowShipper_File_HeaderRow End Function _ Public Function FindByshipno(ByVal shipno As String) As Shipper_File_HeaderRow Return CType(Me.Rows.Find(New Object() {shipno}),Shipper_File_HeaderRow) End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As Shipper_File_HeaderDataTable = CType(MyBase.Clone,Shipper_File_HeaderDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New Shipper_File_HeaderDataTable() End Function _ Friend Sub InitVars() Me.columnshipno = MyBase.Columns("shipno") Me.columnshipDate = MyBase.Columns("shipDate") Me.columnshipVia = MyBase.Columns("shipVia") Me.columnshipto = MyBase.Columns("shipto") Me.columnsipAdd1 = MyBase.Columns("sipAdd1") Me.columnshipAdd2 = MyBase.Columns("shipAdd2") Me.columnshipAdd3 = MyBase.Columns("shipAdd3") Me.columnZIP = MyBase.Columns("ZIP") Me.columncountryCode = MyBase.Columns("countryCode") Me.columncnNo = MyBase.Columns("cnNo") Me.columnlayer = MyBase.Columns("layer") Me.columndimension = MyBase.Columns("dimension") Me.columnpoLine = MyBase.Columns("poLine") Me.columnmodel = MyBase.Columns("model") End Sub _ Private Sub InitClass() Me.columnshipno = New Global.System.Data.DataColumn("shipno", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipno) Me.columnshipDate = New Global.System.Data.DataColumn("shipDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipDate) Me.columnshipVia = New Global.System.Data.DataColumn("shipVia", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipVia) Me.columnshipto = New Global.System.Data.DataColumn("shipto", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipto) Me.columnsipAdd1 = New Global.System.Data.DataColumn("sipAdd1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnsipAdd1) Me.columnshipAdd2 = New Global.System.Data.DataColumn("shipAdd2", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd2) Me.columnshipAdd3 = New Global.System.Data.DataColumn("shipAdd3", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnshipAdd3) Me.columnZIP = New Global.System.Data.DataColumn("ZIP", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnZIP) Me.columncountryCode = New Global.System.Data.DataColumn("countryCode", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncountryCode) Me.columncnNo = New Global.System.Data.DataColumn("cnNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncnNo) Me.columnlayer = New Global.System.Data.DataColumn("layer", GetType(Single), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnlayer) Me.columndimension = New Global.System.Data.DataColumn("dimension", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columndimension) Me.columnpoLine = New Global.System.Data.DataColumn("poLine", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpoLine) Me.columnmodel = New Global.System.Data.DataColumn("model", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnmodel) Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnshipno}, true)) Me.columnshipno.AllowDBNull = false Me.columnshipno.Unique = true Me.columnshipno.MaxLength = 50 Me.columnshipVia.MaxLength = 20 Me.columnshipto.MaxLength = 28 Me.columnsipAdd1.MaxLength = 28 Me.columnshipAdd2.MaxLength = 28 Me.columnshipAdd3.MaxLength = 28 Me.columnZIP.ReadOnly = true Me.columnZIP.MaxLength = 41 Me.columncountryCode.MaxLength = 28 Me.columncnNo.MaxLength = 50 Me.columndimension.MaxLength = 50 Me.columnpoLine.MaxLength = 15 Me.columnmodel.MaxLength = 50 End Sub _ Public Function NewShipper_File_HeaderRow() As Shipper_File_HeaderRow Return CType(Me.NewRow,Shipper_File_HeaderRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New Shipper_File_HeaderRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(Shipper_File_HeaderRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.Shipper_File_HeaderRowChangedEvent) Is Nothing) Then RaiseEvent Shipper_File_HeaderRowChanged(Me, New Shipper_File_HeaderRowChangeEvent(CType(e.Row,Shipper_File_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.Shipper_File_HeaderRowChangingEvent) Is Nothing) Then RaiseEvent Shipper_File_HeaderRowChanging(Me, New Shipper_File_HeaderRowChangeEvent(CType(e.Row,Shipper_File_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.Shipper_File_HeaderRowDeletedEvent) Is Nothing) Then RaiseEvent Shipper_File_HeaderRowDeleted(Me, New Shipper_File_HeaderRowChangeEvent(CType(e.Row,Shipper_File_HeaderRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.Shipper_File_HeaderRowDeletingEvent) Is Nothing) Then RaiseEvent Shipper_File_HeaderRowDeleting(Me, New Shipper_File_HeaderRowChangeEvent(CType(e.Row,Shipper_File_HeaderRow), e.Action)) End If End Sub _ Public Sub RemoveShipper_File_HeaderRow(ByVal row As Shipper_File_HeaderRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "Shipper_File_HeaderDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class containerDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnColumn1 As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "container" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Column1Column() As Global.System.Data.DataColumn Get Return Me.columnColumn1 End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As containerRow Get Return CType(Me.Rows(index),containerRow) End Get End Property _ Public Event containerRowChanging As containerRowChangeEventHandler _ Public Event containerRowChanged As containerRowChangeEventHandler _ Public Event containerRowDeleting As containerRowChangeEventHandler _ Public Event containerRowDeleted As containerRowChangeEventHandler _ Public Overloads Sub AddcontainerRow(ByVal row As containerRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddcontainerRow(ByVal Column1 As String) As containerRow Dim rowcontainerRow As containerRow = CType(Me.NewRow,containerRow) Dim columnValuesArray() As Object = New Object() {Column1} rowcontainerRow.ItemArray = columnValuesArray Me.Rows.Add(rowcontainerRow) Return rowcontainerRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As containerDataTable = CType(MyBase.Clone,containerDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New containerDataTable() End Function _ Friend Sub InitVars() Me.columnColumn1 = MyBase.Columns("Column1") End Sub _ Private Sub InitClass() Me.columnColumn1 = New Global.System.Data.DataColumn("Column1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnColumn1) Me.columnColumn1.ReadOnly = true Me.columnColumn1.MaxLength = 142 End Sub _ Public Function NewcontainerRow() As containerRow Return CType(Me.NewRow,containerRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New containerRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(containerRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.containerRowChangedEvent) Is Nothing) Then RaiseEvent containerRowChanged(Me, New containerRowChangeEvent(CType(e.Row,containerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.containerRowChangingEvent) Is Nothing) Then RaiseEvent containerRowChanging(Me, New containerRowChangeEvent(CType(e.Row,containerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.containerRowDeletedEvent) Is Nothing) Then RaiseEvent containerRowDeleted(Me, New containerRowChangeEvent(CType(e.Row,containerRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.containerRowDeletingEvent) Is Nothing) Then RaiseEvent containerRowDeleting(Me, New containerRowChangeEvent(CType(e.Row,containerRow), e.Action)) End If End Sub _ Public Sub RemovecontainerRow(ByVal row As containerRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "containerDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class createViewDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnModuleAndFeeder As Global.System.Data.DataColumn Private columnPartNo As Global.System.Data.DataColumn Private columnLot As Global.System.Data.DataColumn Private columnLocation As Global.System.Data.DataColumn Private columnDateAndTimeMounted As Global.System.Data.DataColumn Private columnOperator As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "createView" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property ModuleAndFeederColumn() As Global.System.Data.DataColumn Get Return Me.columnModuleAndFeeder End Get End Property _ Public ReadOnly Property PartNoColumn() As Global.System.Data.DataColumn Get Return Me.columnPartNo End Get End Property _ Public ReadOnly Property LotColumn() As Global.System.Data.DataColumn Get Return Me.columnLot End Get End Property _ Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn Get Return Me.columnLocation End Get End Property _ Public ReadOnly Property DateAndTimeMountedColumn() As Global.System.Data.DataColumn Get Return Me.columnDateAndTimeMounted End Get End Property _ Public ReadOnly Property OperatorColumn() As Global.System.Data.DataColumn Get Return Me.columnOperator End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As createViewRow Get Return CType(Me.Rows(index),createViewRow) End Get End Property _ Public Event createViewRowChanging As createViewRowChangeEventHandler _ Public Event createViewRowChanged As createViewRowChangeEventHandler _ Public Event createViewRowDeleting As createViewRowChangeEventHandler _ Public Event createViewRowDeleted As createViewRowChangeEventHandler _ Public Overloads Sub AddcreateViewRow(ByVal row As createViewRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddcreateViewRow(ByVal ModuleAndFeeder As String, ByVal PartNo As String, ByVal Lot As String, ByVal Location As String, ByVal DateAndTimeMounted As Date, ByVal _Operator As String) As createViewRow Dim rowcreateViewRow As createViewRow = CType(Me.NewRow,createViewRow) Dim columnValuesArray() As Object = New Object() {ModuleAndFeeder, PartNo, Lot, Location, DateAndTimeMounted, _Operator} rowcreateViewRow.ItemArray = columnValuesArray Me.Rows.Add(rowcreateViewRow) Return rowcreateViewRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As createViewDataTable = CType(MyBase.Clone,createViewDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New createViewDataTable() End Function _ Friend Sub InitVars() Me.columnModuleAndFeeder = MyBase.Columns("ModuleAndFeeder") Me.columnPartNo = MyBase.Columns("PartNo") Me.columnLot = MyBase.Columns("Lot") Me.columnLocation = MyBase.Columns("Location") Me.columnDateAndTimeMounted = MyBase.Columns("DateAndTimeMounted") Me.columnOperator = MyBase.Columns("Operator") End Sub _ Private Sub InitClass() Me.columnModuleAndFeeder = New Global.System.Data.DataColumn("ModuleAndFeeder", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnModuleAndFeeder) Me.columnPartNo = New Global.System.Data.DataColumn("PartNo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnPartNo) Me.columnLot = New Global.System.Data.DataColumn("Lot", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLot) Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnLocation) Me.columnDateAndTimeMounted = New Global.System.Data.DataColumn("DateAndTimeMounted", GetType(Date), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnDateAndTimeMounted) Me.columnOperator = New Global.System.Data.DataColumn("Operator", GetType(String), Nothing, Global.System.Data.MappingType.Element) Me.columnOperator.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "OperatorColumn") Me.columnOperator.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "columnOperator") Me.columnOperator.ExtendedProperties.Add("Generator_UserColumnName", "Operator") MyBase.Columns.Add(Me.columnOperator) Me.columnModuleAndFeeder.ReadOnly = true Me.columnModuleAndFeeder.MaxLength = 2147483647 Me.columnPartNo.MaxLength = 2147483647 Me.columnLot.MaxLength = 2147483647 Me.columnLocation.MaxLength = 2147483647 Me.columnDateAndTimeMounted.ReadOnly = true Me.columnOperator.MaxLength = 2147483647 End Sub _ Public Function NewcreateViewRow() As createViewRow Return CType(Me.NewRow,createViewRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New createViewRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(createViewRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.createViewRowChangedEvent) Is Nothing) Then RaiseEvent createViewRowChanged(Me, New createViewRowChangeEvent(CType(e.Row,createViewRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.createViewRowChangingEvent) Is Nothing) Then RaiseEvent createViewRowChanging(Me, New createViewRowChangeEvent(CType(e.Row,createViewRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.createViewRowDeletedEvent) Is Nothing) Then RaiseEvent createViewRowDeleted(Me, New createViewRowChangeEvent(CType(e.Row,createViewRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.createViewRowDeletingEvent) Is Nothing) Then RaiseEvent createViewRowDeleting(Me, New createViewRowChangeEvent(CType(e.Row,createViewRow), e.Action)) End If End Sub _ Public Sub RemovecreateViewRow(ByVal row As createViewRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "createViewDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class itemDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnColumn1 As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "item" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Column1Column() As Global.System.Data.DataColumn Get Return Me.columnColumn1 End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As itemRow Get Return CType(Me.Rows(index),itemRow) End Get End Property _ Public Event itemRowChanging As itemRowChangeEventHandler _ Public Event itemRowChanged As itemRowChangeEventHandler _ Public Event itemRowDeleting As itemRowChangeEventHandler _ Public Event itemRowDeleted As itemRowChangeEventHandler _ Public Overloads Sub AdditemRow(ByVal row As itemRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AdditemRow(ByVal Column1 As String) As itemRow Dim rowitemRow As itemRow = CType(Me.NewRow,itemRow) Dim columnValuesArray() As Object = New Object() {Column1} rowitemRow.ItemArray = columnValuesArray Me.Rows.Add(rowitemRow) Return rowitemRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As itemDataTable = CType(MyBase.Clone,itemDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New itemDataTable() End Function _ Friend Sub InitVars() Me.columnColumn1 = MyBase.Columns("Column1") End Sub _ Private Sub InitClass() Me.columnColumn1 = New Global.System.Data.DataColumn("Column1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnColumn1) Me.columnColumn1.ReadOnly = true Me.columnColumn1.MaxLength = 203 End Sub _ Public Function NewitemRow() As itemRow Return CType(Me.NewRow,itemRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New itemRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(itemRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.itemRowChangedEvent) Is Nothing) Then RaiseEvent itemRowChanged(Me, New itemRowChangeEvent(CType(e.Row,itemRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.itemRowChangingEvent) Is Nothing) Then RaiseEvent itemRowChanging(Me, New itemRowChangeEvent(CType(e.Row,itemRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.itemRowDeletedEvent) Is Nothing) Then RaiseEvent itemRowDeleted(Me, New itemRowChangeEvent(CType(e.Row,itemRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.itemRowDeletingEvent) Is Nothing) Then RaiseEvent itemRowDeleting(Me, New itemRowChangeEvent(CType(e.Row,itemRow), e.Action)) End If End Sub _ Public Sub RemoveitemRow(ByVal row As itemRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "itemDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class PODataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnColumn1 As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "PO" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Column1Column() As Global.System.Data.DataColumn Get Return Me.columnColumn1 End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As PORow Get Return CType(Me.Rows(index),PORow) End Get End Property _ Public Event PORowChanging As PORowChangeEventHandler _ Public Event PORowChanged As PORowChangeEventHandler _ Public Event PORowDeleting As PORowChangeEventHandler _ Public Event PORowDeleted As PORowChangeEventHandler _ Public Overloads Sub AddPORow(ByVal row As PORow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddPORow(ByVal Column1 As String) As PORow Dim rowPORow As PORow = CType(Me.NewRow,PORow) Dim columnValuesArray() As Object = New Object() {Column1} rowPORow.ItemArray = columnValuesArray Me.Rows.Add(rowPORow) Return rowPORow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As PODataTable = CType(MyBase.Clone,PODataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New PODataTable() End Function _ Friend Sub InitVars() Me.columnColumn1 = MyBase.Columns("Column1") End Sub _ Private Sub InitClass() Me.columnColumn1 = New Global.System.Data.DataColumn("Column1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnColumn1) Me.columnColumn1.ReadOnly = true Me.columnColumn1.MaxLength = 129 End Sub _ Public Function NewPORow() As PORow Return CType(Me.NewRow,PORow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New PORow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(PORow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.PORowChangedEvent) Is Nothing) Then RaiseEvent PORowChanged(Me, New PORowChangeEvent(CType(e.Row,PORow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.PORowChangingEvent) Is Nothing) Then RaiseEvent PORowChanging(Me, New PORowChangeEvent(CType(e.Row,PORow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.PORowDeletedEvent) Is Nothing) Then RaiseEvent PORowDeleted(Me, New PORowChangeEvent(CType(e.Row,PORow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.PORowDeletingEvent) Is Nothing) Then RaiseEvent PORowDeleting(Me, New PORowChangeEvent(CType(e.Row,PORow), e.Action)) End If End Sub _ Public Sub RemovePORow(ByVal row As PORow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "PODataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class POLINEDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnColumn1 As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "POLINE" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Column1Column() As Global.System.Data.DataColumn Get Return Me.columnColumn1 End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As POLINERow Get Return CType(Me.Rows(index),POLINERow) End Get End Property _ Public Event POLINERowChanging As POLINERowChangeEventHandler _ Public Event POLINERowChanged As POLINERowChangeEventHandler _ Public Event POLINERowDeleting As POLINERowChangeEventHandler _ Public Event POLINERowDeleted As POLINERowChangeEventHandler _ Public Overloads Sub AddPOLINERow(ByVal row As POLINERow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddPOLINERow(ByVal Column1 As String) As POLINERow Dim rowPOLINERow As POLINERow = CType(Me.NewRow,POLINERow) Dim columnValuesArray() As Object = New Object() {Column1} rowPOLINERow.ItemArray = columnValuesArray Me.Rows.Add(rowPOLINERow) Return rowPOLINERow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As POLINEDataTable = CType(MyBase.Clone,POLINEDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New POLINEDataTable() End Function _ Friend Sub InitVars() Me.columnColumn1 = MyBase.Columns("Column1") End Sub _ Private Sub InitClass() Me.columnColumn1 = New Global.System.Data.DataColumn("Column1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnColumn1) Me.columnColumn1.ReadOnly = true Me.columnColumn1.MaxLength = 126 End Sub _ Public Function NewPOLINERow() As POLINERow Return CType(Me.NewRow,POLINERow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New POLINERow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(POLINERow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.POLINERowChangedEvent) Is Nothing) Then RaiseEvent POLINERowChanged(Me, New POLINERowChangeEvent(CType(e.Row,POLINERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.POLINERowChangingEvent) Is Nothing) Then RaiseEvent POLINERowChanging(Me, New POLINERowChangeEvent(CType(e.Row,POLINERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.POLINERowDeletedEvent) Is Nothing) Then RaiseEvent POLINERowDeleted(Me, New POLINERowChangeEvent(CType(e.Row,POLINERow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.POLINERowDeletingEvent) Is Nothing) Then RaiseEvent POLINERowDeleting(Me, New POLINERowChangeEvent(CType(e.Row,POLINERow), e.Action)) End If End Sub _ Public Sub RemovePOLINERow(ByVal row As POLINERow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "POLINEDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class shipAdd1DataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnColumn1 As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "shipAdd1" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Column1Column() As Global.System.Data.DataColumn Get Return Me.columnColumn1 End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As shipAdd1Row Get Return CType(Me.Rows(index),shipAdd1Row) End Get End Property _ Public Event shipAdd1RowChanging As shipAdd1RowChangeEventHandler _ Public Event shipAdd1RowChanged As shipAdd1RowChangeEventHandler _ Public Event shipAdd1RowDeleting As shipAdd1RowChangeEventHandler _ Public Event shipAdd1RowDeleted As shipAdd1RowChangeEventHandler _ Public Overloads Sub AddshipAdd1Row(ByVal row As shipAdd1Row) Me.Rows.Add(row) End Sub _ Public Overloads Function AddshipAdd1Row(ByVal Column1 As String) As shipAdd1Row Dim rowshipAdd1Row As shipAdd1Row = CType(Me.NewRow,shipAdd1Row) Dim columnValuesArray() As Object = New Object() {Column1} rowshipAdd1Row.ItemArray = columnValuesArray Me.Rows.Add(rowshipAdd1Row) Return rowshipAdd1Row End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As shipAdd1DataTable = CType(MyBase.Clone,shipAdd1DataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New shipAdd1DataTable() End Function _ Friend Sub InitVars() Me.columnColumn1 = MyBase.Columns("Column1") End Sub _ Private Sub InitClass() Me.columnColumn1 = New Global.System.Data.DataColumn("Column1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnColumn1) Me.columnColumn1.ReadOnly = true Me.columnColumn1.MaxLength = 140 End Sub _ Public Function NewshipAdd1Row() As shipAdd1Row Return CType(Me.NewRow,shipAdd1Row) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New shipAdd1Row(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(shipAdd1Row) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.shipAdd1RowChangedEvent) Is Nothing) Then RaiseEvent shipAdd1RowChanged(Me, New shipAdd1RowChangeEvent(CType(e.Row,shipAdd1Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.shipAdd1RowChangingEvent) Is Nothing) Then RaiseEvent shipAdd1RowChanging(Me, New shipAdd1RowChangeEvent(CType(e.Row,shipAdd1Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.shipAdd1RowDeletedEvent) Is Nothing) Then RaiseEvent shipAdd1RowDeleted(Me, New shipAdd1RowChangeEvent(CType(e.Row,shipAdd1Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.shipAdd1RowDeletingEvent) Is Nothing) Then RaiseEvent shipAdd1RowDeleting(Me, New shipAdd1RowChangeEvent(CType(e.Row,shipAdd1Row), e.Action)) End If End Sub _ Public Sub RemoveshipAdd1Row(ByVal row As shipAdd1Row) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "shipAdd1DataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class shipAdd2DataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnColumn1 As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "shipAdd2" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Column1Column() As Global.System.Data.DataColumn Get Return Me.columnColumn1 End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As shipAdd2Row Get Return CType(Me.Rows(index),shipAdd2Row) End Get End Property _ Public Event shipAdd2RowChanging As shipAdd2RowChangeEventHandler _ Public Event shipAdd2RowChanged As shipAdd2RowChangeEventHandler _ Public Event shipAdd2RowDeleting As shipAdd2RowChangeEventHandler _ Public Event shipAdd2RowDeleted As shipAdd2RowChangeEventHandler _ Public Overloads Sub AddshipAdd2Row(ByVal row As shipAdd2Row) Me.Rows.Add(row) End Sub _ Public Overloads Function AddshipAdd2Row(ByVal Column1 As String) As shipAdd2Row Dim rowshipAdd2Row As shipAdd2Row = CType(Me.NewRow,shipAdd2Row) Dim columnValuesArray() As Object = New Object() {Column1} rowshipAdd2Row.ItemArray = columnValuesArray Me.Rows.Add(rowshipAdd2Row) Return rowshipAdd2Row End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As shipAdd2DataTable = CType(MyBase.Clone,shipAdd2DataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New shipAdd2DataTable() End Function _ Friend Sub InitVars() Me.columnColumn1 = MyBase.Columns("Column1") End Sub _ Private Sub InitClass() Me.columnColumn1 = New Global.System.Data.DataColumn("Column1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnColumn1) Me.columnColumn1.ReadOnly = true Me.columnColumn1.MaxLength = 119 End Sub _ Public Function NewshipAdd2Row() As shipAdd2Row Return CType(Me.NewRow,shipAdd2Row) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New shipAdd2Row(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(shipAdd2Row) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.shipAdd2RowChangedEvent) Is Nothing) Then RaiseEvent shipAdd2RowChanged(Me, New shipAdd2RowChangeEvent(CType(e.Row,shipAdd2Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.shipAdd2RowChangingEvent) Is Nothing) Then RaiseEvent shipAdd2RowChanging(Me, New shipAdd2RowChangeEvent(CType(e.Row,shipAdd2Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.shipAdd2RowDeletedEvent) Is Nothing) Then RaiseEvent shipAdd2RowDeleted(Me, New shipAdd2RowChangeEvent(CType(e.Row,shipAdd2Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.shipAdd2RowDeletingEvent) Is Nothing) Then RaiseEvent shipAdd2RowDeleting(Me, New shipAdd2RowChangeEvent(CType(e.Row,shipAdd2Row), e.Action)) End If End Sub _ Public Sub RemoveshipAdd2Row(ByVal row As shipAdd2Row) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "shipAdd2DataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class shipAdd3DataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnColumn1 As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "shipAdd3" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property Column1Column() As Global.System.Data.DataColumn Get Return Me.columnColumn1 End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As shipAdd3Row Get Return CType(Me.Rows(index),shipAdd3Row) End Get End Property _ Public Event shipAdd3RowChanging As shipAdd3RowChangeEventHandler _ Public Event shipAdd3RowChanged As shipAdd3RowChangeEventHandler _ Public Event shipAdd3RowDeleting As shipAdd3RowChangeEventHandler _ Public Event shipAdd3RowDeleted As shipAdd3RowChangeEventHandler _ Public Overloads Sub AddshipAdd3Row(ByVal row As shipAdd3Row) Me.Rows.Add(row) End Sub _ Public Overloads Function AddshipAdd3Row(ByVal Column1 As String) As shipAdd3Row Dim rowshipAdd3Row As shipAdd3Row = CType(Me.NewRow,shipAdd3Row) Dim columnValuesArray() As Object = New Object() {Column1} rowshipAdd3Row.ItemArray = columnValuesArray Me.Rows.Add(rowshipAdd3Row) Return rowshipAdd3Row End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As shipAdd3DataTable = CType(MyBase.Clone,shipAdd3DataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New shipAdd3DataTable() End Function _ Friend Sub InitVars() Me.columnColumn1 = MyBase.Columns("Column1") End Sub _ Private Sub InitClass() Me.columnColumn1 = New Global.System.Data.DataColumn("Column1", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnColumn1) Me.columnColumn1.ReadOnly = true Me.columnColumn1.MaxLength = 70 End Sub _ Public Function NewshipAdd3Row() As shipAdd3Row Return CType(Me.NewRow,shipAdd3Row) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New shipAdd3Row(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(shipAdd3Row) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.shipAdd3RowChangedEvent) Is Nothing) Then RaiseEvent shipAdd3RowChanged(Me, New shipAdd3RowChangeEvent(CType(e.Row,shipAdd3Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.shipAdd3RowChangingEvent) Is Nothing) Then RaiseEvent shipAdd3RowChanging(Me, New shipAdd3RowChangeEvent(CType(e.Row,shipAdd3Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.shipAdd3RowDeletedEvent) Is Nothing) Then RaiseEvent shipAdd3RowDeleted(Me, New shipAdd3RowChangeEvent(CType(e.Row,shipAdd3Row), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.shipAdd3RowDeletingEvent) Is Nothing) Then RaiseEvent shipAdd3RowDeleting(Me, New shipAdd3RowChangeEvent(CType(e.Row,shipAdd3Row), e.Action)) End If End Sub _ Public Sub RemoveshipAdd3Row(ByVal row As shipAdd3Row) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "shipAdd3DataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents the strongly named DataTable class. ''' _ Partial Public Class validatePOTransferDataTable Inherits Global.System.Data.DataTable Implements Global.System.Collections.IEnumerable Private columnpartOldPo As Global.System.Data.DataColumn Private columnpartNewPo As Global.System.Data.DataColumn Private columncountOldPO As Global.System.Data.DataColumn Private columnopenNewPo As Global.System.Data.DataColumn _ Public Sub New() MyBase.New Me.TableName = "validatePOTransfer" Me.BeginInit Me.InitClass Me.EndInit End Sub _ Friend Sub New(ByVal table As Global.System.Data.DataTable) MyBase.New Me.TableName = table.TableName If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End If If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity End Sub _ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) MyBase.New(info, context) Me.InitVars End Sub _ Public ReadOnly Property partOldPoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartOldPo End Get End Property _ Public ReadOnly Property partNewPoColumn() As Global.System.Data.DataColumn Get Return Me.columnpartNewPo End Get End Property _ Public ReadOnly Property countOldPOColumn() As Global.System.Data.DataColumn Get Return Me.columncountOldPO End Get End Property _ Public ReadOnly Property openNewPoColumn() As Global.System.Data.DataColumn Get Return Me.columnopenNewPo End Get End Property _ Public ReadOnly Property Count() As Integer Get Return Me.Rows.Count End Get End Property _ Public Default ReadOnly Property Item(ByVal index As Integer) As validatePOTransferRow Get Return CType(Me.Rows(index),validatePOTransferRow) End Get End Property _ Public Event validatePOTransferRowChanging As validatePOTransferRowChangeEventHandler _ Public Event validatePOTransferRowChanged As validatePOTransferRowChangeEventHandler _ Public Event validatePOTransferRowDeleting As validatePOTransferRowChangeEventHandler _ Public Event validatePOTransferRowDeleted As validatePOTransferRowChangeEventHandler _ Public Overloads Sub AddvalidatePOTransferRow(ByVal row As validatePOTransferRow) Me.Rows.Add(row) End Sub _ Public Overloads Function AddvalidatePOTransferRow(ByVal partOldPo As String, ByVal partNewPo As String, ByVal countOldPO As Integer, ByVal openNewPo As Decimal) As validatePOTransferRow Dim rowvalidatePOTransferRow As validatePOTransferRow = CType(Me.NewRow,validatePOTransferRow) Dim columnValuesArray() As Object = New Object() {partOldPo, partNewPo, countOldPO, openNewPo} rowvalidatePOTransferRow.ItemArray = columnValuesArray Me.Rows.Add(rowvalidatePOTransferRow) Return rowvalidatePOTransferRow End Function _ Public Overridable Function GetEnumerator() As Global.System.Collections.IEnumerator Implements Global.System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function _ Public Overrides Function Clone() As Global.System.Data.DataTable Dim cln As validatePOTransferDataTable = CType(MyBase.Clone,validatePOTransferDataTable) cln.InitVars Return cln End Function _ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable Return New validatePOTransferDataTable() End Function _ Friend Sub InitVars() Me.columnpartOldPo = MyBase.Columns("partOldPo") Me.columnpartNewPo = MyBase.Columns("partNewPo") Me.columncountOldPO = MyBase.Columns("countOldPO") Me.columnopenNewPo = MyBase.Columns("openNewPo") End Sub _ Private Sub InitClass() Me.columnpartOldPo = New Global.System.Data.DataColumn("partOldPo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartOldPo) Me.columnpartNewPo = New Global.System.Data.DataColumn("partNewPo", GetType(String), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnpartNewPo) Me.columncountOldPO = New Global.System.Data.DataColumn("countOldPO", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columncountOldPO) Me.columnopenNewPo = New Global.System.Data.DataColumn("openNewPo", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element) MyBase.Columns.Add(Me.columnopenNewPo) Me.columnpartOldPo.ReadOnly = true Me.columnpartOldPo.MaxLength = 50 Me.columnpartNewPo.ReadOnly = true Me.columnpartNewPo.MaxLength = 25 Me.columncountOldPO.ReadOnly = true Me.columnopenNewPo.ReadOnly = true End Sub _ Public Function NewvalidatePOTransferRow() As validatePOTransferRow Return CType(Me.NewRow,validatePOTransferRow) End Function _ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow Return New validatePOTransferRow(builder) End Function _ Protected Overrides Function GetRowType() As Global.System.Type Return GetType(validatePOTransferRow) End Function _ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.validatePOTransferRowChangedEvent) Is Nothing) Then RaiseEvent validatePOTransferRowChanged(Me, New validatePOTransferRowChangeEvent(CType(e.Row,validatePOTransferRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.validatePOTransferRowChangingEvent) Is Nothing) Then RaiseEvent validatePOTransferRowChanging(Me, New validatePOTransferRowChangeEvent(CType(e.Row,validatePOTransferRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.validatePOTransferRowDeletedEvent) Is Nothing) Then RaiseEvent validatePOTransferRowDeleted(Me, New validatePOTransferRowChangeEvent(CType(e.Row,validatePOTransferRow), e.Action)) End If End Sub _ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) MyBase.OnRowDeleting(e) If (Not (Me.validatePOTransferRowDeletingEvent) Is Nothing) Then RaiseEvent validatePOTransferRowDeleting(Me, New validatePOTransferRowChangeEvent(CType(e.Row,validatePOTransferRow), e.Action)) End If End Sub _ Public Sub RemovevalidatePOTransferRow(ByVal row As validatePOTransferRow) Me.Rows.Remove(row) End Sub _ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() Dim ds As EpsonDataSet1 = New EpsonDataSet1() Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any1.Namespace = "http://www.w3.org/2001/XMLSchema" any1.MinOccurs = New Decimal(0) any1.MaxOccurs = Decimal.MaxValue any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any1) Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" any2.MinOccurs = New Decimal(1) any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax sequence.Items.Add(any2) Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute1.Name = "namespace" attribute1.FixedValue = ds.Namespace type.Attributes.Add(attribute1) Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() attribute2.Name = "tableTypeName" attribute2.FixedValue = "validatePOTransferDataTable" type.Attributes.Add(attribute2) type.Particle = sequence Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable If xs.Contains(dsSchema.TargetNamespace) Then Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() Try Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing dsSchema.Write(s1) Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator Do While schemas.MoveNext schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) s2.SetLength(0) schema.Write(s2) If (s1.Length = s2.Length) Then s1.Position = 0 s2.Position = 0 Do While ((s1.Position <> s1.Length) _ AndAlso (s1.ReadByte = s2.ReadByte)) Loop If (s1.Position = s1.Length) Then Return type End If End If Loop Finally If (Not (s1) Is Nothing) Then s1.Close End If If (Not (s2) Is Nothing) Then s2.Close End If End Try End If xs.Add(dsSchema) Return type End Function End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class AOIQ_TempRow Inherits Global.System.Data.DataRow Private tableAOIQ_Temp As AOIQ_TempDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableAOIQ_Temp = CType(Me.Table,AOIQ_TempDataTable) End Sub _ Public Property Stage() As String Get Return CType(Me(Me.tableAOIQ_Temp.StageColumn),String) End Get Set Me(Me.tableAOIQ_Temp.StageColumn) = value End Set End Property _ Public Property Qty() As Integer Get Try Return CType(Me(Me.tableAOIQ_Temp.QtyColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Qty' in table 'AOIQ_Temp' is DBNull.", e) End Try End Get Set Me(Me.tableAOIQ_Temp.QtyColumn) = value End Set End Property _ Public Function IsQtyNull() As Boolean Return Me.IsNull(Me.tableAOIQ_Temp.QtyColumn) End Function _ Public Sub SetQtyNull() Me(Me.tableAOIQ_Temp.QtyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class batchRow Inherits Global.System.Data.DataRow Private tablebatch As batchDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablebatch = CType(Me.Table,batchDataTable) End Sub _ Public Property batchId() As Integer Get Return CType(Me(Me.tablebatch.batchIdColumn),Integer) End Get Set Me(Me.tablebatch.batchIdColumn) = value End Set End Property _ Public Property batchNo() As String Get Try Return CType(Me(Me.tablebatch.batchNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'batchNo' in table 'batch' is DBNull.", e) End Try End Get Set Me(Me.tablebatch.batchNoColumn) = value End Set End Property _ Public Property partNo() As String Get Try Return CType(Me(Me.tablebatch.partNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partNo' in table 'batch' is DBNull.", e) End Try End Get Set Me(Me.tablebatch.partNoColumn) = value End Set End Property _ Public Property line() As Integer Get Try Return CType(Me(Me.tablebatch.lineColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'line' in table 'batch' is DBNull.", e) End Try End Get Set Me(Me.tablebatch.lineColumn) = value End Set End Property _ Public Property quantity() As Integer Get Try Return CType(Me(Me.tablebatch.quantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'batch' is DBNull.", e) End Try End Get Set Me(Me.tablebatch.quantityColumn) = value End Set End Property _ Public Property prefix() As String Get Try Return CType(Me(Me.tablebatch.prefixColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'prefix' in table 'batch' is DBNull.", e) End Try End Get Set Me(Me.tablebatch.prefixColumn) = value End Set End Property _ Public Property suffix() As Integer Get Try Return CType(Me(Me.tablebatch.suffixColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'suffix' in table 'batch' is DBNull.", e) End Try End Get Set Me(Me.tablebatch.suffixColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablebatch.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'batch' is DBNull.", e) End Try End Get Set Me(Me.tablebatch.lastupdatedbyColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablebatch.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'batch' is DBNull.", e) End Try End Get Set Me(Me.tablebatch.lastupdateColumn) = value End Set End Property _ Public Function IsbatchNoNull() As Boolean Return Me.IsNull(Me.tablebatch.batchNoColumn) End Function _ Public Sub SetbatchNoNull() Me(Me.tablebatch.batchNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartNoNull() As Boolean Return Me.IsNull(Me.tablebatch.partNoColumn) End Function _ Public Sub SetpartNoNull() Me(Me.tablebatch.partNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslineNull() As Boolean Return Me.IsNull(Me.tablebatch.lineColumn) End Function _ Public Sub SetlineNull() Me(Me.tablebatch.lineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablebatch.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablebatch.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsprefixNull() As Boolean Return Me.IsNull(Me.tablebatch.prefixColumn) End Function _ Public Sub SetprefixNull() Me(Me.tablebatch.prefixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssuffixNull() As Boolean Return Me.IsNull(Me.tablebatch.suffixColumn) End Function _ Public Sub SetsuffixNull() Me(Me.tablebatch.suffixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablebatch.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablebatch.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablebatch.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablebatch.lastupdateColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class cardRow Inherits Global.System.Data.DataRow Private tablecard As cardDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablecard = CType(Me.Table,cardDataTable) End Sub _ Public Property cardno() As String Get Return CType(Me(Me.tablecard.cardnoColumn),String) End Get Set Me(Me.tablecard.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablecard.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.serialnoColumn) = value End Set End Property _ Public Property ptno() As String Get Try Return CType(Me(Me.tablecard.ptnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptno' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.ptnoColumn) = value End Set End Property _ Public Property lotno() As String Get Try Return CType(Me(Me.tablecard.lotnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lotno' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.lotnoColumn) = value End Set End Property _ Public Property partno() As String Get Try Return CType(Me(Me.tablecard.partnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partno' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.partnoColumn) = value End Set End Property _ Public Property revision() As String Get Try Return CType(Me(Me.tablecard.revisionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'revision' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.revisionColumn) = value End Set End Property _ Public Property linecode() As Integer Get Try Return CType(Me(Me.tablecard.linecodeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'linecode' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.linecodeColumn) = value End Set End Property _ Public Property holdflag() As Integer Get Try Return CType(Me(Me.tablecard.holdflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'holdflag' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.holdflagColumn) = value End Set End Property _ Public Property packflag() As Integer Get Try Return CType(Me(Me.tablecard.packflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'packflag' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.packflagColumn) = value End Set End Property _ Public Property shipflag() As Integer Get Try Return CType(Me(Me.tablecard.shipflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipflag' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.shipflagColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablecard.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.statusColumn) = value End Set End Property _ Public Property lottype() As String Get Try Return CType(Me(Me.tablecard.lottypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lottype' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.lottypeColumn) = value End Set End Property _ Public Property curtstage() As String Get Try Return CType(Me(Me.tablecard.curtstageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'curtstage' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.curtstageColumn) = value End Set End Property _ Public Property starttime() As Date Get Try Return CType(Me(Me.tablecard.starttimeColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttime' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.starttimeColumn) = value End Set End Property _ Public Property starttimeRef() As Date Get Try Return CType(Me(Me.tablecard.starttimeRefColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttimeRef' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.starttimeRefColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablecard.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablecard.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'card' is DBNull.", e) End Try End Get Set Me(Me.tablecard.lastupdatedbyColumn) = value End Set End Property _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablecard.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablecard.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptnoNull() As Boolean Return Me.IsNull(Me.tablecard.ptnoColumn) End Function _ Public Sub SetptnoNull() Me(Me.tablecard.ptnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslotnoNull() As Boolean Return Me.IsNull(Me.tablecard.lotnoColumn) End Function _ Public Sub SetlotnoNull() Me(Me.tablecard.lotnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartnoNull() As Boolean Return Me.IsNull(Me.tablecard.partnoColumn) End Function _ Public Sub SetpartnoNull() Me(Me.tablecard.partnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrevisionNull() As Boolean Return Me.IsNull(Me.tablecard.revisionColumn) End Function _ Public Sub SetrevisionNull() Me(Me.tablecard.revisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslinecodeNull() As Boolean Return Me.IsNull(Me.tablecard.linecodeColumn) End Function _ Public Sub SetlinecodeNull() Me(Me.tablecard.linecodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsholdflagNull() As Boolean Return Me.IsNull(Me.tablecard.holdflagColumn) End Function _ Public Sub SetholdflagNull() Me(Me.tablecard.holdflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspackflagNull() As Boolean Return Me.IsNull(Me.tablecard.packflagColumn) End Function _ Public Sub SetpackflagNull() Me(Me.tablecard.packflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipflagNull() As Boolean Return Me.IsNull(Me.tablecard.shipflagColumn) End Function _ Public Sub SetshipflagNull() Me(Me.tablecard.shipflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablecard.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablecard.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslottypeNull() As Boolean Return Me.IsNull(Me.tablecard.lottypeColumn) End Function _ Public Sub SetlottypeNull() Me(Me.tablecard.lottypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscurtstageNull() As Boolean Return Me.IsNull(Me.tablecard.curtstageColumn) End Function _ Public Sub SetcurtstageNull() Me(Me.tablecard.curtstageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeNull() As Boolean Return Me.IsNull(Me.tablecard.starttimeColumn) End Function _ Public Sub SetstarttimeNull() Me(Me.tablecard.starttimeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeRefNull() As Boolean Return Me.IsNull(Me.tablecard.starttimeRefColumn) End Function _ Public Sub SetstarttimeRefNull() Me(Me.tablecard.starttimeRefColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablecard.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablecard.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablecard.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablecard.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class card_backupRow Inherits Global.System.Data.DataRow Private tablecard_backup As card_backupDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablecard_backup = CType(Me.Table,card_backupDataTable) End Sub _ Public Property cardno() As String Get Return CType(Me(Me.tablecard_backup.cardnoColumn),String) End Get Set Me(Me.tablecard_backup.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablecard_backup.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.serialnoColumn) = value End Set End Property _ Public Property ptno() As String Get Try Return CType(Me(Me.tablecard_backup.ptnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptno' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.ptnoColumn) = value End Set End Property _ Public Property lotno() As String Get Try Return CType(Me(Me.tablecard_backup.lotnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lotno' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.lotnoColumn) = value End Set End Property _ Public Property partno() As String Get Try Return CType(Me(Me.tablecard_backup.partnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partno' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.partnoColumn) = value End Set End Property _ Public Property revision() As String Get Try Return CType(Me(Me.tablecard_backup.revisionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'revision' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.revisionColumn) = value End Set End Property _ Public Property linecode() As Integer Get Try Return CType(Me(Me.tablecard_backup.linecodeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'linecode' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.linecodeColumn) = value End Set End Property _ Public Property holdflag() As Integer Get Try Return CType(Me(Me.tablecard_backup.holdflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'holdflag' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.holdflagColumn) = value End Set End Property _ Public Property packflag() As Integer Get Try Return CType(Me(Me.tablecard_backup.packflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'packflag' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.packflagColumn) = value End Set End Property _ Public Property shipflag() As Integer Get Try Return CType(Me(Me.tablecard_backup.shipflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipflag' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.shipflagColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablecard_backup.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.statusColumn) = value End Set End Property _ Public Property lottype() As String Get Try Return CType(Me(Me.tablecard_backup.lottypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lottype' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.lottypeColumn) = value End Set End Property _ Public Property curtstage() As String Get Try Return CType(Me(Me.tablecard_backup.curtstageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'curtstage' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.curtstageColumn) = value End Set End Property _ Public Property starttime() As Date Get Try Return CType(Me(Me.tablecard_backup.starttimeColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttime' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.starttimeColumn) = value End Set End Property _ Public Property starttimeRef() As Date Get Try Return CType(Me(Me.tablecard_backup.starttimeRefColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttimeRef' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.starttimeRefColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablecard_backup.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablecard_backup.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'card_backup' is DBNull.", e) End Try End Get Set Me(Me.tablecard_backup.lastupdatedbyColumn) = value End Set End Property _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablecard_backup.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablecard_backup.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptnoNull() As Boolean Return Me.IsNull(Me.tablecard_backup.ptnoColumn) End Function _ Public Sub SetptnoNull() Me(Me.tablecard_backup.ptnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslotnoNull() As Boolean Return Me.IsNull(Me.tablecard_backup.lotnoColumn) End Function _ Public Sub SetlotnoNull() Me(Me.tablecard_backup.lotnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartnoNull() As Boolean Return Me.IsNull(Me.tablecard_backup.partnoColumn) End Function _ Public Sub SetpartnoNull() Me(Me.tablecard_backup.partnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrevisionNull() As Boolean Return Me.IsNull(Me.tablecard_backup.revisionColumn) End Function _ Public Sub SetrevisionNull() Me(Me.tablecard_backup.revisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslinecodeNull() As Boolean Return Me.IsNull(Me.tablecard_backup.linecodeColumn) End Function _ Public Sub SetlinecodeNull() Me(Me.tablecard_backup.linecodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsholdflagNull() As Boolean Return Me.IsNull(Me.tablecard_backup.holdflagColumn) End Function _ Public Sub SetholdflagNull() Me(Me.tablecard_backup.holdflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspackflagNull() As Boolean Return Me.IsNull(Me.tablecard_backup.packflagColumn) End Function _ Public Sub SetpackflagNull() Me(Me.tablecard_backup.packflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipflagNull() As Boolean Return Me.IsNull(Me.tablecard_backup.shipflagColumn) End Function _ Public Sub SetshipflagNull() Me(Me.tablecard_backup.shipflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablecard_backup.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablecard_backup.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslottypeNull() As Boolean Return Me.IsNull(Me.tablecard_backup.lottypeColumn) End Function _ Public Sub SetlottypeNull() Me(Me.tablecard_backup.lottypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscurtstageNull() As Boolean Return Me.IsNull(Me.tablecard_backup.curtstageColumn) End Function _ Public Sub SetcurtstageNull() Me(Me.tablecard_backup.curtstageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeNull() As Boolean Return Me.IsNull(Me.tablecard_backup.starttimeColumn) End Function _ Public Sub SetstarttimeNull() Me(Me.tablecard_backup.starttimeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeRefNull() As Boolean Return Me.IsNull(Me.tablecard_backup.starttimeRefColumn) End Function _ Public Sub SetstarttimeRefNull() Me(Me.tablecard_backup.starttimeRefColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablecard_backup.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablecard_backup.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablecard_backup.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablecard_backup.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class card_HistRow Inherits Global.System.Data.DataRow Private tablecard_Hist As card_HistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablecard_Hist = CType(Me.Table,card_HistDataTable) End Sub _ Public Property cardno() As String Get Try Return CType(Me(Me.tablecard_Hist.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablecard_Hist.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.serialnoColumn) = value End Set End Property _ Public Property ptno() As String Get Try Return CType(Me(Me.tablecard_Hist.ptnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptno' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.ptnoColumn) = value End Set End Property _ Public Property lotno() As String Get Try Return CType(Me(Me.tablecard_Hist.lotnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lotno' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.lotnoColumn) = value End Set End Property _ Public Property partno() As String Get Try Return CType(Me(Me.tablecard_Hist.partnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partno' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.partnoColumn) = value End Set End Property _ Public Property revision() As String Get Try Return CType(Me(Me.tablecard_Hist.revisionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'revision' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.revisionColumn) = value End Set End Property _ Public Property linecode() As Integer Get Try Return CType(Me(Me.tablecard_Hist.linecodeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'linecode' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.linecodeColumn) = value End Set End Property _ Public Property holdflag() As Integer Get Try Return CType(Me(Me.tablecard_Hist.holdflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'holdflag' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.holdflagColumn) = value End Set End Property _ Public Property packflag() As Integer Get Try Return CType(Me(Me.tablecard_Hist.packflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'packflag' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.packflagColumn) = value End Set End Property _ Public Property shipflag() As Integer Get Try Return CType(Me(Me.tablecard_Hist.shipflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipflag' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.shipflagColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablecard_Hist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.statusColumn) = value End Set End Property _ Public Property lottype() As String Get Try Return CType(Me(Me.tablecard_Hist.lottypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lottype' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.lottypeColumn) = value End Set End Property _ Public Property curtstage() As String Get Try Return CType(Me(Me.tablecard_Hist.curtstageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'curtstage' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.curtstageColumn) = value End Set End Property _ Public Property starttime() As Date Get Try Return CType(Me(Me.tablecard_Hist.starttimeColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttime' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.starttimeColumn) = value End Set End Property _ Public Property starttimeRef() As Date Get Try Return CType(Me(Me.tablecard_Hist.starttimeRefColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttimeRef' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.starttimeRefColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablecard_Hist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablecard_Hist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'card_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablecard_Hist.lastupdatedbyColumn) = value End Set End Property _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablecard_Hist.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablecard_Hist.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptnoNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.ptnoColumn) End Function _ Public Sub SetptnoNull() Me(Me.tablecard_Hist.ptnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslotnoNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.lotnoColumn) End Function _ Public Sub SetlotnoNull() Me(Me.tablecard_Hist.lotnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartnoNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.partnoColumn) End Function _ Public Sub SetpartnoNull() Me(Me.tablecard_Hist.partnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrevisionNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.revisionColumn) End Function _ Public Sub SetrevisionNull() Me(Me.tablecard_Hist.revisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslinecodeNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.linecodeColumn) End Function _ Public Sub SetlinecodeNull() Me(Me.tablecard_Hist.linecodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsholdflagNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.holdflagColumn) End Function _ Public Sub SetholdflagNull() Me(Me.tablecard_Hist.holdflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspackflagNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.packflagColumn) End Function _ Public Sub SetpackflagNull() Me(Me.tablecard_Hist.packflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipflagNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.shipflagColumn) End Function _ Public Sub SetshipflagNull() Me(Me.tablecard_Hist.shipflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablecard_Hist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslottypeNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.lottypeColumn) End Function _ Public Sub SetlottypeNull() Me(Me.tablecard_Hist.lottypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscurtstageNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.curtstageColumn) End Function _ Public Sub SetcurtstageNull() Me(Me.tablecard_Hist.curtstageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.starttimeColumn) End Function _ Public Sub SetstarttimeNull() Me(Me.tablecard_Hist.starttimeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeRefNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.starttimeRefColumn) End Function _ Public Sub SetstarttimeRefNull() Me(Me.tablecard_Hist.starttimeRefColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablecard_Hist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablecard_Hist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablecard_Hist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class cardHistRow Inherits Global.System.Data.DataRow Private tablecardHist As cardHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablecardHist = CType(Me.Table,cardHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablecardHist.lineNumColumn),Long) End Get Set Me(Me.tablecardHist.lineNumColumn) = value End Set End Property _ Public Property cardno() As String Get Try Return CType(Me(Me.tablecardHist.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablecardHist.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.serialnoColumn) = value End Set End Property _ Public Property partno() As String Get Try Return CType(Me(Me.tablecardHist.partnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partno' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.partnoColumn) = value End Set End Property _ Public Property revision() As String Get Try Return CType(Me(Me.tablecardHist.revisionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'revision' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.revisionColumn) = value End Set End Property _ Public Property linecode() As Integer Get Try Return CType(Me(Me.tablecardHist.linecodeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'linecode' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.linecodeColumn) = value End Set End Property _ Public Property holdflag() As Integer Get Try Return CType(Me(Me.tablecardHist.holdflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'holdflag' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.holdflagColumn) = value End Set End Property _ Public Property packflag() As Integer Get Try Return CType(Me(Me.tablecardHist.packflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'packflag' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.packflagColumn) = value End Set End Property _ Public Property shipflag() As Integer Get Try Return CType(Me(Me.tablecardHist.shipflagColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipflag' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.shipflagColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablecardHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.statusColumn) = value End Set End Property _ Public Property lottype() As String Get Try Return CType(Me(Me.tablecardHist.lottypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lottype' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.lottypeColumn) = value End Set End Property _ Public Property curtstage() As String Get Try Return CType(Me(Me.tablecardHist.curtstageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'curtstage' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.curtstageColumn) = value End Set End Property _ Public Property starttime() As Date Get Try Return CType(Me(Me.tablecardHist.starttimeColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttime' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.starttimeColumn) = value End Set End Property _ Public Property starttimeRef() As Date Get Try Return CType(Me(Me.tablecardHist.starttimeRefColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttimeRef' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.starttimeRefColumn) = value End Set End Property _ Public Property action() As String Get Try Return CType(Me(Me.tablecardHist.actionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'action' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.actionColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablecardHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablecardHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'cardHist' is DBNull.", e) End Try End Get Set Me(Me.tablecardHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablecardHist.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablecardHist.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablecardHist.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablecardHist.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartnoNull() As Boolean Return Me.IsNull(Me.tablecardHist.partnoColumn) End Function _ Public Sub SetpartnoNull() Me(Me.tablecardHist.partnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrevisionNull() As Boolean Return Me.IsNull(Me.tablecardHist.revisionColumn) End Function _ Public Sub SetrevisionNull() Me(Me.tablecardHist.revisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslinecodeNull() As Boolean Return Me.IsNull(Me.tablecardHist.linecodeColumn) End Function _ Public Sub SetlinecodeNull() Me(Me.tablecardHist.linecodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsholdflagNull() As Boolean Return Me.IsNull(Me.tablecardHist.holdflagColumn) End Function _ Public Sub SetholdflagNull() Me(Me.tablecardHist.holdflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspackflagNull() As Boolean Return Me.IsNull(Me.tablecardHist.packflagColumn) End Function _ Public Sub SetpackflagNull() Me(Me.tablecardHist.packflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipflagNull() As Boolean Return Me.IsNull(Me.tablecardHist.shipflagColumn) End Function _ Public Sub SetshipflagNull() Me(Me.tablecardHist.shipflagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablecardHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablecardHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslottypeNull() As Boolean Return Me.IsNull(Me.tablecardHist.lottypeColumn) End Function _ Public Sub SetlottypeNull() Me(Me.tablecardHist.lottypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscurtstageNull() As Boolean Return Me.IsNull(Me.tablecardHist.curtstageColumn) End Function _ Public Sub SetcurtstageNull() Me(Me.tablecardHist.curtstageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeNull() As Boolean Return Me.IsNull(Me.tablecardHist.starttimeColumn) End Function _ Public Sub SetstarttimeNull() Me(Me.tablecardHist.starttimeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeRefNull() As Boolean Return Me.IsNull(Me.tablecardHist.starttimeRefColumn) End Function _ Public Sub SetstarttimeRefNull() Me(Me.tablecardHist.starttimeRefColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactionNull() As Boolean Return Me.IsNull(Me.tablecardHist.actionColumn) End Function _ Public Sub SetactionNull() Me(Me.tablecardHist.actionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablecardHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablecardHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablecardHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablecardHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class component_partsRow Inherits Global.System.Data.DataRow Private tablecomponent_parts As component_partsDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablecomponent_parts = CType(Me.Table,component_partsDataTable) End Sub _ Public Property parent() As String Get Try Return CType(Me(Me.tablecomponent_parts.parentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'parent' in table 'component_parts' is DBNull.", e) End Try End Get Set Me(Me.tablecomponent_parts.parentColumn) = value End Set End Property _ Public Property component() As String Get Try Return CType(Me(Me.tablecomponent_parts.componentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'component' in table 'component_parts' is DBNull.", e) End Try End Get Set Me(Me.tablecomponent_parts.componentColumn) = value End Set End Property _ Public Function IsparentNull() As Boolean Return Me.IsNull(Me.tablecomponent_parts.parentColumn) End Function _ Public Sub SetparentNull() Me(Me.tablecomponent_parts.parentColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscomponentNull() As Boolean Return Me.IsNull(Me.tablecomponent_parts.componentColumn) End Function _ Public Sub SetcomponentNull() Me(Me.tablecomponent_parts.componentColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class CTSRow Inherits Global.System.Data.DataRow Private tableCTS As CTSDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableCTS = CType(Me.Table,CTSDataTable) End Sub _ Public Property serialno() As String Get Try Return CType(Me(Me.tableCTS.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'CTS' is DBNull.", e) End Try End Get Set Me(Me.tableCTS.serialnoColumn) = value End Set End Property _ Public Property location() As String Get Try Return CType(Me(Me.tableCTS.locationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'location' in table 'CTS' is DBNull.", e) End Try End Get Set Me(Me.tableCTS.locationColumn) = value End Set End Property _ Public Property partno() As String Get Try Return CType(Me(Me.tableCTS.partnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partno' in table 'CTS' is DBNull.", e) End Try End Get Set Me(Me.tableCTS.partnoColumn) = value End Set End Property _ Public Property lotnumber() As String Get Try Return CType(Me(Me.tableCTS.lotnumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lotnumber' in table 'CTS' is DBNull.", e) End Try End Get Set Me(Me.tableCTS.lotnumberColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tableCTS.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'CTS' is DBNull.", e) End Try End Get Set Me(Me.tableCTS.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tableCTS.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'CTS' is DBNull.", e) End Try End Get Set Me(Me.tableCTS.lastupdatedbyColumn) = value End Set End Property _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tableCTS.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tableCTS.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslocationNull() As Boolean Return Me.IsNull(Me.tableCTS.locationColumn) End Function _ Public Sub SetlocationNull() Me(Me.tableCTS.locationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartnoNull() As Boolean Return Me.IsNull(Me.tableCTS.partnoColumn) End Function _ Public Sub SetpartnoNull() Me(Me.tableCTS.partnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslotnumberNull() As Boolean Return Me.IsNull(Me.tableCTS.lotnumberColumn) End Function _ Public Sub SetlotnumberNull() Me(Me.tableCTS.lotnumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tableCTS.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tableCTS.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tableCTS.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tableCTS.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class defectCatProdRow Inherits Global.System.Data.DataRow Private tabledefectCatProd As defectCatProdDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tabledefectCatProd = CType(Me.Table,defectCatProdDataTable) End Sub _ Public Property defectCatCode() As String Get Return CType(Me(Me.tabledefectCatProd.defectCatCodeColumn),String) End Get Set Me(Me.tabledefectCatProd.defectCatCodeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tabledefectCatProd.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'defectCatProd' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProd.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tabledefectCatProd.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'defectCatProd' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProd.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tabledefectCatProd.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'defectCatProd' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProd.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tabledefectCatProd.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'defectCatProd' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProd.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tabledefectCatProd.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tabledefectCatProd.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tabledefectCatProd.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tabledefectCatProd.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tabledefectCatProd.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tabledefectCatProd.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tabledefectCatProd.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tabledefectCatProd.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class defectCatProdHistRow Inherits Global.System.Data.DataRow Private tabledefectCatProdHist As defectCatProdHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tabledefectCatProdHist = CType(Me.Table,defectCatProdHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tabledefectCatProdHist.lineNumColumn),Long) End Get Set Me(Me.tabledefectCatProdHist.lineNumColumn) = value End Set End Property _ Public Property defectCatCode() As String Get Try Return CType(Me(Me.tabledefectCatProdHist.defectCatCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'defectCatCode' in table 'defectCatProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProdHist.defectCatCodeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tabledefectCatProdHist.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'defectCatProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProdHist.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tabledefectCatProdHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'defectCatProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProdHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tabledefectCatProdHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'defectCatProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProdHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tabledefectCatProdHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'defectCatProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProdHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tabledefectCatProdHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'defectCatProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatProdHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdefectCatCodeNull() As Boolean Return Me.IsNull(Me.tabledefectCatProdHist.defectCatCodeColumn) End Function _ Public Sub SetdefectCatCodeNull() Me(Me.tabledefectCatProdHist.defectCatCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tabledefectCatProdHist.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tabledefectCatProdHist.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tabledefectCatProdHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tabledefectCatProdHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tabledefectCatProdHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tabledefectCatProdHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tabledefectCatProdHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tabledefectCatProdHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tabledefectCatProdHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tabledefectCatProdHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class defectCatQCRow Inherits Global.System.Data.DataRow Private tabledefectCatQC As defectCatQCDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tabledefectCatQC = CType(Me.Table,defectCatQCDataTable) End Sub _ Public Property defectCatCode() As String Get Return CType(Me(Me.tabledefectCatQC.defectCatCodeColumn),String) End Get Set Me(Me.tabledefectCatQC.defectCatCodeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tabledefectCatQC.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'defectCatQC' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQC.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tabledefectCatQC.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'defectCatQC' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQC.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tabledefectCatQC.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'defectCatQC' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQC.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tabledefectCatQC.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'defectCatQC' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQC.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tabledefectCatQC.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tabledefectCatQC.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tabledefectCatQC.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tabledefectCatQC.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tabledefectCatQC.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tabledefectCatQC.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tabledefectCatQC.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tabledefectCatQC.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class defectCatQCHistRow Inherits Global.System.Data.DataRow Private tabledefectCatQCHist As defectCatQCHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tabledefectCatQCHist = CType(Me.Table,defectCatQCHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tabledefectCatQCHist.lineNumColumn),Long) End Get Set Me(Me.tabledefectCatQCHist.lineNumColumn) = value End Set End Property _ Public Property defectCatCode() As String Get Try Return CType(Me(Me.tabledefectCatQCHist.defectCatCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'defectCatCode' in table 'defectCatQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQCHist.defectCatCodeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tabledefectCatQCHist.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'defectCatQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQCHist.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tabledefectCatQCHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'defectCatQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQCHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tabledefectCatQCHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'defectCatQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQCHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tabledefectCatQCHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'defectCatQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQCHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tabledefectCatQCHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'defectCatQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectCatQCHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdefectCatCodeNull() As Boolean Return Me.IsNull(Me.tabledefectCatQCHist.defectCatCodeColumn) End Function _ Public Sub SetdefectCatCodeNull() Me(Me.tabledefectCatQCHist.defectCatCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tabledefectCatQCHist.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tabledefectCatQCHist.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tabledefectCatQCHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tabledefectCatQCHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tabledefectCatQCHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tabledefectCatQCHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tabledefectCatQCHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tabledefectCatQCHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tabledefectCatQCHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tabledefectCatQCHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class defectProdRow Inherits Global.System.Data.DataRow Private tabledefectProd As defectProdDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tabledefectProd = CType(Me.Table,defectProdDataTable) End Sub _ Public Property defectCode() As String Get Return CType(Me(Me.tabledefectProd.defectCodeColumn),String) End Get Set Me(Me.tabledefectProd.defectCodeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tabledefectProd.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'defectProd' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProd.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tabledefectProd.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'defectProd' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProd.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tabledefectProd.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'defectProd' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProd.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tabledefectProd.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'defectProd' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProd.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tabledefectProd.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tabledefectProd.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tabledefectProd.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tabledefectProd.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tabledefectProd.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tabledefectProd.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tabledefectProd.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tabledefectProd.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class defectProdHistRow Inherits Global.System.Data.DataRow Private tabledefectProdHist As defectProdHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tabledefectProdHist = CType(Me.Table,defectProdHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tabledefectProdHist.lineNumColumn),Long) End Get Set Me(Me.tabledefectProdHist.lineNumColumn) = value End Set End Property _ Public Property defectCode() As String Get Try Return CType(Me(Me.tabledefectProdHist.defectCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'defectCode' in table 'defectProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProdHist.defectCodeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tabledefectProdHist.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'defectProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProdHist.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tabledefectProdHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'defectProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProdHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tabledefectProdHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'defectProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProdHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tabledefectProdHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'defectProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProdHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tabledefectProdHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'defectProdHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectProdHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdefectCodeNull() As Boolean Return Me.IsNull(Me.tabledefectProdHist.defectCodeColumn) End Function _ Public Sub SetdefectCodeNull() Me(Me.tabledefectProdHist.defectCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tabledefectProdHist.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tabledefectProdHist.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tabledefectProdHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tabledefectProdHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tabledefectProdHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tabledefectProdHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tabledefectProdHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tabledefectProdHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tabledefectProdHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tabledefectProdHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class defectQCRow Inherits Global.System.Data.DataRow Private tabledefectQC As defectQCDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tabledefectQC = CType(Me.Table,defectQCDataTable) End Sub _ Public Property defectCode() As String Get Return CType(Me(Me.tabledefectQC.defectCodeColumn),String) End Get Set Me(Me.tabledefectQC.defectCodeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tabledefectQC.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'defectQC' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQC.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tabledefectQC.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'defectQC' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQC.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tabledefectQC.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'defectQC' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQC.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tabledefectQC.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'defectQC' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQC.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tabledefectQC.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tabledefectQC.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tabledefectQC.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tabledefectQC.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tabledefectQC.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tabledefectQC.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tabledefectQC.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tabledefectQC.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class defectQCHistRow Inherits Global.System.Data.DataRow Private tabledefectQCHist As defectQCHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tabledefectQCHist = CType(Me.Table,defectQCHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tabledefectQCHist.lineNumColumn),Long) End Get Set Me(Me.tabledefectQCHist.lineNumColumn) = value End Set End Property _ Public Property defectCode() As String Get Try Return CType(Me(Me.tabledefectQCHist.defectCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'defectCode' in table 'defectQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQCHist.defectCodeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tabledefectQCHist.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'defectQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQCHist.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tabledefectQCHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'defectQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQCHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tabledefectQCHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'defectQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQCHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tabledefectQCHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'defectQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQCHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tabledefectQCHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'defectQCHist' is DBNull.", e) End Try End Get Set Me(Me.tabledefectQCHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdefectCodeNull() As Boolean Return Me.IsNull(Me.tabledefectQCHist.defectCodeColumn) End Function _ Public Sub SetdefectCodeNull() Me(Me.tabledefectQCHist.defectCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tabledefectQCHist.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tabledefectQCHist.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tabledefectQCHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tabledefectQCHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tabledefectQCHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tabledefectQCHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tabledefectQCHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tabledefectQCHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tabledefectQCHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tabledefectQCHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class FA_NewPTRow Inherits Global.System.Data.DataRow Private tableFA_NewPT As FA_NewPTDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableFA_NewPT = CType(Me.Table,FA_NewPTDataTable) End Sub _ Public Property PTno() As String Get Return CType(Me(Me.tableFA_NewPT.PTnoColumn),String) End Get Set Me(Me.tableFA_NewPT.PTnoColumn) = value End Set End Property _ Public Property FAno() As String Get Return CType(Me(Me.tableFA_NewPT.FAnoColumn),String) End Get Set Me(Me.tableFA_NewPT.FAnoColumn) = value End Set End Property _ Public Property Quantity() As Integer Get Return CType(Me(Me.tableFA_NewPT.QuantityColumn),Integer) End Get Set Me(Me.tableFA_NewPT.QuantityColumn) = value End Set End Property _ Public Property RegisteredBy() As String Get Return CType(Me(Me.tableFA_NewPT.RegisteredByColumn),String) End Get Set Me(Me.tableFA_NewPT.RegisteredByColumn) = value End Set End Property _ Public Property RegisteredDate() As Date Get Return CType(Me(Me.tableFA_NewPT.RegisteredDateColumn),Date) End Get Set Me(Me.tableFA_NewPT.RegisteredDateColumn) = value End Set End Property End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class faNoRow Inherits Global.System.Data.DataRow Private tablefaNo As faNoDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablefaNo = CType(Me.Table,faNoDataTable) End Sub _ Public Property faId() As Integer Get Return CType(Me(Me.tablefaNo.faIdColumn),Integer) End Get Set Me(Me.tablefaNo.faIdColumn) = value End Set End Property _ Public Property faNo() As String Get Try Return CType(Me(Me.tablefaNo.faNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'faNo' in table 'faNo' is DBNull.", e) End Try End Get Set Me(Me.tablefaNo.faNoColumn) = value End Set End Property _ Public Property ptNo() As String Get Try Return CType(Me(Me.tablefaNo.ptNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptNo' in table 'faNo' is DBNull.", e) End Try End Get Set Me(Me.tablefaNo.ptNoColumn) = value End Set End Property _ Public Property suffix() As String Get Try Return CType(Me(Me.tablefaNo.suffixColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'suffix' in table 'faNo' is DBNull.", e) End Try End Get Set Me(Me.tablefaNo.suffixColumn) = value End Set End Property _ Public Property stage() As String Get Try Return CType(Me(Me.tablefaNo.stageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stage' in table 'faNo' is DBNull.", e) End Try End Get Set Me(Me.tablefaNo.stageColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablefaNo.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'faNo' is DBNull.", e) End Try End Get Set Me(Me.tablefaNo.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablefaNo.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'faNo' is DBNull.", e) End Try End Get Set Me(Me.tablefaNo.lastupdatedbyColumn) = value End Set End Property _ Public Property Quantity() As Integer Get Try Return CType(Me(Me.tablefaNo.QuantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Quantity' in table 'faNo' is DBNull.", e) End Try End Get Set Me(Me.tablefaNo.QuantityColumn) = value End Set End Property _ Public Property status() As Integer Get Try Return CType(Me(Me.tablefaNo.statusColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'faNo' is DBNull.", e) End Try End Get Set Me(Me.tablefaNo.statusColumn) = value End Set End Property _ Public Function IsfaNoNull() As Boolean Return Me.IsNull(Me.tablefaNo.faNoColumn) End Function _ Public Sub SetfaNoNull() Me(Me.tablefaNo.faNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptNoNull() As Boolean Return Me.IsNull(Me.tablefaNo.ptNoColumn) End Function _ Public Sub SetptNoNull() Me(Me.tablefaNo.ptNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssuffixNull() As Boolean Return Me.IsNull(Me.tablefaNo.suffixColumn) End Function _ Public Sub SetsuffixNull() Me(Me.tablefaNo.suffixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstageNull() As Boolean Return Me.IsNull(Me.tablefaNo.stageColumn) End Function _ Public Sub SetstageNull() Me(Me.tablefaNo.stageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablefaNo.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablefaNo.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablefaNo.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablefaNo.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsQuantityNull() As Boolean Return Me.IsNull(Me.tablefaNo.QuantityColumn) End Function _ Public Sub SetQuantityNull() Me(Me.tablefaNo.QuantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablefaNo.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablefaNo.statusColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class KITTINGRow Inherits Global.System.Data.DataRow Private tableKITTING As KITTINGDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableKITTING = CType(Me.Table,KITTINGDataTable) End Sub _ Public Property REV() As String Get Return CType(Me(Me.tableKITTING.REVColumn),String) End Get Set Me(Me.tableKITTING.REVColumn) = value End Set End Property _ Public Property PARTNO() As String Get Return CType(Me(Me.tableKITTING.PARTNOColumn),String) End Get Set Me(Me.tableKITTING.PARTNOColumn) = value End Set End Property _ Public Property DESC1() As String Get Return CType(Me(Me.tableKITTING.DESC1Column),String) End Get Set Me(Me.tableKITTING.DESC1Column) = value End Set End Property _ Public Property USAGE() As Double Get Try Return CType(Me(Me.tableKITTING.USAGEColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'USAGE' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.USAGEColumn) = value End Set End Property _ Public Property SPQ() As Double Get Try Return CType(Me(Me.tableKITTING.SPQColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SPQ' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.SPQColumn) = value End Set End Property _ Public Property _OPERATOR() As String Get Return CType(Me(Me.tableKITTING.OPERATORColumn),String) End Get Set Me(Me.tableKITTING.OPERATORColumn) = value End Set End Property _ Public Property KITTINGDATE() As Date Get Return CType(Me(Me.tableKITTING.KITTINGDATEColumn),Date) End Get Set Me(Me.tableKITTING.KITTINGDATEColumn) = value End Set End Property _ Public Property QTY() As Double Get Try Return CType(Me(Me.tableKITTING.QTYColumn),Double) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'QTY' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.QTYColumn) = value End Set End Property _ Public Property FEEDER() As String Get Try Return CType(Me(Me.tableKITTING.FEEDERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'FEEDER' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.FEEDERColumn) = value End Set End Property _ Public Property ACCOUNT() As String Get Try Return CType(Me(Me.tableKITTING.ACCOUNTColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ACCOUNT' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.ACCOUNTColumn) = value End Set End Property _ Public Property MACHINE() As String Get Try Return CType(Me(Me.tableKITTING.MACHINEColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'MACHINE' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.MACHINEColumn) = value End Set End Property _ Public Property MODEL() As String Get Try Return CType(Me(Me.tableKITTING.MODELColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'MODEL' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.MODELColumn) = value End Set End Property _ Public Property TYPE() As String Get Try Return CType(Me(Me.tableKITTING.TYPEColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TYPE' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.TYPEColumn) = value End Set End Property _ Public Property LINE() As String Get Try Return CType(Me(Me.tableKITTING.LINEColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'LINE' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.LINEColumn) = value End Set End Property _ Public Property EOH() As String Get Try Return CType(Me(Me.tableKITTING.EOHColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'EOH' in table 'KITTING' is DBNull.", e) End Try End Get Set Me(Me.tableKITTING.EOHColumn) = value End Set End Property _ Public Function IsUSAGENull() As Boolean Return Me.IsNull(Me.tableKITTING.USAGEColumn) End Function _ Public Sub SetUSAGENull() Me(Me.tableKITTING.USAGEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSPQNull() As Boolean Return Me.IsNull(Me.tableKITTING.SPQColumn) End Function _ Public Sub SetSPQNull() Me(Me.tableKITTING.SPQColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsQTYNull() As Boolean Return Me.IsNull(Me.tableKITTING.QTYColumn) End Function _ Public Sub SetQTYNull() Me(Me.tableKITTING.QTYColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFEEDERNull() As Boolean Return Me.IsNull(Me.tableKITTING.FEEDERColumn) End Function _ Public Sub SetFEEDERNull() Me(Me.tableKITTING.FEEDERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsACCOUNTNull() As Boolean Return Me.IsNull(Me.tableKITTING.ACCOUNTColumn) End Function _ Public Sub SetACCOUNTNull() Me(Me.tableKITTING.ACCOUNTColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsMACHINENull() As Boolean Return Me.IsNull(Me.tableKITTING.MACHINEColumn) End Function _ Public Sub SetMACHINENull() Me(Me.tableKITTING.MACHINEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsMODELNull() As Boolean Return Me.IsNull(Me.tableKITTING.MODELColumn) End Function _ Public Sub SetMODELNull() Me(Me.tableKITTING.MODELColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTYPENull() As Boolean Return Me.IsNull(Me.tableKITTING.TYPEColumn) End Function _ Public Sub SetTYPENull() Me(Me.tableKITTING.TYPEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsLINENull() As Boolean Return Me.IsNull(Me.tableKITTING.LINEColumn) End Function _ Public Sub SetLINENull() Me(Me.tableKITTING.LINEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsEOHNull() As Boolean Return Me.IsNull(Me.tableKITTING.EOHColumn) End Function _ Public Sub SetEOHNull() Me(Me.tableKITTING.EOHColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class KMOUNTINGRow Inherits Global.System.Data.DataRow Private tableKMOUNTING As KMOUNTINGDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableKMOUNTING = CType(Me.Table,KMOUNTINGDataTable) End Sub _ Public Property KMTDATE() As Date Get Try Return CType(Me(Me.tableKMOUNTING.KMTDATEColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTDATE' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTDATEColumn) = value End Set End Property _ Public Property KMTMACHINE() As String Get Try Return CType(Me(Me.tableKMOUNTING.KMTMACHINEColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTMACHINE' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTMACHINEColumn) = value End Set End Property _ Public Property KMTREVISION() As String Get Try Return CType(Me(Me.tableKMOUNTING.KMTREVISIONColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTREVISION' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTREVISIONColumn) = value End Set End Property _ Public Property KMTFEEDER() As String Get Try Return CType(Me(Me.tableKMOUNTING.KMTFEEDERColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTFEEDER' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTFEEDERColumn) = value End Set End Property _ Public Property KMTPARTNO() As String Get Try Return CType(Me(Me.tableKMOUNTING.KMTPARTNOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTPARTNO' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTPARTNOColumn) = value End Set End Property _ Public Property KMTQTY() As Integer Get Try Return CType(Me(Me.tableKMOUNTING.KMTQTYColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTQTY' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTQTYColumn) = value End Set End Property _ Public Property KMTLOT() As String Get Try Return CType(Me(Me.tableKMOUNTING.KMTLOTColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTLOT' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTLOTColumn) = value End Set End Property _ Public Property KMTOPERATOR() As String Get Try Return CType(Me(Me.tableKMOUNTING.KMTOPERATORColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTOPERATOR' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTOPERATORColumn) = value End Set End Property _ Public Property KMTVERIFY() As Integer Get Try Return CType(Me(Me.tableKMOUNTING.KMTVERIFYColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMTVERIFY' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMTVERIFYColumn) = value End Set End Property _ Public Property KMT3PL() As String Get Try Return CType(Me(Me.tableKMOUNTING.KMT3PLColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KMT3PL' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KMT3PLColumn) = value End Set End Property _ Public Property KSEQUENCENO() As String Get Try Return CType(Me(Me.tableKMOUNTING.KSEQUENCENOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSEQUENCENO' in table 'KMOUNTING' is DBNull.", e) End Try End Get Set Me(Me.tableKMOUNTING.KSEQUENCENOColumn) = value End Set End Property _ Public Function IsKMTDATENull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTDATEColumn) End Function _ Public Sub SetKMTDATENull() Me(Me.tableKMOUNTING.KMTDATEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMTMACHINENull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTMACHINEColumn) End Function _ Public Sub SetKMTMACHINENull() Me(Me.tableKMOUNTING.KMTMACHINEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMTREVISIONNull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTREVISIONColumn) End Function _ Public Sub SetKMTREVISIONNull() Me(Me.tableKMOUNTING.KMTREVISIONColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMTFEEDERNull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTFEEDERColumn) End Function _ Public Sub SetKMTFEEDERNull() Me(Me.tableKMOUNTING.KMTFEEDERColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMTPARTNONull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTPARTNOColumn) End Function _ Public Sub SetKMTPARTNONull() Me(Me.tableKMOUNTING.KMTPARTNOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMTQTYNull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTQTYColumn) End Function _ Public Sub SetKMTQTYNull() Me(Me.tableKMOUNTING.KMTQTYColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMTLOTNull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTLOTColumn) End Function _ Public Sub SetKMTLOTNull() Me(Me.tableKMOUNTING.KMTLOTColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMTOPERATORNull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTOPERATORColumn) End Function _ Public Sub SetKMTOPERATORNull() Me(Me.tableKMOUNTING.KMTOPERATORColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMTVERIFYNull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMTVERIFYColumn) End Function _ Public Sub SetKMTVERIFYNull() Me(Me.tableKMOUNTING.KMTVERIFYColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKMT3PLNull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KMT3PLColumn) End Function _ Public Sub SetKMT3PLNull() Me(Me.tableKMOUNTING.KMT3PLColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSEQUENCENONull() As Boolean Return Me.IsNull(Me.tableKMOUNTING.KSEQUENCENOColumn) End Function _ Public Sub SetKSEQUENCENONull() Me(Me.tableKMOUNTING.KSEQUENCENOColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class KSEQUENCE_DETAILRow Inherits Global.System.Data.DataRow Private tableKSEQUENCE_DETAIL As KSEQUENCE_DETAILDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableKSEQUENCE_DETAIL = CType(Me.Table,KSEQUENCE_DETAILDataTable) End Sub _ Public Property KSQMODULE() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQMODULEColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQMODULE' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQMODULEColumn) = value End Set End Property _ Public Property KSQFEEDERNO() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQFEEDERNOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQFEEDERNO' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQFEEDERNOColumn) = value End Set End Property _ Public Property KSQFEEDERTYP() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQFEEDERTYPColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQFEEDERTYP' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQFEEDERTYPColumn) = value End Set End Property _ Public Property KSQPARTNO() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQPARTNOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQPARTNO' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQPARTNOColumn) = value End Set End Property _ Public Property KSQTOPSDLOC() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQTOPSDLOCColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQTOPSDLOC' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQTOPSDLOCColumn) = value End Set End Property _ Public Property KSQFSBSQTY() As Integer Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQFSBSQTYColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQFSBSQTY' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQFSBSQTYColumn) = value End Set End Property _ Public Property KSQDESC1() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQDESC1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQDESC1' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQDESC1Column) = value End Set End Property _ Public Property KSQDESC2() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQDESC2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQDESC2' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQDESC2Column) = value End Set End Property _ Public Property KSQTOPMARK() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQTOPMARKColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQTOPMARK' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQTOPMARKColumn) = value End Set End Property _ Public Property KSQREMARKS() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSQREMARKSColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQREMARKS' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSQREMARKSColumn) = value End Set End Property _ Public Property KSEQUENCENO() As String Get Try Return CType(Me(Me.tableKSEQUENCE_DETAIL.KSEQUENCENOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSEQUENCENO' in table 'KSEQUENCE_DETAIL' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_DETAIL.KSEQUENCENOColumn) = value End Set End Property _ Public Function IsKSQMODULENull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQMODULEColumn) End Function _ Public Sub SetKSQMODULENull() Me(Me.tableKSEQUENCE_DETAIL.KSQMODULEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQFEEDERNONull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQFEEDERNOColumn) End Function _ Public Sub SetKSQFEEDERNONull() Me(Me.tableKSEQUENCE_DETAIL.KSQFEEDERNOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQFEEDERTYPNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQFEEDERTYPColumn) End Function _ Public Sub SetKSQFEEDERTYPNull() Me(Me.tableKSEQUENCE_DETAIL.KSQFEEDERTYPColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQPARTNONull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQPARTNOColumn) End Function _ Public Sub SetKSQPARTNONull() Me(Me.tableKSEQUENCE_DETAIL.KSQPARTNOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQTOPSDLOCNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQTOPSDLOCColumn) End Function _ Public Sub SetKSQTOPSDLOCNull() Me(Me.tableKSEQUENCE_DETAIL.KSQTOPSDLOCColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQFSBSQTYNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQFSBSQTYColumn) End Function _ Public Sub SetKSQFSBSQTYNull() Me(Me.tableKSEQUENCE_DETAIL.KSQFSBSQTYColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQDESC1Null() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQDESC1Column) End Function _ Public Sub SetKSQDESC1Null() Me(Me.tableKSEQUENCE_DETAIL.KSQDESC1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQDESC2Null() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQDESC2Column) End Function _ Public Sub SetKSQDESC2Null() Me(Me.tableKSEQUENCE_DETAIL.KSQDESC2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQTOPMARKNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQTOPMARKColumn) End Function _ Public Sub SetKSQTOPMARKNull() Me(Me.tableKSEQUENCE_DETAIL.KSQTOPMARKColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQREMARKSNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSQREMARKSColumn) End Function _ Public Sub SetKSQREMARKSNull() Me(Me.tableKSEQUENCE_DETAIL.KSQREMARKSColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSEQUENCENONull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_DETAIL.KSEQUENCENOColumn) End Function _ Public Sub SetKSEQUENCENONull() Me(Me.tableKSEQUENCE_DETAIL.KSEQUENCENOColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class KSEQUENCE_HEADERRow Inherits Global.System.Data.DataRow Private tableKSEQUENCE_HEADER As KSEQUENCE_HEADERDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableKSEQUENCE_HEADER = CType(Me.Table,KSEQUENCE_HEADERDataTable) End Sub _ Public Property KSACCOUNT() As String Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSACCOUNTColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSACCOUNT' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSACCOUNTColumn) = value End Set End Property _ Public Property KSQREVISION() As String Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQREVISIONColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQREVISION' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQREVISIONColumn) = value End Set End Property _ Public Property KSQMACHINE() As String Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQMACHINEColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQMACHINE' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQMACHINEColumn) = value End Set End Property _ Public Property KSQPCBSIDE() As String Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQPCBSIDEColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQPCBSIDE' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQPCBSIDEColumn) = value End Set End Property _ Public Property KSQPREPBY() As String Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQPREPBYColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQPREPBY' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQPREPBYColumn) = value End Set End Property _ Public Property KSQCHECKBY() As String Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQCHECKBYColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQCHECKBY' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQCHECKBYColumn) = value End Set End Property _ Public Property KSQCHKDATE() As Date Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQCHKDATEColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQCHKDATE' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQCHKDATEColumn) = value End Set End Property _ Public Property KSQMODEL() As String Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQMODELColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQMODEL' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQMODELColumn) = value End Set End Property _ Public Property KUPDTTIME() As Date Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KUPDTTIMEColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KUPDTTIME' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KUPDTTIMEColumn) = value End Set End Property _ Public Property KSQSTATUS() As Integer Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQSTATUSColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQSTATUS' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQSTATUSColumn) = value End Set End Property _ Public Property KSQLINE() As Integer Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSQLINEColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSQLINE' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSQLINEColumn) = value End Set End Property _ Public Property KSEQUENCENO() As String Get Try Return CType(Me(Me.tableKSEQUENCE_HEADER.KSEQUENCENOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'KSEQUENCENO' in table 'KSEQUENCE_HEADER' is DBNull.", e) End Try End Get Set Me(Me.tableKSEQUENCE_HEADER.KSEQUENCENOColumn) = value End Set End Property _ Public Function IsKSACCOUNTNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSACCOUNTColumn) End Function _ Public Sub SetKSACCOUNTNull() Me(Me.tableKSEQUENCE_HEADER.KSACCOUNTColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQREVISIONNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQREVISIONColumn) End Function _ Public Sub SetKSQREVISIONNull() Me(Me.tableKSEQUENCE_HEADER.KSQREVISIONColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQMACHINENull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQMACHINEColumn) End Function _ Public Sub SetKSQMACHINENull() Me(Me.tableKSEQUENCE_HEADER.KSQMACHINEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQPCBSIDENull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQPCBSIDEColumn) End Function _ Public Sub SetKSQPCBSIDENull() Me(Me.tableKSEQUENCE_HEADER.KSQPCBSIDEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQPREPBYNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQPREPBYColumn) End Function _ Public Sub SetKSQPREPBYNull() Me(Me.tableKSEQUENCE_HEADER.KSQPREPBYColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQCHECKBYNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQCHECKBYColumn) End Function _ Public Sub SetKSQCHECKBYNull() Me(Me.tableKSEQUENCE_HEADER.KSQCHECKBYColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQCHKDATENull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQCHKDATEColumn) End Function _ Public Sub SetKSQCHKDATENull() Me(Me.tableKSEQUENCE_HEADER.KSQCHKDATEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQMODELNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQMODELColumn) End Function _ Public Sub SetKSQMODELNull() Me(Me.tableKSEQUENCE_HEADER.KSQMODELColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKUPDTTIMENull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KUPDTTIMEColumn) End Function _ Public Sub SetKUPDTTIMENull() Me(Me.tableKSEQUENCE_HEADER.KUPDTTIMEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQSTATUSNull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQSTATUSColumn) End Function _ Public Sub SetKSQSTATUSNull() Me(Me.tableKSEQUENCE_HEADER.KSQSTATUSColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSQLINENull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSQLINEColumn) End Function _ Public Sub SetKSQLINENull() Me(Me.tableKSEQUENCE_HEADER.KSQLINEColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsKSEQUENCENONull() As Boolean Return Me.IsNull(Me.tableKSEQUENCE_HEADER.KSEQUENCENOColumn) End Function _ Public Sub SetKSEQUENCENONull() Me(Me.tableKSEQUENCE_HEADER.KSEQUENCENOColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class KSETTINGSRow Inherits Global.System.Data.DataRow Private tableKSETTINGS As KSETTINGSDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableKSETTINGS = CType(Me.Table,KSETTINGSDataTable) End Sub _ Public Property set_id() As Integer Get Return CType(Me(Me.tableKSETTINGS.set_idColumn),Integer) End Get Set Me(Me.tableKSETTINGS.set_idColumn) = value End Set End Property _ Public Property line() As Integer Get Return CType(Me(Me.tableKSETTINGS.lineColumn),Integer) End Get Set Me(Me.tableKSETTINGS.lineColumn) = value End Set End Property _ Public Property ksequence() As String Get Return CType(Me(Me.tableKSETTINGS.ksequenceColumn),String) End Get Set Me(Me.tableKSETTINGS.ksequenceColumn) = value End Set End Property End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class LabelDefRow Inherits Global.System.Data.DataRow Private tableLabelDef As LabelDefDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableLabelDef = CType(Me.Table,LabelDefDataTable) End Sub _ Public Property labelFormat1() As String Get Return CType(Me(Me.tableLabelDef.labelFormat1Column),String) End Get Set Me(Me.tableLabelDef.labelFormat1Column) = value End Set End Property _ Public Property labelFormat2() As String Get Return CType(Me(Me.tableLabelDef.labelFormat2Column),String) End Get Set Me(Me.tableLabelDef.labelFormat2Column) = value End Set End Property _ Public Property bartenderFile() As String Get Try Return CType(Me(Me.tableLabelDef.bartenderFileColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'bartenderFile' in table 'LabelDef' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDef.bartenderFileColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tableLabelDef.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'LabelDef' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDef.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tableLabelDef.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'LabelDef' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDef.lastupdatedbyColumn) = value End Set End Property _ Public Function IsbartenderFileNull() As Boolean Return Me.IsNull(Me.tableLabelDef.bartenderFileColumn) End Function _ Public Sub SetbartenderFileNull() Me(Me.tableLabelDef.bartenderFileColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tableLabelDef.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tableLabelDef.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tableLabelDef.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tableLabelDef.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class LabelDefHistRow Inherits Global.System.Data.DataRow Private tableLabelDefHist As LabelDefHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableLabelDefHist = CType(Me.Table,LabelDefHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tableLabelDefHist.lineNumColumn),Long) End Get Set Me(Me.tableLabelDefHist.lineNumColumn) = value End Set End Property _ Public Property labelFormat1() As String Get Try Return CType(Me(Me.tableLabelDefHist.labelFormat1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'labelFormat1' in table 'LabelDefHist' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDefHist.labelFormat1Column) = value End Set End Property _ Public Property labelFormat2() As String Get Try Return CType(Me(Me.tableLabelDefHist.labelFormat2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'labelFormat2' in table 'LabelDefHist' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDefHist.labelFormat2Column) = value End Set End Property _ Public Property bartenderFile() As String Get Try Return CType(Me(Me.tableLabelDefHist.bartenderFileColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'bartenderFile' in table 'LabelDefHist' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDefHist.bartenderFileColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tableLabelDefHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'LabelDefHist' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDefHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tableLabelDefHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'LabelDefHist' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDefHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tableLabelDefHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'LabelDefHist' is DBNull.", e) End Try End Get Set Me(Me.tableLabelDefHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IslabelFormat1Null() As Boolean Return Me.IsNull(Me.tableLabelDefHist.labelFormat1Column) End Function _ Public Sub SetlabelFormat1Null() Me(Me.tableLabelDefHist.labelFormat1Column) = Global.System.Convert.DBNull End Sub _ Public Function IslabelFormat2Null() As Boolean Return Me.IsNull(Me.tableLabelDefHist.labelFormat2Column) End Function _ Public Sub SetlabelFormat2Null() Me(Me.tableLabelDefHist.labelFormat2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsbartenderFileNull() As Boolean Return Me.IsNull(Me.tableLabelDefHist.bartenderFileColumn) End Function _ Public Sub SetbartenderFileNull() Me(Me.tableLabelDefHist.bartenderFileColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tableLabelDefHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tableLabelDefHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tableLabelDefHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tableLabelDefHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tableLabelDefHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tableLabelDefHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_actionRow Inherits Global.System.Data.DataRow Private tablelog_action As log_actionDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_action = CType(Me.Table,log_actionDataTable) End Sub _ Public Property trackingno() As String Get Try Return CType(Me(Me.tablelog_action.trackingnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'trackingno' in table 'log_action' is DBNull.", e) End Try End Get Set Me(Me.tablelog_action.trackingnoColumn) = value End Set End Property _ Public Property reference() As String Get Try Return CType(Me(Me.tablelog_action.referenceColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'reference' in table 'log_action' is DBNull.", e) End Try End Get Set Me(Me.tablelog_action.referenceColumn) = value End Set End Property _ Public Property refType() As String Get Try Return CType(Me(Me.tablelog_action.refTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'refType' in table 'log_action' is DBNull.", e) End Try End Get Set Me(Me.tablelog_action.refTypeColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_action.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_action' is DBNull.", e) End Try End Get Set Me(Me.tablelog_action.serialnoColumn) = value End Set End Property _ Public Property reason() As String Get Try Return CType(Me(Me.tablelog_action.reasonColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'reason' in table 'log_action' is DBNull.", e) End Try End Get Set Me(Me.tablelog_action.reasonColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_action.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_action' is DBNull.", e) End Try End Get Set Me(Me.tablelog_action.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_action.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_action' is DBNull.", e) End Try End Get Set Me(Me.tablelog_action.lastupdatedbyColumn) = value End Set End Property _ Public Function IstrackingnoNull() As Boolean Return Me.IsNull(Me.tablelog_action.trackingnoColumn) End Function _ Public Sub SettrackingnoNull() Me(Me.tablelog_action.trackingnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsreferenceNull() As Boolean Return Me.IsNull(Me.tablelog_action.referenceColumn) End Function _ Public Sub SetreferenceNull() Me(Me.tablelog_action.referenceColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrefTypeNull() As Boolean Return Me.IsNull(Me.tablelog_action.refTypeColumn) End Function _ Public Sub SetrefTypeNull() Me(Me.tablelog_action.refTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_action.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_action.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsreasonNull() As Boolean Return Me.IsNull(Me.tablelog_action.reasonColumn) End Function _ Public Sub SetreasonNull() Me(Me.tablelog_action.reasonColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_action.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_action.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_action.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_action.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_alvarion_serialRow Inherits Global.System.Data.DataRow Private tablelog_alvarion_serial As log_alvarion_serialDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_alvarion_serial = CType(Me.Table,log_alvarion_serialDataTable) End Sub _ Public Property batchno() As String Get Return CType(Me(Me.tablelog_alvarion_serial.batchnoColumn),String) End Get Set Me(Me.tablelog_alvarion_serial.batchnoColumn) = value End Set End Property _ Public Property serialStart() As String Get Try Return CType(Me(Me.tablelog_alvarion_serial.serialStartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialStart' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.serialStartColumn) = value End Set End Property _ Public Property serialEnd() As String Get Try Return CType(Me(Me.tablelog_alvarion_serial.serialEndColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialEnd' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.serialEndColumn) = value End Set End Property _ Public Property serialStartHex() As String Get Try Return CType(Me(Me.tablelog_alvarion_serial.serialStartHexColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialStartHex' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.serialStartHexColumn) = value End Set End Property _ Public Property serialEndHex() As String Get Try Return CType(Me(Me.tablelog_alvarion_serial.serialEndHexColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialEndHex' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.serialEndHexColumn) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tablelog_alvarion_serial.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.modelColumn) = value End Set End Property _ Public Property revision() As String Get Try Return CType(Me(Me.tablelog_alvarion_serial.revisionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'revision' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.revisionColumn) = value End Set End Property _ Public Property quantity() As Integer Get Try Return CType(Me(Me.tablelog_alvarion_serial.quantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.quantityColumn) = value End Set End Property _ Public Property generated() As Date Get Try Return CType(Me(Me.tablelog_alvarion_serial.generatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'generated' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.generatedColumn) = value End Set End Property _ Public Property generatedby() As String Get Try Return CType(Me(Me.tablelog_alvarion_serial.generatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'generatedby' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.generatedbyColumn) = value End Set End Property _ Public Property family() As String Get Try Return CType(Me(Me.tablelog_alvarion_serial.familyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'family' in table 'log_alvarion_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_alvarion_serial.familyColumn) = value End Set End Property _ Public Function IsserialStartNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.serialStartColumn) End Function _ Public Sub SetserialStartNull() Me(Me.tablelog_alvarion_serial.serialStartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialEndNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.serialEndColumn) End Function _ Public Sub SetserialEndNull() Me(Me.tablelog_alvarion_serial.serialEndColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialStartHexNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.serialStartHexColumn) End Function _ Public Sub SetserialStartHexNull() Me(Me.tablelog_alvarion_serial.serialStartHexColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialEndHexNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.serialEndHexColumn) End Function _ Public Sub SetserialEndHexNull() Me(Me.tablelog_alvarion_serial.serialEndHexColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tablelog_alvarion_serial.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrevisionNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.revisionColumn) End Function _ Public Sub SetrevisionNull() Me(Me.tablelog_alvarion_serial.revisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablelog_alvarion_serial.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsgeneratedNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.generatedColumn) End Function _ Public Sub SetgeneratedNull() Me(Me.tablelog_alvarion_serial.generatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsgeneratedbyNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.generatedbyColumn) End Function _ Public Sub SetgeneratedbyNull() Me(Me.tablelog_alvarion_serial.generatedbyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsfamilyNull() As Boolean Return Me.IsNull(Me.tablelog_alvarion_serial.familyColumn) End Function _ Public Sub SetfamilyNull() Me(Me.tablelog_alvarion_serial.familyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_ATE_errorRow Inherits Global.System.Data.DataRow Private tablelog_ATE_error As log_ATE_errorDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_ATE_error = CType(Me.Table,log_ATE_errorDataTable) End Sub _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_ATE_error.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_ATE_error' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ATE_error.serialnoColumn) = value End Set End Property _ Public Property result() As String Get Try Return CType(Me(Me.tablelog_ATE_error.resultColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'result' in table 'log_ATE_error' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ATE_error.resultColumn) = value End Set End Property _ Public Property station() As String Get Try Return CType(Me(Me.tablelog_ATE_error.stationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'station' in table 'log_ATE_error' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ATE_error.stationColumn) = value End Set End Property _ Public Property pc_name() As String Get Try Return CType(Me(Me.tablelog_ATE_error.pc_nameColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'pc_name' in table 'log_ATE_error' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ATE_error.pc_nameColumn) = value End Set End Property _ Public Property errormsg() As String Get Try Return CType(Me(Me.tablelog_ATE_error.errormsgColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'errormsg' in table 'log_ATE_error' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ATE_error.errormsgColumn) = value End Set End Property _ Public Property checked_pn() As String Get Try Return CType(Me(Me.tablelog_ATE_error.checked_pnColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'checked_pn' in table 'log_ATE_error' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ATE_error.checked_pnColumn) = value End Set End Property _ Public Property mac() As String Get Try Return CType(Me(Me.tablelog_ATE_error.macColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mac' in table 'log_ATE_error' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ATE_error.macColumn) = value End Set End Property _ Public Property timestamp() As Date Get Try Return CType(Me(Me.tablelog_ATE_error.timestampColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'timestamp' in table 'log_ATE_error' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ATE_error.timestampColumn) = value End Set End Property _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_ATE_error.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_ATE_error.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsresultNull() As Boolean Return Me.IsNull(Me.tablelog_ATE_error.resultColumn) End Function _ Public Sub SetresultNull() Me(Me.tablelog_ATE_error.resultColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstationNull() As Boolean Return Me.IsNull(Me.tablelog_ATE_error.stationColumn) End Function _ Public Sub SetstationNull() Me(Me.tablelog_ATE_error.stationColumn) = Global.System.Convert.DBNull End Sub _ Public Function Ispc_nameNull() As Boolean Return Me.IsNull(Me.tablelog_ATE_error.pc_nameColumn) End Function _ Public Sub Setpc_nameNull() Me(Me.tablelog_ATE_error.pc_nameColumn) = Global.System.Convert.DBNull End Sub _ Public Function IserrormsgNull() As Boolean Return Me.IsNull(Me.tablelog_ATE_error.errormsgColumn) End Function _ Public Sub SeterrormsgNull() Me(Me.tablelog_ATE_error.errormsgColumn) = Global.System.Convert.DBNull End Sub _ Public Function Ischecked_pnNull() As Boolean Return Me.IsNull(Me.tablelog_ATE_error.checked_pnColumn) End Function _ Public Sub Setchecked_pnNull() Me(Me.tablelog_ATE_error.checked_pnColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmacNull() As Boolean Return Me.IsNull(Me.tablelog_ATE_error.macColumn) End Function _ Public Sub SetmacNull() Me(Me.tablelog_ATE_error.macColumn) = Global.System.Convert.DBNull End Sub _ Public Function IstimestampNull() As Boolean Return Me.IsNull(Me.tablelog_ATE_error.timestampColumn) End Function _ Public Sub SettimestampNull() Me(Me.tablelog_ATE_error.timestampColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_BL_DetailRow Inherits Global.System.Data.DataRow Private tablelog_BL_Detail As log_BL_DetailDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_BL_Detail = CType(Me.Table,log_BL_DetailDataTable) End Sub _ Public Property boxno() As String Get Try Return CType(Me(Me.tablelog_BL_Detail.boxnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxno' in table 'log_BL_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail.boxnoColumn) = value End Set End Property _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_BL_Detail.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_BL_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_BL_Detail.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_BL_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail.serialnoColumn) = value End Set End Property _ Public Property qty() As Integer Get Try Return CType(Me(Me.tablelog_BL_Detail.qtyColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'qty' in table 'log_BL_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail.qtyColumn) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tablelog_BL_Detail.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'log_BL_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail.modelColumn) = value End Set End Property _ Public Property modelWt() As String Get Try Return CType(Me(Me.tablelog_BL_Detail.modelWtColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelWt' in table 'log_BL_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail.modelWtColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_BL_Detail.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_BL_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_BL_Detail.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_BL_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail.lastupdatedbyColumn) = value End Set End Property _ Public Function IsboxnoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail.boxnoColumn) End Function _ Public Sub SetboxnoNull() Me(Me.tablelog_BL_Detail.boxnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_BL_Detail.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_BL_Detail.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsqtyNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail.qtyColumn) End Function _ Public Sub SetqtyNull() Me(Me.tablelog_BL_Detail.qtyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tablelog_BL_Detail.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelWtNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail.modelWtColumn) End Function _ Public Sub SetmodelWtNull() Me(Me.tablelog_BL_Detail.modelWtColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_BL_Detail.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_BL_Detail.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_BL_Detail_HistRow Inherits Global.System.Data.DataRow Private tablelog_BL_Detail_Hist As log_BL_Detail_HistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_BL_Detail_Hist = CType(Me.Table,log_BL_Detail_HistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablelog_BL_Detail_Hist.lineNumColumn),Long) End Get Set Me(Me.tablelog_BL_Detail_Hist.lineNumColumn) = value End Set End Property _ Public Property boxno() As String Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.boxnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxno' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.boxnoColumn) = value End Set End Property _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.serialnoColumn) = value End Set End Property _ Public Property qty() As Integer Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.qtyColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'qty' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.qtyColumn) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.modelColumn) = value End Set End Property _ Public Property modelWt() As Single Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.modelWtColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelWt' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.modelWtColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_BL_Detail_Hist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_BL_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Detail_Hist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsboxnoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.boxnoColumn) End Function _ Public Sub SetboxnoNull() Me(Me.tablelog_BL_Detail_Hist.boxnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_BL_Detail_Hist.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_BL_Detail_Hist.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsqtyNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.qtyColumn) End Function _ Public Sub SetqtyNull() Me(Me.tablelog_BL_Detail_Hist.qtyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tablelog_BL_Detail_Hist.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelWtNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.modelWtColumn) End Function _ Public Sub SetmodelWtNull() Me(Me.tablelog_BL_Detail_Hist.modelWtColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_BL_Detail_Hist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_BL_Detail_Hist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Detail_Hist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_BL_Detail_Hist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_BL_HeaderRow Inherits Global.System.Data.DataRow Private tablelog_BL_Header As log_BL_HeaderDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_BL_Header = CType(Me.Table,log_BL_HeaderDataTable) End Sub _ Public Property boxno() As String Get Return CType(Me(Me.tablelog_BL_Header.boxnoColumn),String) End Get Set Me(Me.tablelog_BL_Header.boxnoColumn) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tablelog_BL_Header.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.modelColumn) = value End Set End Property _ Public Property po() As String Get Try Return CType(Me(Me.tablelog_BL_Header.poColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'po' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.poColumn) = value End Set End Property _ Public Property poLine() As String Get Try Return CType(Me(Me.tablelog_BL_Header.poLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.poLineColumn) = value End Set End Property _ Public Property pkType() As String Get Try Return CType(Me(Me.tablelog_BL_Header.pkTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'pkType' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.pkTypeColumn) = value End Set End Property _ Public Property maxQty() As Integer Get Try Return CType(Me(Me.tablelog_BL_Header.maxQtyColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'maxQty' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.maxQtyColumn) = value End Set End Property _ Public Property boxWt() As Single Get Try Return CType(Me(Me.tablelog_BL_Header.boxWtColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxWt' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.boxWtColumn) = value End Set End Property _ Public Property boxDim() As String Get Try Return CType(Me(Me.tablelog_BL_Header.boxDimColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxDim' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.boxDimColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_BL_Header.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_BL_Header.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_BL_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tablelog_BL_Header.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.poColumn) End Function _ Public Sub SetpoNull() Me(Me.tablelog_BL_Header.poColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tablelog_BL_Header.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspkTypeNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.pkTypeColumn) End Function _ Public Sub SetpkTypeNull() Me(Me.tablelog_BL_Header.pkTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmaxQtyNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.maxQtyColumn) End Function _ Public Sub SetmaxQtyNull() Me(Me.tablelog_BL_Header.maxQtyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsboxWtNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.boxWtColumn) End Function _ Public Sub SetboxWtNull() Me(Me.tablelog_BL_Header.boxWtColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsboxDimNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.boxDimColumn) End Function _ Public Sub SetboxDimNull() Me(Me.tablelog_BL_Header.boxDimColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_BL_Header.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_BL_Header.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_BL_Header_HistRow Inherits Global.System.Data.DataRow Private tablelog_BL_Header_Hist As log_BL_Header_HistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_BL_Header_Hist = CType(Me.Table,log_BL_Header_HistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablelog_BL_Header_Hist.lineNumColumn),Long) End Get Set Me(Me.tablelog_BL_Header_Hist.lineNumColumn) = value End Set End Property _ Public Property boxno() As String Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.boxnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxno' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.boxnoColumn) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.modelColumn) = value End Set End Property _ Public Property po() As String Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.poColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'po' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.poColumn) = value End Set End Property _ Public Property poLine() As String Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.poLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.poLineColumn) = value End Set End Property _ Public Property pkType() As String Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.pkTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'pkType' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.pkTypeColumn) = value End Set End Property _ Public Property maxQty() As Integer Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.maxQtyColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'maxQty' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.maxQtyColumn) = value End Set End Property _ Public Property boxWt() As Single Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.boxWtColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxWt' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.boxWtColumn) = value End Set End Property _ Public Property boxDim() As String Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.boxDimColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxDim' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.boxDimColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_BL_Header_Hist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_BL_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_BL_Header_Hist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsboxnoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.boxnoColumn) End Function _ Public Sub SetboxnoNull() Me(Me.tablelog_BL_Header_Hist.boxnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tablelog_BL_Header_Hist.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.poColumn) End Function _ Public Sub SetpoNull() Me(Me.tablelog_BL_Header_Hist.poColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tablelog_BL_Header_Hist.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspkTypeNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.pkTypeColumn) End Function _ Public Sub SetpkTypeNull() Me(Me.tablelog_BL_Header_Hist.pkTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmaxQtyNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.maxQtyColumn) End Function _ Public Sub SetmaxQtyNull() Me(Me.tablelog_BL_Header_Hist.maxQtyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsboxWtNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.boxWtColumn) End Function _ Public Sub SetboxWtNull() Me(Me.tablelog_BL_Header_Hist.boxWtColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsboxDimNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.boxDimColumn) End Function _ Public Sub SetboxDimNull() Me(Me.tablelog_BL_Header_Hist.boxDimColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_BL_Header_Hist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_BL_Header_Hist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_BL_Header_Hist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_BL_Header_Hist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_CAPARow Inherits Global.System.Data.DataRow Private tablelog_CAPA As log_CAPADataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_CAPA = CType(Me.Table,log_CAPADataTable) End Sub _ Public Property poNumber() As String Get Try Return CType(Me(Me.tablelog_CAPA.poNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poNumber' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.poNumberColumn) = value End Set End Property _ Public Property poLine() As String Get Try Return CType(Me(Me.tablelog_CAPA.poLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.poLineColumn) = value End Set End Property _ Public Property cause() As String Get Try Return CType(Me(Me.tablelog_CAPA.causeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cause' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.causeColumn) = value End Set End Property _ Public Property correctiveAction() As String Get Try Return CType(Me(Me.tablelog_CAPA.correctiveActionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'correctiveAction' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.correctiveActionColumn) = value End Set End Property _ Public Property category() As String Get Try Return CType(Me(Me.tablelog_CAPA.categoryColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'category' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.categoryColumn) = value End Set End Property _ Public Property rejectdate() As Date Get Try Return CType(Me(Me.tablelog_CAPA.rejectdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'rejectdate' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.rejectdateColumn) = value End Set End Property _ Public Property rejectLocation() As String Get Try Return CType(Me(Me.tablelog_CAPA.rejectLocationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'rejectLocation' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.rejectLocationColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_CAPA.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_CAPA.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_CAPA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CAPA.lastupdatedbyColumn) = value End Set End Property _ Public Function IspoNumberNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.poNumberColumn) End Function _ Public Sub SetpoNumberNull() Me(Me.tablelog_CAPA.poNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tablelog_CAPA.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscauseNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.causeColumn) End Function _ Public Sub SetcauseNull() Me(Me.tablelog_CAPA.causeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscorrectiveActionNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.correctiveActionColumn) End Function _ Public Sub SetcorrectiveActionNull() Me(Me.tablelog_CAPA.correctiveActionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscategoryNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.categoryColumn) End Function _ Public Sub SetcategoryNull() Me(Me.tablelog_CAPA.categoryColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrejectdateNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.rejectdateColumn) End Function _ Public Sub SetrejectdateNull() Me(Me.tablelog_CAPA.rejectdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrejectLocationNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.rejectLocationColumn) End Function _ Public Sub SetrejectLocationNull() Me(Me.tablelog_CAPA.rejectLocationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_CAPA.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_CAPA.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_CAPA.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_cardRow Inherits Global.System.Data.DataRow Private tablelog_card As log_cardDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_card = CType(Me.Table,log_cardDataTable) End Sub _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_card.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_card' is DBNull.", e) End Try End Get Set Me(Me.tablelog_card.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_card.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_card' is DBNull.", e) End Try End Get Set Me(Me.tablelog_card.serialnoColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_card.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_card' is DBNull.", e) End Try End Get Set Me(Me.tablelog_card.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_card.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_card' is DBNull.", e) End Try End Get Set Me(Me.tablelog_card.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_card.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_card' is DBNull.", e) End Try End Get Set Me(Me.tablelog_card.lastupdatedbyColumn) = value End Set End Property _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_card.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_card.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_card.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_card.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_card.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_card.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_card.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_card.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_card.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_card.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_CT_DetailRow Inherits Global.System.Data.DataRow Private tablelog_CT_Detail As log_CT_DetailDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_CT_Detail = CType(Me.Table,log_CT_DetailDataTable) End Sub _ Public Property CNno() As String Get Try Return CType(Me(Me.tablelog_CT_Detail.CNnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CNno' in table 'log_CT_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail.CNnoColumn) = value End Set End Property _ Public Property boxno() As String Get Try Return CType(Me(Me.tablelog_CT_Detail.boxnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxno' in table 'log_CT_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail.boxnoColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_CT_Detail.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_CT_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_CT_Detail.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_CT_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail.lastupdatedbyColumn) = value End Set End Property _ Public Function IsCNnoNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail.CNnoColumn) End Function _ Public Sub SetCNnoNull() Me(Me.tablelog_CT_Detail.CNnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsboxnoNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail.boxnoColumn) End Function _ Public Sub SetboxnoNull() Me(Me.tablelog_CT_Detail.boxnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_CT_Detail.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_CT_Detail.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_CT_Detail_HistRow Inherits Global.System.Data.DataRow Private tablelog_CT_Detail_Hist As log_CT_Detail_HistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_CT_Detail_Hist = CType(Me.Table,log_CT_Detail_HistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablelog_CT_Detail_Hist.lineNumColumn),Long) End Get Set Me(Me.tablelog_CT_Detail_Hist.lineNumColumn) = value End Set End Property _ Public Property CNno() As String Get Try Return CType(Me(Me.tablelog_CT_Detail_Hist.CNnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CNno' in table 'log_CT_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail_Hist.CNnoColumn) = value End Set End Property _ Public Property boxno() As String Get Try Return CType(Me(Me.tablelog_CT_Detail_Hist.boxnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxno' in table 'log_CT_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail_Hist.boxnoColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_CT_Detail_Hist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_CT_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail_Hist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_CT_Detail_Hist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_CT_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail_Hist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_CT_Detail_Hist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_CT_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Detail_Hist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsCNnoNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail_Hist.CNnoColumn) End Function _ Public Sub SetCNnoNull() Me(Me.tablelog_CT_Detail_Hist.CNnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsboxnoNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail_Hist.boxnoColumn) End Function _ Public Sub SetboxnoNull() Me(Me.tablelog_CT_Detail_Hist.boxnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail_Hist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_CT_Detail_Hist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail_Hist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_CT_Detail_Hist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Detail_Hist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_CT_Detail_Hist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_CT_HeaderRow Inherits Global.System.Data.DataRow Private tablelog_CT_Header As log_CT_HeaderDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_CT_Header = CType(Me.Table,log_CT_HeaderDataTable) End Sub _ Public Property CNno() As String Get Return CType(Me(Me.tablelog_CT_Header.CNnoColumn),String) End Get Set Me(Me.tablelog_CT_Header.CNnoColumn) = value End Set End Property _ Public Property layer() As Single Get Try Return CType(Me(Me.tablelog_CT_Header.layerColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layer' in table 'log_CT_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header.layerColumn) = value End Set End Property _ Public Property dimension() As String Get Try Return CType(Me(Me.tablelog_CT_Header.dimensionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimension' in table 'log_CT_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header.dimensionColumn) = value End Set End Property _ Public Property type() As String Get Try Return CType(Me(Me.tablelog_CT_Header.typeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'type' in table 'log_CT_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header.typeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_CT_Header.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_CT_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_CT_Header.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_CT_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header.lastupdatedbyColumn) = value End Set End Property _ Public Function IslayerNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header.layerColumn) End Function _ Public Sub SetlayerNull() Me(Me.tablelog_CT_Header.layerColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimensionNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header.dimensionColumn) End Function _ Public Sub SetdimensionNull() Me(Me.tablelog_CT_Header.dimensionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IstypeNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header.typeColumn) End Function _ Public Sub SettypeNull() Me(Me.tablelog_CT_Header.typeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_CT_Header.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_CT_Header.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_CT_Header_HistRow Inherits Global.System.Data.DataRow Private tablelog_CT_Header_Hist As log_CT_Header_HistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_CT_Header_Hist = CType(Me.Table,log_CT_Header_HistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablelog_CT_Header_Hist.lineNumColumn),Long) End Get Set Me(Me.tablelog_CT_Header_Hist.lineNumColumn) = value End Set End Property _ Public Property CNno() As String Get Try Return CType(Me(Me.tablelog_CT_Header_Hist.CNnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CNno' in table 'log_CT_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header_Hist.CNnoColumn) = value End Set End Property _ Public Property layer() As Integer Get Try Return CType(Me(Me.tablelog_CT_Header_Hist.layerColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layer' in table 'log_CT_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header_Hist.layerColumn) = value End Set End Property _ Public Property dimension() As String Get Try Return CType(Me(Me.tablelog_CT_Header_Hist.dimensionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimension' in table 'log_CT_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header_Hist.dimensionColumn) = value End Set End Property _ Public Property type() As String Get Try Return CType(Me(Me.tablelog_CT_Header_Hist.typeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'type' in table 'log_CT_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header_Hist.typeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_CT_Header_Hist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_CT_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header_Hist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_CT_Header_Hist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_CT_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header_Hist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_CT_Header_Hist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_CT_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_CT_Header_Hist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsCNnoNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header_Hist.CNnoColumn) End Function _ Public Sub SetCNnoNull() Me(Me.tablelog_CT_Header_Hist.CNnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslayerNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header_Hist.layerColumn) End Function _ Public Sub SetlayerNull() Me(Me.tablelog_CT_Header_Hist.layerColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimensionNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header_Hist.dimensionColumn) End Function _ Public Sub SetdimensionNull() Me(Me.tablelog_CT_Header_Hist.dimensionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IstypeNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header_Hist.typeColumn) End Function _ Public Sub SettypeNull() Me(Me.tablelog_CT_Header_Hist.typeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header_Hist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_CT_Header_Hist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header_Hist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_CT_Header_Hist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_CT_Header_Hist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_CT_Header_Hist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_ct_header_tempRow Inherits Global.System.Data.DataRow Private tablelog_ct_header_temp As log_ct_header_tempDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_ct_header_temp = CType(Me.Table,log_ct_header_tempDataTable) End Sub _ Public Property CNno() As String Get Return CType(Me(Me.tablelog_ct_header_temp.CNnoColumn),String) End Get Set Me(Me.tablelog_ct_header_temp.CNnoColumn) = value End Set End Property _ Public Property layer() As Integer Get Try Return CType(Me(Me.tablelog_ct_header_temp.layerColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layer' in table 'log_ct_header_temp' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ct_header_temp.layerColumn) = value End Set End Property _ Public Property dimension() As String Get Try Return CType(Me(Me.tablelog_ct_header_temp.dimensionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimension' in table 'log_ct_header_temp' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ct_header_temp.dimensionColumn) = value End Set End Property _ Public Property type() As String Get Try Return CType(Me(Me.tablelog_ct_header_temp.typeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'type' in table 'log_ct_header_temp' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ct_header_temp.typeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_ct_header_temp.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_ct_header_temp' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ct_header_temp.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_ct_header_temp.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_ct_header_temp' is DBNull.", e) End Try End Get Set Me(Me.tablelog_ct_header_temp.lastupdatedbyColumn) = value End Set End Property _ Public Function IslayerNull() As Boolean Return Me.IsNull(Me.tablelog_ct_header_temp.layerColumn) End Function _ Public Sub SetlayerNull() Me(Me.tablelog_ct_header_temp.layerColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimensionNull() As Boolean Return Me.IsNull(Me.tablelog_ct_header_temp.dimensionColumn) End Function _ Public Sub SetdimensionNull() Me(Me.tablelog_ct_header_temp.dimensionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IstypeNull() As Boolean Return Me.IsNull(Me.tablelog_ct_header_temp.typeColumn) End Function _ Public Sub SettypeNull() Me(Me.tablelog_ct_header_temp.typeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_ct_header_temp.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_ct_header_temp.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_ct_header_temp.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_ct_header_temp.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_DARow Inherits Global.System.Data.DataRow Private tablelog_DA As log_DADataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_DA = CType(Me.Table,log_DADataTable) End Sub _ Public Property trackingno() As String Get Try Return CType(Me(Me.tablelog_DA.trackingnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'trackingno' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.trackingnoColumn) = value End Set End Property _ Public Property inputType() As String Get Try Return CType(Me(Me.tablelog_DA.inputTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'inputType' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.inputTypeColumn) = value End Set End Property _ Public Property serial() As String Get Try Return CType(Me(Me.tablelog_DA.serialColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serial' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.serialColumn) = value End Set End Property _ Public Property serialFrom() As String Get Try Return CType(Me(Me.tablelog_DA.serialFromColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialFrom' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.serialFromColumn) = value End Set End Property _ Public Property serialTo() As String Get Try Return CType(Me(Me.tablelog_DA.serialToColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialTo' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.serialToColumn) = value End Set End Property _ Public Property batchNo() As String Get Try Return CType(Me(Me.tablelog_DA.batchNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'batchNo' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.batchNoColumn) = value End Set End Property _ Public Property daNumber() As String Get Try Return CType(Me(Me.tablelog_DA.daNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'daNumber' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.daNumberColumn) = value End Set End Property _ Public Property daDesc() As String Get Try Return CType(Me(Me.tablelog_DA.daDescColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'daDesc' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.daDescColumn) = value End Set End Property _ Public Property daRemarks() As String Get Try Return CType(Me(Me.tablelog_DA.daRemarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'daRemarks' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.daRemarksColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_DA.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_DA.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_DA' is DBNull.", e) End Try End Get Set Me(Me.tablelog_DA.lastupdatedbyColumn) = value End Set End Property _ Public Function IstrackingnoNull() As Boolean Return Me.IsNull(Me.tablelog_DA.trackingnoColumn) End Function _ Public Sub SettrackingnoNull() Me(Me.tablelog_DA.trackingnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsinputTypeNull() As Boolean Return Me.IsNull(Me.tablelog_DA.inputTypeColumn) End Function _ Public Sub SetinputTypeNull() Me(Me.tablelog_DA.inputTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialNull() As Boolean Return Me.IsNull(Me.tablelog_DA.serialColumn) End Function _ Public Sub SetserialNull() Me(Me.tablelog_DA.serialColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialFromNull() As Boolean Return Me.IsNull(Me.tablelog_DA.serialFromColumn) End Function _ Public Sub SetserialFromNull() Me(Me.tablelog_DA.serialFromColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialToNull() As Boolean Return Me.IsNull(Me.tablelog_DA.serialToColumn) End Function _ Public Sub SetserialToNull() Me(Me.tablelog_DA.serialToColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsbatchNoNull() As Boolean Return Me.IsNull(Me.tablelog_DA.batchNoColumn) End Function _ Public Sub SetbatchNoNull() Me(Me.tablelog_DA.batchNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdaNumberNull() As Boolean Return Me.IsNull(Me.tablelog_DA.daNumberColumn) End Function _ Public Sub SetdaNumberNull() Me(Me.tablelog_DA.daNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdaDescNull() As Boolean Return Me.IsNull(Me.tablelog_DA.daDescColumn) End Function _ Public Sub SetdaDescNull() Me(Me.tablelog_DA.daDescColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdaRemarksNull() As Boolean Return Me.IsNull(Me.tablelog_DA.daRemarksColumn) End Function _ Public Sub SetdaRemarksNull() Me(Me.tablelog_DA.daRemarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_DA.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_DA.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_DA.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_DA.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_labelRow Inherits Global.System.Data.DataRow Private tablelog_label As log_labelDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_label = CType(Me.Table,log_labelDataTable) End Sub _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_label.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_label' is DBNull.", e) End Try End Get Set Me(Me.tablelog_label.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_label.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_label' is DBNull.", e) End Try End Get Set Me(Me.tablelog_label.serialnoColumn) = value End Set End Property _ Public Property so() As String Get Try Return CType(Me(Me.tablelog_label.soColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'so' in table 'log_label' is DBNull.", e) End Try End Get Set Me(Me.tablelog_label.soColumn) = value End Set End Property _ Public Property line() As String Get Try Return CType(Me(Me.tablelog_label.lineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'line' in table 'log_label' is DBNull.", e) End Try End Get Set Me(Me.tablelog_label.lineColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_label.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_label' is DBNull.", e) End Try End Get Set Me(Me.tablelog_label.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_label.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_label' is DBNull.", e) End Try End Get Set Me(Me.tablelog_label.lastupdatedbyColumn) = value End Set End Property _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_label.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_label.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_label.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_label.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssoNull() As Boolean Return Me.IsNull(Me.tablelog_label.soColumn) End Function _ Public Sub SetsoNull() Me(Me.tablelog_label.soColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslineNull() As Boolean Return Me.IsNull(Me.tablelog_label.lineColumn) End Function _ Public Sub SetlineNull() Me(Me.tablelog_label.lineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_label.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_label.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_label.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_label.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_labelHistRow Inherits Global.System.Data.DataRow Private tablelog_labelHist As log_labelHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_labelHist = CType(Me.Table,log_labelHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablelog_labelHist.lineNumColumn),Long) End Get Set Me(Me.tablelog_labelHist.lineNumColumn) = value End Set End Property _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_labelHist.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_labelHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_labelHist.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_labelHist.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_labelHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_labelHist.serialnoColumn) = value End Set End Property _ Public Property so() As String Get Try Return CType(Me(Me.tablelog_labelHist.soColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'so' in table 'log_labelHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_labelHist.soColumn) = value End Set End Property _ Public Property line() As String Get Try Return CType(Me(Me.tablelog_labelHist.lineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'line' in table 'log_labelHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_labelHist.lineColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_labelHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_labelHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_labelHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_labelHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_labelHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_labelHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_labelHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_labelHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_labelHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_labelHist.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_labelHist.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_labelHist.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_labelHist.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssoNull() As Boolean Return Me.IsNull(Me.tablelog_labelHist.soColumn) End Function _ Public Sub SetsoNull() Me(Me.tablelog_labelHist.soColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslineNull() As Boolean Return Me.IsNull(Me.tablelog_labelHist.lineColumn) End Function _ Public Sub SetlineNull() Me(Me.tablelog_labelHist.lineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_labelHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_labelHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_labelHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_labelHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_labelHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_labelHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_linkRow Inherits Global.System.Data.DataRow Private tablelog_link As log_linkDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_link = CType(Me.Table,log_linkDataTable) End Sub _ Public Property trackingno() As String Get Try Return CType(Me(Me.tablelog_link.trackingnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'trackingno' in table 'log_link' is DBNull.", e) End Try End Get Set Me(Me.tablelog_link.trackingnoColumn) = value End Set End Property _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_link.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_link' is DBNull.", e) End Try End Get Set Me(Me.tablelog_link.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_link.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_link' is DBNull.", e) End Try End Get Set Me(Me.tablelog_link.serialnoColumn) = value End Set End Property _ Public Property cardnoLink() As String Get Try Return CType(Me(Me.tablelog_link.cardnoLinkColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardnoLink' in table 'log_link' is DBNull.", e) End Try End Get Set Me(Me.tablelog_link.cardnoLinkColumn) = value End Set End Property _ Public Property serialnoLink() As String Get Try Return CType(Me(Me.tablelog_link.serialnoLinkColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialnoLink' in table 'log_link' is DBNull.", e) End Try End Get Set Me(Me.tablelog_link.serialnoLinkColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_link.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_link' is DBNull.", e) End Try End Get Set Me(Me.tablelog_link.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_link.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_link' is DBNull.", e) End Try End Get Set Me(Me.tablelog_link.lastupdatedbyColumn) = value End Set End Property _ Public Function IstrackingnoNull() As Boolean Return Me.IsNull(Me.tablelog_link.trackingnoColumn) End Function _ Public Sub SettrackingnoNull() Me(Me.tablelog_link.trackingnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_link.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_link.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_link.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_link.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscardnoLinkNull() As Boolean Return Me.IsNull(Me.tablelog_link.cardnoLinkColumn) End Function _ Public Sub SetcardnoLinkNull() Me(Me.tablelog_link.cardnoLinkColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoLinkNull() As Boolean Return Me.IsNull(Me.tablelog_link.serialnoLinkColumn) End Function _ Public Sub SetserialnoLinkNull() Me(Me.tablelog_link.serialnoLinkColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_link.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_link.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_link.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_link.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_linkHistRow Inherits Global.System.Data.DataRow Private tablelog_linkHist As log_linkHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_linkHist = CType(Me.Table,log_linkHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablelog_linkHist.lineNumColumn),Long) End Get Set Me(Me.tablelog_linkHist.lineNumColumn) = value End Set End Property _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_linkHist.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_linkHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_linkHist.cardnoColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_linkHist.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_linkHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_linkHist.serialnoColumn) = value End Set End Property _ Public Property cardnoLink() As String Get Try Return CType(Me(Me.tablelog_linkHist.cardnoLinkColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardnoLink' in table 'log_linkHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_linkHist.cardnoLinkColumn) = value End Set End Property _ Public Property serialnoLink() As String Get Try Return CType(Me(Me.tablelog_linkHist.serialnoLinkColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialnoLink' in table 'log_linkHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_linkHist.serialnoLinkColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_linkHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_linkHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_linkHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_linkHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_linkHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_linkHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_linkHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_linkHist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_linkHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_linkHist.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_linkHist.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_linkHist.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_linkHist.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscardnoLinkNull() As Boolean Return Me.IsNull(Me.tablelog_linkHist.cardnoLinkColumn) End Function _ Public Sub SetcardnoLinkNull() Me(Me.tablelog_linkHist.cardnoLinkColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoLinkNull() As Boolean Return Me.IsNull(Me.tablelog_linkHist.serialnoLinkColumn) End Function _ Public Sub SetserialnoLinkNull() Me(Me.tablelog_linkHist.serialnoLinkColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_linkHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_linkHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_linkHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_linkHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_linkHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_linkHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_lotRow Inherits Global.System.Data.DataRow Private tablelog_lot As log_lotDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_lot = CType(Me.Table,log_lotDataTable) End Sub _ Public Property lotNumber() As String Get Try Return CType(Me(Me.tablelog_lot.lotNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lotNumber' in table 'log_lot' is DBNull.", e) End Try End Get Set Me(Me.tablelog_lot.lotNumberColumn) = value End Set End Property _ Public Property stage() As String Get Try Return CType(Me(Me.tablelog_lot.stageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stage' in table 'log_lot' is DBNull.", e) End Try End Get Set Me(Me.tablelog_lot.stageColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_lot.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_lot' is DBNull.", e) End Try End Get Set Me(Me.tablelog_lot.statusColumn) = value End Set End Property _ Public Property samplingSize() As Integer Get Try Return CType(Me(Me.tablelog_lot.samplingSizeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'samplingSize' in table 'log_lot' is DBNull.", e) End Try End Get Set Me(Me.tablelog_lot.samplingSizeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_lot.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_lot' is DBNull.", e) End Try End Get Set Me(Me.tablelog_lot.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_lot.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_lot' is DBNull.", e) End Try End Get Set Me(Me.tablelog_lot.lastupdatedbyColumn) = value End Set End Property _ Public Function IslotNumberNull() As Boolean Return Me.IsNull(Me.tablelog_lot.lotNumberColumn) End Function _ Public Sub SetlotNumberNull() Me(Me.tablelog_lot.lotNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstageNull() As Boolean Return Me.IsNull(Me.tablelog_lot.stageColumn) End Function _ Public Sub SetstageNull() Me(Me.tablelog_lot.stageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_lot.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_lot.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssamplingSizeNull() As Boolean Return Me.IsNull(Me.tablelog_lot.samplingSizeColumn) End Function _ Public Sub SetsamplingSizeNull() Me(Me.tablelog_lot.samplingSizeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_lot.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_lot.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_lot.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_lot.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_passRow Inherits Global.System.Data.DataRow Private tablelog_pass As log_passDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_pass = CType(Me.Table,log_passDataTable) End Sub _ Public Property trackingno() As String Get Try Return CType(Me(Me.tablelog_pass.trackingnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'trackingno' in table 'log_pass' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass.trackingnoColumn) = value End Set End Property _ Public Property ptNo() As String Get Try Return CType(Me(Me.tablelog_pass.ptNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptNo' in table 'log_pass' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass.ptNoColumn) = value End Set End Property _ Public Property stage() As String Get Try Return CType(Me(Me.tablelog_pass.stageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stage' in table 'log_pass' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass.stageColumn) = value End Set End Property _ Public Property quantity() As Integer Get Try Return CType(Me(Me.tablelog_pass.quantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'log_pass' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass.quantityColumn) = value End Set End Property _ Public Property machine() As String Get Try Return CType(Me(Me.tablelog_pass.machineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'machine' in table 'log_pass' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass.machineColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_pass.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_pass' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_pass.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_pass' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_pass.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_pass' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass.lastupdatedbyColumn) = value End Set End Property _ Public Function IstrackingnoNull() As Boolean Return Me.IsNull(Me.tablelog_pass.trackingnoColumn) End Function _ Public Sub SettrackingnoNull() Me(Me.tablelog_pass.trackingnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptNoNull() As Boolean Return Me.IsNull(Me.tablelog_pass.ptNoColumn) End Function _ Public Sub SetptNoNull() Me(Me.tablelog_pass.ptNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstageNull() As Boolean Return Me.IsNull(Me.tablelog_pass.stageColumn) End Function _ Public Sub SetstageNull() Me(Me.tablelog_pass.stageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablelog_pass.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablelog_pass.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmachineNull() As Boolean Return Me.IsNull(Me.tablelog_pass.machineColumn) End Function _ Public Sub SetmachineNull() Me(Me.tablelog_pass.machineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_pass.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_pass.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_pass.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_pass.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_pass.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_pass.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_pass_serialRow Inherits Global.System.Data.DataRow Private tablelog_pass_serial As log_pass_serialDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_pass_serial = CType(Me.Table,log_pass_serialDataTable) End Sub _ Public Property trackingno() As String Get Try Return CType(Me(Me.tablelog_pass_serial.trackingnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'trackingno' in table 'log_pass_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass_serial.trackingnoColumn) = value End Set End Property _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_pass_serial.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_pass_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass_serial.cardnoColumn) = value End Set End Property _ Public Property stage() As String Get Try Return CType(Me(Me.tablelog_pass_serial.stageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stage' in table 'log_pass_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass_serial.stageColumn) = value End Set End Property _ Public Property machine() As String Get Try Return CType(Me(Me.tablelog_pass_serial.machineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'machine' in table 'log_pass_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass_serial.machineColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_pass_serial.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_pass_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass_serial.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_pass_serial.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_pass_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass_serial.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_pass_serial.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_pass_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_pass_serial.lastupdatedbyColumn) = value End Set End Property _ Public Function IstrackingnoNull() As Boolean Return Me.IsNull(Me.tablelog_pass_serial.trackingnoColumn) End Function _ Public Sub SettrackingnoNull() Me(Me.tablelog_pass_serial.trackingnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_pass_serial.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_pass_serial.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstageNull() As Boolean Return Me.IsNull(Me.tablelog_pass_serial.stageColumn) End Function _ Public Sub SetstageNull() Me(Me.tablelog_pass_serial.stageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmachineNull() As Boolean Return Me.IsNull(Me.tablelog_pass_serial.machineColumn) End Function _ Public Sub SetmachineNull() Me(Me.tablelog_pass_serial.machineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_pass_serial.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_pass_serial.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_pass_serial.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_pass_serial.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_pass_serial.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_pass_serial.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_PreTest_DetailRow Inherits Global.System.Data.DataRow Private tablelog_PreTest_Detail As log_PreTest_DetailDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_PreTest_Detail = CType(Me.Table,log_PreTest_DetailDataTable) End Sub _ Public Property poNumber() As String Get Try Return CType(Me(Me.tablelog_PreTest_Detail.poNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poNumber' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.poNumberColumn) = value End Set End Property _ Public Property poLine() As String Get Try Return CType(Me(Me.tablelog_PreTest_Detail.poLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.poLineColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tablelog_PreTest_Detail.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.serialnoColumn) = value End Set End Property _ Public Property serialStatus() As String Get Try Return CType(Me(Me.tablelog_PreTest_Detail.serialStatusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialStatus' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.serialStatusColumn) = value End Set End Property _ Public Property boxNo() As String Get Try Return CType(Me(Me.tablelog_PreTest_Detail.boxNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'boxNo' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.boxNoColumn) = value End Set End Property _ Public Property cnNo() As String Get Try Return CType(Me(Me.tablelog_PreTest_Detail.cnNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cnNo' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.cnNoColumn) = value End Set End Property _ Public Property shipNo() As String Get Try Return CType(Me(Me.tablelog_PreTest_Detail.shipNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipNo' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.shipNoColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_PreTest_Detail.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_PreTest_Detail.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_PreTest_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_PreTest_Detail.lastupdatedbyColumn) = value End Set End Property _ Public Function IspoNumberNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.poNumberColumn) End Function _ Public Sub SetpoNumberNull() Me(Me.tablelog_PreTest_Detail.poNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tablelog_PreTest_Detail.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tablelog_PreTest_Detail.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialStatusNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.serialStatusColumn) End Function _ Public Sub SetserialStatusNull() Me(Me.tablelog_PreTest_Detail.serialStatusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsboxNoNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.boxNoColumn) End Function _ Public Sub SetboxNoNull() Me(Me.tablelog_PreTest_Detail.boxNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscnNoNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.cnNoColumn) End Function _ Public Sub SetcnNoNull() Me(Me.tablelog_PreTest_Detail.cnNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipNoNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.shipNoColumn) End Function _ Public Sub SetshipNoNull() Me(Me.tablelog_PreTest_Detail.shipNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_PreTest_Detail.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_PreTest_Detail.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_PreTest_Detail.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_repairRow Inherits Global.System.Data.DataRow Private tablelog_repair As log_repairDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_repair = CType(Me.Table,log_repairDataTable) End Sub _ Public Property trackingno() As String Get Return CType(Me(Me.tablelog_repair.trackingnoColumn),String) End Get Set Me(Me.tablelog_repair.trackingnoColumn) = value End Set End Property _ Public Property ptNo() As String Get Try Return CType(Me(Me.tablelog_repair.ptNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptNo' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.ptNoColumn) = value End Set End Property _ Public Property stage() As String Get Try Return CType(Me(Me.tablelog_repair.stageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stage' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.stageColumn) = value End Set End Property _ Public Property machine() As String Get Try Return CType(Me(Me.tablelog_repair.machineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'machine' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.machineColumn) = value End Set End Property _ Public Property category() As String Get Try Return CType(Me(Me.tablelog_repair.categoryColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'category' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.categoryColumn) = value End Set End Property _ Public Property defect() As String Get Try Return CType(Me(Me.tablelog_repair.defectColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'defect' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.defectColumn) = value End Set End Property _ Public Property location() As String Get Try Return CType(Me(Me.tablelog_repair.locationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'location' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.locationColumn) = value End Set End Property _ Public Property details() As String Get Try Return CType(Me(Me.tablelog_repair.detailsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'details' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.detailsColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_repair.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.statusColumn) = value End Set End Property _ Public Property quantity() As Integer Get Try Return CType(Me(Me.tablelog_repair.quantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.quantityColumn) = value End Set End Property _ Public Property unitQuantity() As Integer Get Try Return CType(Me(Me.tablelog_repair.unitQuantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'unitQuantity' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.unitQuantityColumn) = value End Set End Property _ Public Property addinfo() As String Get Try Return CType(Me(Me.tablelog_repair.addinfoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'addinfo' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.addinfoColumn) = value End Set End Property _ Public Property serialAffected() As String Get Try Return CType(Me(Me.tablelog_repair.serialAffectedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialAffected' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.serialAffectedColumn) = value End Set End Property _ Public Property component() As String Get Try Return CType(Me(Me.tablelog_repair.componentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'component' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.componentColumn) = value End Set End Property _ Public Property remarks() As String Get Try Return CType(Me(Me.tablelog_repair.remarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'remarks' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.remarksColumn) = value End Set End Property _ Public Property rejectDate() As Date Get Try Return CType(Me(Me.tablelog_repair.rejectDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'rejectDate' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.rejectDateColumn) = value End Set End Property _ Public Property rejectUser() As String Get Try Return CType(Me(Me.tablelog_repair.rejectUserColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'rejectUser' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.rejectUserColumn) = value End Set End Property _ Public Property repairDate() As Date Get Try Return CType(Me(Me.tablelog_repair.repairDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'repairDate' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.repairDateColumn) = value End Set End Property _ Public Property repairUser() As String Get Try Return CType(Me(Me.tablelog_repair.repairUserColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'repairUser' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.repairUserColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_repair.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_repair.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_repair' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair.lastupdatedbyColumn) = value End Set End Property _ Public Function IsptNoNull() As Boolean Return Me.IsNull(Me.tablelog_repair.ptNoColumn) End Function _ Public Sub SetptNoNull() Me(Me.tablelog_repair.ptNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstageNull() As Boolean Return Me.IsNull(Me.tablelog_repair.stageColumn) End Function _ Public Sub SetstageNull() Me(Me.tablelog_repair.stageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmachineNull() As Boolean Return Me.IsNull(Me.tablelog_repair.machineColumn) End Function _ Public Sub SetmachineNull() Me(Me.tablelog_repair.machineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscategoryNull() As Boolean Return Me.IsNull(Me.tablelog_repair.categoryColumn) End Function _ Public Sub SetcategoryNull() Me(Me.tablelog_repair.categoryColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdefectNull() As Boolean Return Me.IsNull(Me.tablelog_repair.defectColumn) End Function _ Public Sub SetdefectNull() Me(Me.tablelog_repair.defectColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslocationNull() As Boolean Return Me.IsNull(Me.tablelog_repair.locationColumn) End Function _ Public Sub SetlocationNull() Me(Me.tablelog_repair.locationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdetailsNull() As Boolean Return Me.IsNull(Me.tablelog_repair.detailsColumn) End Function _ Public Sub SetdetailsNull() Me(Me.tablelog_repair.detailsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_repair.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_repair.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablelog_repair.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablelog_repair.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsunitQuantityNull() As Boolean Return Me.IsNull(Me.tablelog_repair.unitQuantityColumn) End Function _ Public Sub SetunitQuantityNull() Me(Me.tablelog_repair.unitQuantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsaddinfoNull() As Boolean Return Me.IsNull(Me.tablelog_repair.addinfoColumn) End Function _ Public Sub SetaddinfoNull() Me(Me.tablelog_repair.addinfoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialAffectedNull() As Boolean Return Me.IsNull(Me.tablelog_repair.serialAffectedColumn) End Function _ Public Sub SetserialAffectedNull() Me(Me.tablelog_repair.serialAffectedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscomponentNull() As Boolean Return Me.IsNull(Me.tablelog_repair.componentColumn) End Function _ Public Sub SetcomponentNull() Me(Me.tablelog_repair.componentColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsremarksNull() As Boolean Return Me.IsNull(Me.tablelog_repair.remarksColumn) End Function _ Public Sub SetremarksNull() Me(Me.tablelog_repair.remarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrejectDateNull() As Boolean Return Me.IsNull(Me.tablelog_repair.rejectDateColumn) End Function _ Public Sub SetrejectDateNull() Me(Me.tablelog_repair.rejectDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrejectUserNull() As Boolean Return Me.IsNull(Me.tablelog_repair.rejectUserColumn) End Function _ Public Sub SetrejectUserNull() Me(Me.tablelog_repair.rejectUserColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrepairDateNull() As Boolean Return Me.IsNull(Me.tablelog_repair.repairDateColumn) End Function _ Public Sub SetrepairDateNull() Me(Me.tablelog_repair.repairDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrepairUserNull() As Boolean Return Me.IsNull(Me.tablelog_repair.repairUserColumn) End Function _ Public Sub SetrepairUserNull() Me(Me.tablelog_repair.repairUserColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_repair.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_repair.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_repair.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_repair.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_repair_faRow Inherits Global.System.Data.DataRow Private tablelog_repair_fa As log_repair_faDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_repair_fa = CType(Me.Table,log_repair_faDataTable) End Sub _ Public Property trackingno() As String Get Return CType(Me(Me.tablelog_repair_fa.trackingnoColumn),String) End Get Set Me(Me.tablelog_repair_fa.trackingnoColumn) = value End Set End Property _ Public Property ptNo() As String Get Try Return CType(Me(Me.tablelog_repair_fa.ptNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptNo' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.ptNoColumn) = value End Set End Property _ Public Property stage() As String Get Try Return CType(Me(Me.tablelog_repair_fa.stageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stage' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.stageColumn) = value End Set End Property _ Public Property machine() As String Get Try Return CType(Me(Me.tablelog_repair_fa.machineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'machine' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.machineColumn) = value End Set End Property _ Public Property category() As String Get Try Return CType(Me(Me.tablelog_repair_fa.categoryColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'category' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.categoryColumn) = value End Set End Property _ Public Property defect() As String Get Try Return CType(Me(Me.tablelog_repair_fa.defectColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'defect' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.defectColumn) = value End Set End Property _ Public Property location() As String Get Try Return CType(Me(Me.tablelog_repair_fa.locationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'location' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.locationColumn) = value End Set End Property _ Public Property details() As String Get Try Return CType(Me(Me.tablelog_repair_fa.detailsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'details' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.detailsColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_repair_fa.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.statusColumn) = value End Set End Property _ Public Property quantity() As Integer Get Try Return CType(Me(Me.tablelog_repair_fa.quantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.quantityColumn) = value End Set End Property _ Public Property unitQuantity() As Integer Get Try Return CType(Me(Me.tablelog_repair_fa.unitQuantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'unitQuantity' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.unitQuantityColumn) = value End Set End Property _ Public Property addinfo() As String Get Try Return CType(Me(Me.tablelog_repair_fa.addinfoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'addinfo' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.addinfoColumn) = value End Set End Property _ Public Property serialAffected() As String Get Try Return CType(Me(Me.tablelog_repair_fa.serialAffectedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialAffected' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.serialAffectedColumn) = value End Set End Property _ Public Property component() As String Get Try Return CType(Me(Me.tablelog_repair_fa.componentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'component' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.componentColumn) = value End Set End Property _ Public Property remarks() As String Get Try Return CType(Me(Me.tablelog_repair_fa.remarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'remarks' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.remarksColumn) = value End Set End Property _ Public Property rejectDate() As Date Get Try Return CType(Me(Me.tablelog_repair_fa.rejectDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'rejectDate' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.rejectDateColumn) = value End Set End Property _ Public Property rejectUser() As String Get Try Return CType(Me(Me.tablelog_repair_fa.rejectUserColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'rejectUser' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.rejectUserColumn) = value End Set End Property _ Public Property repairDate() As Date Get Try Return CType(Me(Me.tablelog_repair_fa.repairDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'repairDate' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.repairDateColumn) = value End Set End Property _ Public Property repairUser() As String Get Try Return CType(Me(Me.tablelog_repair_fa.repairUserColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'repairUser' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.repairUserColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_repair_fa.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_repair_fa.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_repair_fa' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_fa.lastupdatedbyColumn) = value End Set End Property _ Public Function IsptNoNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.ptNoColumn) End Function _ Public Sub SetptNoNull() Me(Me.tablelog_repair_fa.ptNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstageNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.stageColumn) End Function _ Public Sub SetstageNull() Me(Me.tablelog_repair_fa.stageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmachineNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.machineColumn) End Function _ Public Sub SetmachineNull() Me(Me.tablelog_repair_fa.machineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscategoryNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.categoryColumn) End Function _ Public Sub SetcategoryNull() Me(Me.tablelog_repair_fa.categoryColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdefectNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.defectColumn) End Function _ Public Sub SetdefectNull() Me(Me.tablelog_repair_fa.defectColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslocationNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.locationColumn) End Function _ Public Sub SetlocationNull() Me(Me.tablelog_repair_fa.locationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdetailsNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.detailsColumn) End Function _ Public Sub SetdetailsNull() Me(Me.tablelog_repair_fa.detailsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_repair_fa.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablelog_repair_fa.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsunitQuantityNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.unitQuantityColumn) End Function _ Public Sub SetunitQuantityNull() Me(Me.tablelog_repair_fa.unitQuantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsaddinfoNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.addinfoColumn) End Function _ Public Sub SetaddinfoNull() Me(Me.tablelog_repair_fa.addinfoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialAffectedNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.serialAffectedColumn) End Function _ Public Sub SetserialAffectedNull() Me(Me.tablelog_repair_fa.serialAffectedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscomponentNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.componentColumn) End Function _ Public Sub SetcomponentNull() Me(Me.tablelog_repair_fa.componentColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsremarksNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.remarksColumn) End Function _ Public Sub SetremarksNull() Me(Me.tablelog_repair_fa.remarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrejectDateNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.rejectDateColumn) End Function _ Public Sub SetrejectDateNull() Me(Me.tablelog_repair_fa.rejectDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrejectUserNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.rejectUserColumn) End Function _ Public Sub SetrejectUserNull() Me(Me.tablelog_repair_fa.rejectUserColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrepairDateNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.repairDateColumn) End Function _ Public Sub SetrepairDateNull() Me(Me.tablelog_repair_fa.repairDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrepairUserNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.repairUserColumn) End Function _ Public Sub SetrepairUserNull() Me(Me.tablelog_repair_fa.repairUserColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_repair_fa.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_repair_fa.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_repair_fa.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_repair_serialRow Inherits Global.System.Data.DataRow Private tablelog_repair_serial As log_repair_serialDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_repair_serial = CType(Me.Table,log_repair_serialDataTable) End Sub _ Public Property trackingno() As String Get Return CType(Me(Me.tablelog_repair_serial.trackingnoColumn),String) End Get Set Me(Me.tablelog_repair_serial.trackingnoColumn) = value End Set End Property _ Public Property cardno() As String Get Try Return CType(Me(Me.tablelog_repair_serial.cardnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cardno' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.cardnoColumn) = value End Set End Property _ Public Property stage() As String Get Try Return CType(Me(Me.tablelog_repair_serial.stageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stage' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.stageColumn) = value End Set End Property _ Public Property machine() As String Get Try Return CType(Me(Me.tablelog_repair_serial.machineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'machine' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.machineColumn) = value End Set End Property _ Public Property category() As String Get Try Return CType(Me(Me.tablelog_repair_serial.categoryColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'category' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.categoryColumn) = value End Set End Property _ Public Property defect() As String Get Try Return CType(Me(Me.tablelog_repair_serial.defectColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'defect' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.defectColumn) = value End Set End Property _ Public Property location() As String Get Try Return CType(Me(Me.tablelog_repair_serial.locationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'location' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.locationColumn) = value End Set End Property _ Public Property details() As String Get Try Return CType(Me(Me.tablelog_repair_serial.detailsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'details' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.detailsColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_repair_serial.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.statusColumn) = value End Set End Property _ Public Property addinfo() As String Get Try Return CType(Me(Me.tablelog_repair_serial.addinfoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'addinfo' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.addinfoColumn) = value End Set End Property _ Public Property serialAffected() As String Get Try Return CType(Me(Me.tablelog_repair_serial.serialAffectedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialAffected' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.serialAffectedColumn) = value End Set End Property _ Public Property component() As String Get Try Return CType(Me(Me.tablelog_repair_serial.componentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'component' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.componentColumn) = value End Set End Property _ Public Property remarks() As String Get Try Return CType(Me(Me.tablelog_repair_serial.remarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'remarks' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.remarksColumn) = value End Set End Property _ Public Property rejectDate() As Date Get Try Return CType(Me(Me.tablelog_repair_serial.rejectDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'rejectDate' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.rejectDateColumn) = value End Set End Property _ Public Property rejectUser() As String Get Try Return CType(Me(Me.tablelog_repair_serial.rejectUserColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'rejectUser' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.rejectUserColumn) = value End Set End Property _ Public Property repairDate() As Date Get Try Return CType(Me(Me.tablelog_repair_serial.repairDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'repairDate' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.repairDateColumn) = value End Set End Property _ Public Property repairUser() As String Get Try Return CType(Me(Me.tablelog_repair_serial.repairUserColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'repairUser' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.repairUserColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_repair_serial.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_repair_serial.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_repair_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_repair_serial.lastupdatedbyColumn) = value End Set End Property _ Public Function IscardnoNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.cardnoColumn) End Function _ Public Sub SetcardnoNull() Me(Me.tablelog_repair_serial.cardnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstageNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.stageColumn) End Function _ Public Sub SetstageNull() Me(Me.tablelog_repair_serial.stageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmachineNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.machineColumn) End Function _ Public Sub SetmachineNull() Me(Me.tablelog_repair_serial.machineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscategoryNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.categoryColumn) End Function _ Public Sub SetcategoryNull() Me(Me.tablelog_repair_serial.categoryColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdefectNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.defectColumn) End Function _ Public Sub SetdefectNull() Me(Me.tablelog_repair_serial.defectColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslocationNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.locationColumn) End Function _ Public Sub SetlocationNull() Me(Me.tablelog_repair_serial.locationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdetailsNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.detailsColumn) End Function _ Public Sub SetdetailsNull() Me(Me.tablelog_repair_serial.detailsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_repair_serial.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsaddinfoNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.addinfoColumn) End Function _ Public Sub SetaddinfoNull() Me(Me.tablelog_repair_serial.addinfoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialAffectedNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.serialAffectedColumn) End Function _ Public Sub SetserialAffectedNull() Me(Me.tablelog_repair_serial.serialAffectedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscomponentNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.componentColumn) End Function _ Public Sub SetcomponentNull() Me(Me.tablelog_repair_serial.componentColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsremarksNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.remarksColumn) End Function _ Public Sub SetremarksNull() Me(Me.tablelog_repair_serial.remarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrejectDateNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.rejectDateColumn) End Function _ Public Sub SetrejectDateNull() Me(Me.tablelog_repair_serial.rejectDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrejectUserNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.rejectUserColumn) End Function _ Public Sub SetrejectUserNull() Me(Me.tablelog_repair_serial.rejectUserColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrepairDateNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.repairDateColumn) End Function _ Public Sub SetrepairDateNull() Me(Me.tablelog_repair_serial.repairDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrepairUserNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.repairUserColumn) End Function _ Public Sub SetrepairUserNull() Me(Me.tablelog_repair_serial.repairUserColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_repair_serial.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_repair_serial.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_repair_serial.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_serialRow Inherits Global.System.Data.DataRow Private tablelog_serial As log_serialDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_serial = CType(Me.Table,log_serialDataTable) End Sub _ Public Property batchno() As String Get Return CType(Me(Me.tablelog_serial.batchnoColumn),String) End Get Set Me(Me.tablelog_serial.batchnoColumn) = value End Set End Property _ Public Property serialStart() As String Get Try Return CType(Me(Me.tablelog_serial.serialStartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialStart' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.serialStartColumn) = value End Set End Property _ Public Property serialEnd() As String Get Try Return CType(Me(Me.tablelog_serial.serialEndColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialEnd' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.serialEndColumn) = value End Set End Property _ Public Property serialStartHex() As String Get Try Return CType(Me(Me.tablelog_serial.serialStartHexColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialStartHex' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.serialStartHexColumn) = value End Set End Property _ Public Property serialEndHex() As String Get Try Return CType(Me(Me.tablelog_serial.serialEndHexColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialEndHex' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.serialEndHexColumn) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tablelog_serial.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.modelColumn) = value End Set End Property _ Public Property revision() As String Get Try Return CType(Me(Me.tablelog_serial.revisionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'revision' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.revisionColumn) = value End Set End Property _ Public Property modelRef() As String Get Try Return CType(Me(Me.tablelog_serial.modelRefColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelRef' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.modelRefColumn) = value End Set End Property _ Public Property modelRefRev() As String Get Try Return CType(Me(Me.tablelog_serial.modelRefRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelRefRev' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.modelRefRevColumn) = value End Set End Property _ Public Property alvBatchRef() As String Get Try Return CType(Me(Me.tablelog_serial.alvBatchRefColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'alvBatchRef' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.alvBatchRefColumn) = value End Set End Property _ Public Property quantity() As Integer Get Try Return CType(Me(Me.tablelog_serial.quantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.quantityColumn) = value End Set End Property _ Public Property remarks() As String Get Try Return CType(Me(Me.tablelog_serial.remarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'remarks' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.remarksColumn) = value End Set End Property _ Public Property fileRef() As String Get Try Return CType(Me(Me.tablelog_serial.fileRefColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'fileRef' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.fileRefColumn) = value End Set End Property _ Public Property fileRef2() As String Get Try Return CType(Me(Me.tablelog_serial.fileRef2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'fileRef2' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.fileRef2Column) = value End Set End Property _ Public Property generated() As Date Get Try Return CType(Me(Me.tablelog_serial.generatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'generated' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.generatedColumn) = value End Set End Property _ Public Property generatedby() As String Get Try Return CType(Me(Me.tablelog_serial.generatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'generatedby' in table 'log_serial' is DBNull.", e) End Try End Get Set Me(Me.tablelog_serial.generatedbyColumn) = value End Set End Property _ Public Function IsserialStartNull() As Boolean Return Me.IsNull(Me.tablelog_serial.serialStartColumn) End Function _ Public Sub SetserialStartNull() Me(Me.tablelog_serial.serialStartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialEndNull() As Boolean Return Me.IsNull(Me.tablelog_serial.serialEndColumn) End Function _ Public Sub SetserialEndNull() Me(Me.tablelog_serial.serialEndColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialStartHexNull() As Boolean Return Me.IsNull(Me.tablelog_serial.serialStartHexColumn) End Function _ Public Sub SetserialStartHexNull() Me(Me.tablelog_serial.serialStartHexColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialEndHexNull() As Boolean Return Me.IsNull(Me.tablelog_serial.serialEndHexColumn) End Function _ Public Sub SetserialEndHexNull() Me(Me.tablelog_serial.serialEndHexColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tablelog_serial.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tablelog_serial.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrevisionNull() As Boolean Return Me.IsNull(Me.tablelog_serial.revisionColumn) End Function _ Public Sub SetrevisionNull() Me(Me.tablelog_serial.revisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelRefNull() As Boolean Return Me.IsNull(Me.tablelog_serial.modelRefColumn) End Function _ Public Sub SetmodelRefNull() Me(Me.tablelog_serial.modelRefColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelRefRevNull() As Boolean Return Me.IsNull(Me.tablelog_serial.modelRefRevColumn) End Function _ Public Sub SetmodelRefRevNull() Me(Me.tablelog_serial.modelRefRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsalvBatchRefNull() As Boolean Return Me.IsNull(Me.tablelog_serial.alvBatchRefColumn) End Function _ Public Sub SetalvBatchRefNull() Me(Me.tablelog_serial.alvBatchRefColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablelog_serial.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablelog_serial.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsremarksNull() As Boolean Return Me.IsNull(Me.tablelog_serial.remarksColumn) End Function _ Public Sub SetremarksNull() Me(Me.tablelog_serial.remarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsfileRefNull() As Boolean Return Me.IsNull(Me.tablelog_serial.fileRefColumn) End Function _ Public Sub SetfileRefNull() Me(Me.tablelog_serial.fileRefColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsfileRef2Null() As Boolean Return Me.IsNull(Me.tablelog_serial.fileRef2Column) End Function _ Public Sub SetfileRef2Null() Me(Me.tablelog_serial.fileRef2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsgeneratedNull() As Boolean Return Me.IsNull(Me.tablelog_serial.generatedColumn) End Function _ Public Sub SetgeneratedNull() Me(Me.tablelog_serial.generatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsgeneratedbyNull() As Boolean Return Me.IsNull(Me.tablelog_serial.generatedbyColumn) End Function _ Public Sub SetgeneratedbyNull() Me(Me.tablelog_serial.generatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_SH_DetailRow Inherits Global.System.Data.DataRow Private tablelog_SH_Detail As log_SH_DetailDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_SH_Detail = CType(Me.Table,log_SH_DetailDataTable) End Sub _ Public Property shipNo() As String Get Try Return CType(Me(Me.tablelog_SH_Detail.shipNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipNo' in table 'log_SH_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail.shipNoColumn) = value End Set End Property _ Public Property cnNo() As String Get Try Return CType(Me(Me.tablelog_SH_Detail.cnNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cnNo' in table 'log_SH_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail.cnNoColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_SH_Detail.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_SH_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_SH_Detail.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_SH_Detail' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail.lastupdatedbyColumn) = value End Set End Property _ Public Function IsshipNoNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail.shipNoColumn) End Function _ Public Sub SetshipNoNull() Me(Me.tablelog_SH_Detail.shipNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscnNoNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail.cnNoColumn) End Function _ Public Sub SetcnNoNull() Me(Me.tablelog_SH_Detail.cnNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_SH_Detail.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_SH_Detail.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_SH_Detail_HistRow Inherits Global.System.Data.DataRow Private tablelog_SH_Detail_Hist As log_SH_Detail_HistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_SH_Detail_Hist = CType(Me.Table,log_SH_Detail_HistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablelog_SH_Detail_Hist.lineNumColumn),Long) End Get Set Me(Me.tablelog_SH_Detail_Hist.lineNumColumn) = value End Set End Property _ Public Property shipNo() As String Get Try Return CType(Me(Me.tablelog_SH_Detail_Hist.shipNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipNo' in table 'log_SH_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail_Hist.shipNoColumn) = value End Set End Property _ Public Property cnNo() As String Get Try Return CType(Me(Me.tablelog_SH_Detail_Hist.cnNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cnNo' in table 'log_SH_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail_Hist.cnNoColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_SH_Detail_Hist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_SH_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail_Hist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_SH_Detail_Hist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_SH_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail_Hist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_SH_Detail_Hist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_SH_Detail_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Detail_Hist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsshipNoNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail_Hist.shipNoColumn) End Function _ Public Sub SetshipNoNull() Me(Me.tablelog_SH_Detail_Hist.shipNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscnNoNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail_Hist.cnNoColumn) End Function _ Public Sub SetcnNoNull() Me(Me.tablelog_SH_Detail_Hist.cnNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail_Hist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_SH_Detail_Hist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail_Hist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_SH_Detail_Hist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Detail_Hist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_SH_Detail_Hist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_SH_HeaderRow Inherits Global.System.Data.DataRow Private tablelog_SH_Header As log_SH_HeaderDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_SH_Header = CType(Me.Table,log_SH_HeaderDataTable) End Sub _ Public Property shipNo() As String Get Return CType(Me(Me.tablelog_SH_Header.shipNoColumn),String) End Get Set Me(Me.tablelog_SH_Header.shipNoColumn) = value End Set End Property _ Public Property shipdate() As Date Get Try Return CType(Me(Me.tablelog_SH_Header.shipdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipdate' in table 'log_SH_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Header.shipdateColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_SH_Header.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_SH_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Header.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_SH_Header.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_SH_Header' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Header.lastupdatedbyColumn) = value End Set End Property _ Public Function IsshipdateNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Header.shipdateColumn) End Function _ Public Sub SetshipdateNull() Me(Me.tablelog_SH_Header.shipdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Header.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_SH_Header.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Header.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_SH_Header.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class log_SH_Header_HistRow Inherits Global.System.Data.DataRow Private tablelog_SH_Header_Hist As log_SH_Header_HistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelog_SH_Header_Hist = CType(Me.Table,log_SH_Header_HistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablelog_SH_Header_Hist.lineNumColumn),Long) End Get Set Me(Me.tablelog_SH_Header_Hist.lineNumColumn) = value End Set End Property _ Public Property shipNo() As String Get Try Return CType(Me(Me.tablelog_SH_Header_Hist.shipNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipNo' in table 'log_SH_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Header_Hist.shipNoColumn) = value End Set End Property _ Public Property shipdate() As Date Get Try Return CType(Me(Me.tablelog_SH_Header_Hist.shipdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipdate' in table 'log_SH_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Header_Hist.shipdateColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelog_SH_Header_Hist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'log_SH_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Header_Hist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelog_SH_Header_Hist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'log_SH_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Header_Hist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelog_SH_Header_Hist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'log_SH_Header_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablelog_SH_Header_Hist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsshipNoNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Header_Hist.shipNoColumn) End Function _ Public Sub SetshipNoNull() Me(Me.tablelog_SH_Header_Hist.shipNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipdateNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Header_Hist.shipdateColumn) End Function _ Public Sub SetshipdateNull() Me(Me.tablelog_SH_Header_Hist.shipdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Header_Hist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelog_SH_Header_Hist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Header_Hist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelog_SH_Header_Hist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelog_SH_Header_Hist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelog_SH_Header_Hist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class lotNoRow Inherits Global.System.Data.DataRow Private tablelotNo As lotNoDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablelotNo = CType(Me.Table,lotNoDataTable) End Sub _ Public Property lotNo() As String Get Try Return CType(Me(Me.tablelotNo.lotNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lotNo' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.lotNoColumn) = value End Set End Property _ Public Property referenceNo() As String Get Try Return CType(Me(Me.tablelotNo.referenceNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'referenceNo' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.referenceNoColumn) = value End Set End Property _ Public Property partno() As String Get Try Return CType(Me(Me.tablelotNo.partnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partno' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.partnoColumn) = value End Set End Property _ Public Property stage() As String Get Try Return CType(Me(Me.tablelotNo.stageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stage' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.stageColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablelotNo.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.statusColumn) = value End Set End Property _ Public Property samplingSize() As Integer Get Try Return CType(Me(Me.tablelotNo.samplingSizeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'samplingSize' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.samplingSizeColumn) = value End Set End Property _ Public Property starttime() As Date Get Try Return CType(Me(Me.tablelotNo.starttimeColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'starttime' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.starttimeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablelotNo.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablelotNo.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'lotNo' is DBNull.", e) End Try End Get Set Me(Me.tablelotNo.lastupdatedbyColumn) = value End Set End Property _ Public Function IslotNoNull() As Boolean Return Me.IsNull(Me.tablelotNo.lotNoColumn) End Function _ Public Sub SetlotNoNull() Me(Me.tablelotNo.lotNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsreferenceNoNull() As Boolean Return Me.IsNull(Me.tablelotNo.referenceNoColumn) End Function _ Public Sub SetreferenceNoNull() Me(Me.tablelotNo.referenceNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartnoNull() As Boolean Return Me.IsNull(Me.tablelotNo.partnoColumn) End Function _ Public Sub SetpartnoNull() Me(Me.tablelotNo.partnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstageNull() As Boolean Return Me.IsNull(Me.tablelotNo.stageColumn) End Function _ Public Sub SetstageNull() Me(Me.tablelotNo.stageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablelotNo.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablelotNo.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssamplingSizeNull() As Boolean Return Me.IsNull(Me.tablelotNo.samplingSizeColumn) End Function _ Public Sub SetsamplingSizeNull() Me(Me.tablelotNo.samplingSizeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstarttimeNull() As Boolean Return Me.IsNull(Me.tablelotNo.starttimeColumn) End Function _ Public Sub SetstarttimeNull() Me(Me.tablelotNo.starttimeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablelotNo.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablelotNo.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablelotNo.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablelotNo.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class LotNumberRow Inherits Global.System.Data.DataRow Private tableLotNumber As LotNumberDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableLotNumber = CType(Me.Table,LotNumberDataTable) End Sub _ Public Property Lotnumber() As String Get Return CType(Me(Me.tableLotNumber.LotnumberColumn),String) End Get Set Me(Me.tableLotNumber.LotnumberColumn) = value End Set End Property _ Public Property LotStatus() As String Get Try Return CType(Me(Me.tableLotNumber.LotStatusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'LotStatus' in table 'LotNumber' is DBNull.", e) End Try End Get Set Me(Me.tableLotNumber.LotStatusColumn) = value End Set End Property _ Public Property CreatedDate() As Date Get Return CType(Me(Me.tableLotNumber.CreatedDateColumn),Date) End Get Set Me(Me.tableLotNumber.CreatedDateColumn) = value End Set End Property _ Public Property CreatedBy() As String Get Return CType(Me(Me.tableLotNumber.CreatedByColumn),String) End Get Set Me(Me.tableLotNumber.CreatedByColumn) = value End Set End Property _ Public Property UpdatedDate() As Date Get Try Return CType(Me(Me.tableLotNumber.UpdatedDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UpdatedDate' in table 'LotNumber' is DBNull.", e) End Try End Get Set Me(Me.tableLotNumber.UpdatedDateColumn) = value End Set End Property _ Public Property UpdatedBy() As String Get Try Return CType(Me(Me.tableLotNumber.UpdatedByColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UpdatedBy' in table 'LotNumber' is DBNull.", e) End Try End Get Set Me(Me.tableLotNumber.UpdatedByColumn) = value End Set End Property _ Public Property SampleQuantity() As Integer Get Try Return CType(Me(Me.tableLotNumber.SampleQuantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SampleQuantity' in table 'LotNumber' is DBNull.", e) End Try End Get Set Me(Me.tableLotNumber.SampleQuantityColumn) = value End Set End Property _ Public Function IsLotStatusNull() As Boolean Return Me.IsNull(Me.tableLotNumber.LotStatusColumn) End Function _ Public Sub SetLotStatusNull() Me(Me.tableLotNumber.LotStatusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUpdatedDateNull() As Boolean Return Me.IsNull(Me.tableLotNumber.UpdatedDateColumn) End Function _ Public Sub SetUpdatedDateNull() Me(Me.tableLotNumber.UpdatedDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUpdatedByNull() As Boolean Return Me.IsNull(Me.tableLotNumber.UpdatedByColumn) End Function _ Public Sub SetUpdatedByNull() Me(Me.tableLotNumber.UpdatedByColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSampleQuantityNull() As Boolean Return Me.IsNull(Me.tableLotNumber.SampleQuantityColumn) End Function _ Public Sub SetSampleQuantityNull() Me(Me.tableLotNumber.SampleQuantityColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class machineRow Inherits Global.System.Data.DataRow Private tablemachine As machineDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemachine = CType(Me.Table,machineDataTable) End Sub _ Public Property machine() As String Get Return CType(Me(Me.tablemachine.machineColumn),String) End Get Set Me(Me.tablemachine.machineColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tablemachine.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'machine' is DBNull.", e) End Try End Get Set Me(Me.tablemachine.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemachine.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'machine' is DBNull.", e) End Try End Get Set Me(Me.tablemachine.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemachine.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'machine' is DBNull.", e) End Try End Get Set Me(Me.tablemachine.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemachine.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'machine' is DBNull.", e) End Try End Get Set Me(Me.tablemachine.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tablemachine.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tablemachine.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemachine.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemachine.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemachine.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemachine.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemachine.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemachine.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class machineHistRow Inherits Global.System.Data.DataRow Private tablemachineHist As machineHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemachineHist = CType(Me.Table,machineHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablemachineHist.lineNumColumn),Long) End Get Set Me(Me.tablemachineHist.lineNumColumn) = value End Set End Property _ Public Property machine() As String Get Try Return CType(Me(Me.tablemachineHist.machineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'machine' in table 'machineHist' is DBNull.", e) End Try End Get Set Me(Me.tablemachineHist.machineColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tablemachineHist.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'machineHist' is DBNull.", e) End Try End Get Set Me(Me.tablemachineHist.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemachineHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'machineHist' is DBNull.", e) End Try End Get Set Me(Me.tablemachineHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablemachineHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'machineHist' is DBNull.", e) End Try End Get Set Me(Me.tablemachineHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemachineHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'machineHist' is DBNull.", e) End Try End Get Set Me(Me.tablemachineHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemachineHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'machineHist' is DBNull.", e) End Try End Get Set Me(Me.tablemachineHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmachineNull() As Boolean Return Me.IsNull(Me.tablemachineHist.machineColumn) End Function _ Public Sub SetmachineNull() Me(Me.tablemachineHist.machineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tablemachineHist.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tablemachineHist.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemachineHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemachineHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablemachineHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablemachineHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemachineHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemachineHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemachineHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemachineHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelRow Inherits Global.System.Data.DataRow Private tablemodel As modelDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodel = CType(Me.Table,modelDataTable) End Sub _ Public Property modelno() As String Get Return CType(Me(Me.tablemodel.modelnoColumn),String) End Get Set Me(Me.tablemodel.modelnoColumn) = value End Set End Property _ Public Property modelDesc1() As String Get Try Return CType(Me(Me.tablemodel.modelDesc1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc1' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.modelDesc1Column) = value End Set End Property _ Public Property modelDesc2() As String Get Try Return CType(Me(Me.tablemodel.modelDesc2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc2' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.modelDesc2Column) = value End Set End Property _ Public Property modelFamily() As String Get Try Return CType(Me(Me.tablemodel.modelFamilyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelFamily' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.modelFamilyColumn) = value End Set End Property _ Public Property modelType() As String Get Try Return CType(Me(Me.tablemodel.modelTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelType' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.modelTypeColumn) = value End Set End Property _ Public Property minRev() As String Get Try Return CType(Me(Me.tablemodel.minRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'minRev' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.minRevColumn) = value End Set End Property _ Public Property latestRev() As String Get Try Return CType(Me(Me.tablemodel.latestRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'latestRev' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.latestRevColumn) = value End Set End Property _ Public Property itemWt() As Single Get Try Return CType(Me(Me.tablemodel.itemWtColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'itemWt' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.itemWtColumn) = value End Set End Property _ Public Property batch() As Integer Get Try Return CType(Me(Me.tablemodel.batchColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'batch' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.batchColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodel.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodel.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodel.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'model' is DBNull.", e) End Try End Get Set Me(Me.tablemodel.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelDesc1Null() As Boolean Return Me.IsNull(Me.tablemodel.modelDesc1Column) End Function _ Public Sub SetmodelDesc1Null() Me(Me.tablemodel.modelDesc1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelDesc2Null() As Boolean Return Me.IsNull(Me.tablemodel.modelDesc2Column) End Function _ Public Sub SetmodelDesc2Null() Me(Me.tablemodel.modelDesc2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelFamilyNull() As Boolean Return Me.IsNull(Me.tablemodel.modelFamilyColumn) End Function _ Public Sub SetmodelFamilyNull() Me(Me.tablemodel.modelFamilyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelTypeNull() As Boolean Return Me.IsNull(Me.tablemodel.modelTypeColumn) End Function _ Public Sub SetmodelTypeNull() Me(Me.tablemodel.modelTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsminRevNull() As Boolean Return Me.IsNull(Me.tablemodel.minRevColumn) End Function _ Public Sub SetminRevNull() Me(Me.tablemodel.minRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslatestRevNull() As Boolean Return Me.IsNull(Me.tablemodel.latestRevColumn) End Function _ Public Sub SetlatestRevNull() Me(Me.tablemodel.latestRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsitemWtNull() As Boolean Return Me.IsNull(Me.tablemodel.itemWtColumn) End Function _ Public Sub SetitemWtNull() Me(Me.tablemodel.itemWtColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsbatchNull() As Boolean Return Me.IsNull(Me.tablemodel.batchColumn) End Function _ Public Sub SetbatchNull() Me(Me.tablemodel.batchColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodel.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodel.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodel.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodel.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodel.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodel.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelBackupRow Inherits Global.System.Data.DataRow Private tablemodelBackup As modelBackupDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelBackup = CType(Me.Table,modelBackupDataTable) End Sub _ Public Property modelno() As String Get Return CType(Me(Me.tablemodelBackup.modelnoColumn),String) End Get Set Me(Me.tablemodelBackup.modelnoColumn) = value End Set End Property _ Public Property modelDesc1() As String Get Try Return CType(Me(Me.tablemodelBackup.modelDesc1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc1' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.modelDesc1Column) = value End Set End Property _ Public Property modelDesc2() As String Get Try Return CType(Me(Me.tablemodelBackup.modelDesc2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc2' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.modelDesc2Column) = value End Set End Property _ Public Property modelFamily() As String Get Try Return CType(Me(Me.tablemodelBackup.modelFamilyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelFamily' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.modelFamilyColumn) = value End Set End Property _ Public Property modelType() As String Get Try Return CType(Me(Me.tablemodelBackup.modelTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelType' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.modelTypeColumn) = value End Set End Property _ Public Property minRev() As String Get Try Return CType(Me(Me.tablemodelBackup.minRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'minRev' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.minRevColumn) = value End Set End Property _ Public Property latestRev() As String Get Try Return CType(Me(Me.tablemodelBackup.latestRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'latestRev' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.latestRevColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelBackup.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelBackup.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelBackup.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelBackup' is DBNull.", e) End Try End Get Set Me(Me.tablemodelBackup.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelDesc1Null() As Boolean Return Me.IsNull(Me.tablemodelBackup.modelDesc1Column) End Function _ Public Sub SetmodelDesc1Null() Me(Me.tablemodelBackup.modelDesc1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelDesc2Null() As Boolean Return Me.IsNull(Me.tablemodelBackup.modelDesc2Column) End Function _ Public Sub SetmodelDesc2Null() Me(Me.tablemodelBackup.modelDesc2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelFamilyNull() As Boolean Return Me.IsNull(Me.tablemodelBackup.modelFamilyColumn) End Function _ Public Sub SetmodelFamilyNull() Me(Me.tablemodelBackup.modelFamilyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelTypeNull() As Boolean Return Me.IsNull(Me.tablemodelBackup.modelTypeColumn) End Function _ Public Sub SetmodelTypeNull() Me(Me.tablemodelBackup.modelTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsminRevNull() As Boolean Return Me.IsNull(Me.tablemodelBackup.minRevColumn) End Function _ Public Sub SetminRevNull() Me(Me.tablemodelBackup.minRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslatestRevNull() As Boolean Return Me.IsNull(Me.tablemodelBackup.latestRevColumn) End Function _ Public Sub SetlatestRevNull() Me(Me.tablemodelBackup.latestRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelBackup.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelBackup.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelBackup.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelBackup.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelBackup.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelBackup.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelDimRow Inherits Global.System.Data.DataRow Private tablemodelDim As modelDimDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelDim = CType(Me.Table,modelDimDataTable) End Sub _ Public Property modelno() As String Get Return CType(Me(Me.tablemodelDim.modelnoColumn),String) End Get Set Me(Me.tablemodelDim.modelnoColumn) = value End Set End Property _ Public Property length() As Single Get Try Return CType(Me(Me.tablemodelDim.lengthColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'length' in table 'modelDim' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDim.lengthColumn) = value End Set End Property _ Public Property width() As Single Get Try Return CType(Me(Me.tablemodelDim.widthColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'width' in table 'modelDim' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDim.widthColumn) = value End Set End Property _ Public Property height() As Integer Get Try Return CType(Me(Me.tablemodelDim.heightColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'height' in table 'modelDim' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDim.heightColumn) = value End Set End Property _ Public Property layerCount() As Integer Get Try Return CType(Me(Me.tablemodelDim.layerCountColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layerCount' in table 'modelDim' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDim.layerCountColumn) = value End Set End Property _ Public Property dimType() As String Get Try Return CType(Me(Me.tablemodelDim.dimTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimType' in table 'modelDim' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDim.dimTypeColumn) = value End Set End Property _ Public Property packingno() As String Get Try Return CType(Me(Me.tablemodelDim.packingnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'packingno' in table 'modelDim' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDim.packingnoColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelDim.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelDim' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDim.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelDim.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelDim' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDim.lastupdatedbyColumn) = value End Set End Property _ Public Function IslengthNull() As Boolean Return Me.IsNull(Me.tablemodelDim.lengthColumn) End Function _ Public Sub SetlengthNull() Me(Me.tablemodelDim.lengthColumn) = Global.System.Convert.DBNull End Sub _ Public Function IswidthNull() As Boolean Return Me.IsNull(Me.tablemodelDim.widthColumn) End Function _ Public Sub SetwidthNull() Me(Me.tablemodelDim.widthColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsheightNull() As Boolean Return Me.IsNull(Me.tablemodelDim.heightColumn) End Function _ Public Sub SetheightNull() Me(Me.tablemodelDim.heightColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslayerCountNull() As Boolean Return Me.IsNull(Me.tablemodelDim.layerCountColumn) End Function _ Public Sub SetlayerCountNull() Me(Me.tablemodelDim.layerCountColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimTypeNull() As Boolean Return Me.IsNull(Me.tablemodelDim.dimTypeColumn) End Function _ Public Sub SetdimTypeNull() Me(Me.tablemodelDim.dimTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspackingnoNull() As Boolean Return Me.IsNull(Me.tablemodelDim.packingnoColumn) End Function _ Public Sub SetpackingnoNull() Me(Me.tablemodelDim.packingnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelDim.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelDim.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelDim.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelDim.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelDimHistRow Inherits Global.System.Data.DataRow Private tablemodelDimHist As modelDimHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelDimHist = CType(Me.Table,modelDimHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablemodelDimHist.lineNumColumn),Long) End Get Set Me(Me.tablemodelDimHist.lineNumColumn) = value End Set End Property _ Public Property modelno() As String Get Try Return CType(Me(Me.tablemodelDimHist.modelnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelno' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.modelnoColumn) = value End Set End Property _ Public Property length() As Single Get Try Return CType(Me(Me.tablemodelDimHist.lengthColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'length' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.lengthColumn) = value End Set End Property _ Public Property width() As Single Get Try Return CType(Me(Me.tablemodelDimHist.widthColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'width' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.widthColumn) = value End Set End Property _ Public Property height() As Integer Get Try Return CType(Me(Me.tablemodelDimHist.heightColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'height' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.heightColumn) = value End Set End Property _ Public Property layerCount() As Integer Get Try Return CType(Me(Me.tablemodelDimHist.layerCountColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layerCount' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.layerCountColumn) = value End Set End Property _ Public Property dimType() As String Get Try Return CType(Me(Me.tablemodelDimHist.dimTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimType' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.dimTypeColumn) = value End Set End Property _ Public Property packingno() As String Get Try Return CType(Me(Me.tablemodelDimHist.packingnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'packingno' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.packingnoColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablemodelDimHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelDimHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelDimHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelDimHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelDimHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelnoNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.modelnoColumn) End Function _ Public Sub SetmodelnoNull() Me(Me.tablemodelDimHist.modelnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslengthNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.lengthColumn) End Function _ Public Sub SetlengthNull() Me(Me.tablemodelDimHist.lengthColumn) = Global.System.Convert.DBNull End Sub _ Public Function IswidthNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.widthColumn) End Function _ Public Sub SetwidthNull() Me(Me.tablemodelDimHist.widthColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsheightNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.heightColumn) End Function _ Public Sub SetheightNull() Me(Me.tablemodelDimHist.heightColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslayerCountNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.layerCountColumn) End Function _ Public Sub SetlayerCountNull() Me(Me.tablemodelDimHist.layerCountColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimTypeNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.dimTypeColumn) End Function _ Public Sub SetdimTypeNull() Me(Me.tablemodelDimHist.dimTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspackingnoNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.packingnoColumn) End Function _ Public Sub SetpackingnoNull() Me(Me.tablemodelDimHist.packingnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablemodelDimHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelDimHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelDimHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelDimHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelFamilyRow Inherits Global.System.Data.DataRow Private tablemodelFamily As modelFamilyDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelFamily = CType(Me.Table,modelFamilyDataTable) End Sub _ Public Property modelFamily() As String Get Return CType(Me(Me.tablemodelFamily.modelFamilyColumn),String) End Get Set Me(Me.tablemodelFamily.modelFamilyColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tablemodelFamily.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'modelFamily' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamily.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelFamily.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelFamily' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamily.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelFamily.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelFamily' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamily.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelFamily.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelFamily' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamily.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tablemodelFamily.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tablemodelFamily.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelFamily.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelFamily.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelFamily.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelFamily.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelFamily.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelFamily.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelFamilyHistRow Inherits Global.System.Data.DataRow Private tablemodelFamilyHist As modelFamilyHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelFamilyHist = CType(Me.Table,modelFamilyHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablemodelFamilyHist.lineNumColumn),Long) End Get Set Me(Me.tablemodelFamilyHist.lineNumColumn) = value End Set End Property _ Public Property modelFamily() As String Get Try Return CType(Me(Me.tablemodelFamilyHist.modelFamilyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelFamily' in table 'modelFamilyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamilyHist.modelFamilyColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tablemodelFamilyHist.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'modelFamilyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamilyHist.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelFamilyHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelFamilyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamilyHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablemodelFamilyHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'modelFamilyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamilyHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelFamilyHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelFamilyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamilyHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelFamilyHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelFamilyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelFamilyHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelFamilyNull() As Boolean Return Me.IsNull(Me.tablemodelFamilyHist.modelFamilyColumn) End Function _ Public Sub SetmodelFamilyNull() Me(Me.tablemodelFamilyHist.modelFamilyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tablemodelFamilyHist.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tablemodelFamilyHist.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelFamilyHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelFamilyHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablemodelFamilyHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablemodelFamilyHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelFamilyHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelFamilyHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelFamilyHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelFamilyHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelHierarchyRow Inherits Global.System.Data.DataRow Private tablemodelHierarchy As modelHierarchyDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelHierarchy = CType(Me.Table,modelHierarchyDataTable) End Sub _ Public Property modelno() As String Get Try Return CType(Me(Me.tablemodelHierarchy.modelnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelno' in table 'modelHierarchy' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchy.modelnoColumn) = value End Set End Property _ Public Property descendant() As String Get Try Return CType(Me(Me.tablemodelHierarchy.descendantColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'descendant' in table 'modelHierarchy' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchy.descendantColumn) = value End Set End Property _ Public Property mlevel() As Integer Get Try Return CType(Me(Me.tablemodelHierarchy.mlevelColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mlevel' in table 'modelHierarchy' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchy.mlevelColumn) = value End Set End Property _ Public Property carrySerial() As Integer Get Try Return CType(Me(Me.tablemodelHierarchy.carrySerialColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'carrySerial' in table 'modelHierarchy' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchy.carrySerialColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelHierarchy.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelHierarchy' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchy.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelHierarchy.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelHierarchy' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchy.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelHierarchy.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelHierarchy' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchy.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelnoNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchy.modelnoColumn) End Function _ Public Sub SetmodelnoNull() Me(Me.tablemodelHierarchy.modelnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescendantNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchy.descendantColumn) End Function _ Public Sub SetdescendantNull() Me(Me.tablemodelHierarchy.descendantColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmlevelNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchy.mlevelColumn) End Function _ Public Sub SetmlevelNull() Me(Me.tablemodelHierarchy.mlevelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscarrySerialNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchy.carrySerialColumn) End Function _ Public Sub SetcarrySerialNull() Me(Me.tablemodelHierarchy.carrySerialColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchy.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelHierarchy.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchy.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelHierarchy.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchy.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelHierarchy.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelHierarchyHistRow Inherits Global.System.Data.DataRow Private tablemodelHierarchyHist As modelHierarchyHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelHierarchyHist = CType(Me.Table,modelHierarchyHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablemodelHierarchyHist.lineNumColumn),Long) End Get Set Me(Me.tablemodelHierarchyHist.lineNumColumn) = value End Set End Property _ Public Property modelno() As String Get Try Return CType(Me(Me.tablemodelHierarchyHist.modelnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelno' in table 'modelHierarchyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchyHist.modelnoColumn) = value End Set End Property _ Public Property descendant() As String Get Try Return CType(Me(Me.tablemodelHierarchyHist.descendantColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'descendant' in table 'modelHierarchyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchyHist.descendantColumn) = value End Set End Property _ Public Property mlevel() As Integer Get Try Return CType(Me(Me.tablemodelHierarchyHist.mlevelColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mlevel' in table 'modelHierarchyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchyHist.mlevelColumn) = value End Set End Property _ Public Property carrySerial() As Integer Get Try Return CType(Me(Me.tablemodelHierarchyHist.carrySerialColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'carrySerial' in table 'modelHierarchyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchyHist.carrySerialColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelHierarchyHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelHierarchyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchyHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablemodelHierarchyHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'modelHierarchyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchyHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelHierarchyHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelHierarchyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchyHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelHierarchyHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelHierarchyHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHierarchyHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelnoNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchyHist.modelnoColumn) End Function _ Public Sub SetmodelnoNull() Me(Me.tablemodelHierarchyHist.modelnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescendantNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchyHist.descendantColumn) End Function _ Public Sub SetdescendantNull() Me(Me.tablemodelHierarchyHist.descendantColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmlevelNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchyHist.mlevelColumn) End Function _ Public Sub SetmlevelNull() Me(Me.tablemodelHierarchyHist.mlevelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscarrySerialNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchyHist.carrySerialColumn) End Function _ Public Sub SetcarrySerialNull() Me(Me.tablemodelHierarchyHist.carrySerialColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchyHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelHierarchyHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchyHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablemodelHierarchyHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchyHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelHierarchyHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelHierarchyHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelHierarchyHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelHistRow Inherits Global.System.Data.DataRow Private tablemodelHist As modelHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelHist = CType(Me.Table,modelHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablemodelHist.lineNumColumn),Long) End Get Set Me(Me.tablemodelHist.lineNumColumn) = value End Set End Property _ Public Property modelno() As String Get Try Return CType(Me(Me.tablemodelHist.modelnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelno' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.modelnoColumn) = value End Set End Property _ Public Property modelDesc1() As String Get Try Return CType(Me(Me.tablemodelHist.modelDesc1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc1' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.modelDesc1Column) = value End Set End Property _ Public Property modelDesc2() As String Get Try Return CType(Me(Me.tablemodelHist.modelDesc2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc2' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.modelDesc2Column) = value End Set End Property _ Public Property modelFamily() As String Get Try Return CType(Me(Me.tablemodelHist.modelFamilyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelFamily' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.modelFamilyColumn) = value End Set End Property _ Public Property modelType() As String Get Try Return CType(Me(Me.tablemodelHist.modelTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelType' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.modelTypeColumn) = value End Set End Property _ Public Property minRev() As String Get Try Return CType(Me(Me.tablemodelHist.minRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'minRev' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.minRevColumn) = value End Set End Property _ Public Property latestRev() As String Get Try Return CType(Me(Me.tablemodelHist.latestRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'latestRev' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.latestRevColumn) = value End Set End Property _ Public Property itemWt() As Single Get Try Return CType(Me(Me.tablemodelHist.itemWtColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'itemWt' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.itemWtColumn) = value End Set End Property _ Public Property batch() As Integer Get Try Return CType(Me(Me.tablemodelHist.batchColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'batch' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.batchColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablemodelHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelnoNull() As Boolean Return Me.IsNull(Me.tablemodelHist.modelnoColumn) End Function _ Public Sub SetmodelnoNull() Me(Me.tablemodelHist.modelnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelDesc1Null() As Boolean Return Me.IsNull(Me.tablemodelHist.modelDesc1Column) End Function _ Public Sub SetmodelDesc1Null() Me(Me.tablemodelHist.modelDesc1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelDesc2Null() As Boolean Return Me.IsNull(Me.tablemodelHist.modelDesc2Column) End Function _ Public Sub SetmodelDesc2Null() Me(Me.tablemodelHist.modelDesc2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelFamilyNull() As Boolean Return Me.IsNull(Me.tablemodelHist.modelFamilyColumn) End Function _ Public Sub SetmodelFamilyNull() Me(Me.tablemodelHist.modelFamilyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelTypeNull() As Boolean Return Me.IsNull(Me.tablemodelHist.modelTypeColumn) End Function _ Public Sub SetmodelTypeNull() Me(Me.tablemodelHist.modelTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsminRevNull() As Boolean Return Me.IsNull(Me.tablemodelHist.minRevColumn) End Function _ Public Sub SetminRevNull() Me(Me.tablemodelHist.minRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslatestRevNull() As Boolean Return Me.IsNull(Me.tablemodelHist.latestRevColumn) End Function _ Public Sub SetlatestRevNull() Me(Me.tablemodelHist.latestRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsitemWtNull() As Boolean Return Me.IsNull(Me.tablemodelHist.itemWtColumn) End Function _ Public Sub SetitemWtNull() Me(Me.tablemodelHist.itemWtColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsbatchNull() As Boolean Return Me.IsNull(Me.tablemodelHist.batchColumn) End Function _ Public Sub SetbatchNull() Me(Me.tablemodelHist.batchColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablemodelHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablemodelHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelRouteRow Inherits Global.System.Data.DataRow Private tablemodelRoute As modelRouteDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelRoute = CType(Me.Table,modelRouteDataTable) End Sub _ Public Property modelno() As String Get Return CType(Me(Me.tablemodelRoute.modelnoColumn),String) End Get Set Me(Me.tablemodelRoute.modelnoColumn) = value End Set End Property _ Public Property flowsequence() As Integer Get Try Return CType(Me(Me.tablemodelRoute.flowsequenceColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'flowsequence' in table 'modelRoute' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute.flowsequenceColumn) = value End Set End Property _ Public Property station() As String Get Return CType(Me(Me.tablemodelRoute.stationColumn),String) End Get Set Me(Me.tablemodelRoute.stationColumn) = value End Set End Property _ Public Property skip() As Integer Get Try Return CType(Me(Me.tablemodelRoute.skipColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'skip' in table 'modelRoute' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute.skipColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelRoute.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelRoute' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute.activeColumn) = value End Set End Property _ Public Property lastStation() As Integer Get Try Return CType(Me(Me.tablemodelRoute.lastStationColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastStation' in table 'modelRoute' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute.lastStationColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelRoute.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelRoute' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelRoute.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelRoute' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute.lastupdatedbyColumn) = value End Set End Property _ Public Function IsflowsequenceNull() As Boolean Return Me.IsNull(Me.tablemodelRoute.flowsequenceColumn) End Function _ Public Sub SetflowsequenceNull() Me(Me.tablemodelRoute.flowsequenceColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsskipNull() As Boolean Return Me.IsNull(Me.tablemodelRoute.skipColumn) End Function _ Public Sub SetskipNull() Me(Me.tablemodelRoute.skipColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelRoute.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelRoute.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastStationNull() As Boolean Return Me.IsNull(Me.tablemodelRoute.lastStationColumn) End Function _ Public Sub SetlastStationNull() Me(Me.tablemodelRoute.lastStationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelRoute.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelRoute.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelRoute.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelRoute.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelRoute_backup_1Row Inherits Global.System.Data.DataRow Private tablemodelRoute_backup_1 As modelRoute_backup_1DataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelRoute_backup_1 = CType(Me.Table,modelRoute_backup_1DataTable) End Sub _ Public Property modelno() As String Get Return CType(Me(Me.tablemodelRoute_backup_1.modelnoColumn),String) End Get Set Me(Me.tablemodelRoute_backup_1.modelnoColumn) = value End Set End Property _ Public Property flowsequence() As Integer Get Try Return CType(Me(Me.tablemodelRoute_backup_1.flowsequenceColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'flowsequence' in table 'modelRoute_backup_1' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute_backup_1.flowsequenceColumn) = value End Set End Property _ Public Property station() As String Get Return CType(Me(Me.tablemodelRoute_backup_1.stationColumn),String) End Get Set Me(Me.tablemodelRoute_backup_1.stationColumn) = value End Set End Property _ Public Property skip() As Integer Get Try Return CType(Me(Me.tablemodelRoute_backup_1.skipColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'skip' in table 'modelRoute_backup_1' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute_backup_1.skipColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelRoute_backup_1.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelRoute_backup_1' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute_backup_1.activeColumn) = value End Set End Property _ Public Property lastStation() As Integer Get Try Return CType(Me(Me.tablemodelRoute_backup_1.lastStationColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastStation' in table 'modelRoute_backup_1' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute_backup_1.lastStationColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelRoute_backup_1.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelRoute_backup_1' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute_backup_1.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelRoute_backup_1.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelRoute_backup_1' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRoute_backup_1.lastupdatedbyColumn) = value End Set End Property _ Public Function IsflowsequenceNull() As Boolean Return Me.IsNull(Me.tablemodelRoute_backup_1.flowsequenceColumn) End Function _ Public Sub SetflowsequenceNull() Me(Me.tablemodelRoute_backup_1.flowsequenceColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsskipNull() As Boolean Return Me.IsNull(Me.tablemodelRoute_backup_1.skipColumn) End Function _ Public Sub SetskipNull() Me(Me.tablemodelRoute_backup_1.skipColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelRoute_backup_1.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelRoute_backup_1.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastStationNull() As Boolean Return Me.IsNull(Me.tablemodelRoute_backup_1.lastStationColumn) End Function _ Public Sub SetlastStationNull() Me(Me.tablemodelRoute_backup_1.lastStationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelRoute_backup_1.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelRoute_backup_1.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelRoute_backup_1.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelRoute_backup_1.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelRouteHistRow Inherits Global.System.Data.DataRow Private tablemodelRouteHist As modelRouteHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelRouteHist = CType(Me.Table,modelRouteHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablemodelRouteHist.lineNumColumn),Long) End Get Set Me(Me.tablemodelRouteHist.lineNumColumn) = value End Set End Property _ Public Property modelno() As String Get Try Return CType(Me(Me.tablemodelRouteHist.modelnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelno' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.modelnoColumn) = value End Set End Property _ Public Property flowsequence() As Integer Get Try Return CType(Me(Me.tablemodelRouteHist.flowsequenceColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'flowsequence' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.flowsequenceColumn) = value End Set End Property _ Public Property station() As String Get Try Return CType(Me(Me.tablemodelRouteHist.stationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'station' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.stationColumn) = value End Set End Property _ Public Property skip() As Integer Get Try Return CType(Me(Me.tablemodelRouteHist.skipColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'skip' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.skipColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelRouteHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.activeColumn) = value End Set End Property _ Public Property lastStation() As Integer Get Try Return CType(Me(Me.tablemodelRouteHist.lastStationColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastStation' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.lastStationColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablemodelRouteHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelRouteHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelRouteHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelRouteHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelRouteHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelnoNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.modelnoColumn) End Function _ Public Sub SetmodelnoNull() Me(Me.tablemodelRouteHist.modelnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsflowsequenceNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.flowsequenceColumn) End Function _ Public Sub SetflowsequenceNull() Me(Me.tablemodelRouteHist.flowsequenceColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstationNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.stationColumn) End Function _ Public Sub SetstationNull() Me(Me.tablemodelRouteHist.stationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsskipNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.skipColumn) End Function _ Public Sub SetskipNull() Me(Me.tablemodelRouteHist.skipColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelRouteHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastStationNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.lastStationColumn) End Function _ Public Sub SetlastStationNull() Me(Me.tablemodelRouteHist.lastStationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablemodelRouteHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelRouteHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelRouteHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelRouteHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelTempRow Inherits Global.System.Data.DataRow Private tablemodelTemp As modelTempDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelTemp = CType(Me.Table,modelTempDataTable) End Sub _ Public Property modelno() As String Get Return CType(Me(Me.tablemodelTemp.modelnoColumn),String) End Get Set Me(Me.tablemodelTemp.modelnoColumn) = value End Set End Property _ Public Property modelDesc1() As String Get Try Return CType(Me(Me.tablemodelTemp.modelDesc1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc1' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.modelDesc1Column) = value End Set End Property _ Public Property modelDesc2() As String Get Try Return CType(Me(Me.tablemodelTemp.modelDesc2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc2' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.modelDesc2Column) = value End Set End Property _ Public Property modelFamily() As String Get Try Return CType(Me(Me.tablemodelTemp.modelFamilyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelFamily' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.modelFamilyColumn) = value End Set End Property _ Public Property modelType() As String Get Try Return CType(Me(Me.tablemodelTemp.modelTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelType' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.modelTypeColumn) = value End Set End Property _ Public Property minRev() As String Get Try Return CType(Me(Me.tablemodelTemp.minRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'minRev' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.minRevColumn) = value End Set End Property _ Public Property latestRev() As String Get Try Return CType(Me(Me.tablemodelTemp.latestRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'latestRev' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.latestRevColumn) = value End Set End Property _ Public Property batch() As Integer Get Try Return CType(Me(Me.tablemodelTemp.batchColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'batch' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.batchColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelTemp.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelTemp.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelTemp.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelTemp' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTemp.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelDesc1Null() As Boolean Return Me.IsNull(Me.tablemodelTemp.modelDesc1Column) End Function _ Public Sub SetmodelDesc1Null() Me(Me.tablemodelTemp.modelDesc1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelDesc2Null() As Boolean Return Me.IsNull(Me.tablemodelTemp.modelDesc2Column) End Function _ Public Sub SetmodelDesc2Null() Me(Me.tablemodelTemp.modelDesc2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelFamilyNull() As Boolean Return Me.IsNull(Me.tablemodelTemp.modelFamilyColumn) End Function _ Public Sub SetmodelFamilyNull() Me(Me.tablemodelTemp.modelFamilyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelTypeNull() As Boolean Return Me.IsNull(Me.tablemodelTemp.modelTypeColumn) End Function _ Public Sub SetmodelTypeNull() Me(Me.tablemodelTemp.modelTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsminRevNull() As Boolean Return Me.IsNull(Me.tablemodelTemp.minRevColumn) End Function _ Public Sub SetminRevNull() Me(Me.tablemodelTemp.minRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslatestRevNull() As Boolean Return Me.IsNull(Me.tablemodelTemp.latestRevColumn) End Function _ Public Sub SetlatestRevNull() Me(Me.tablemodelTemp.latestRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsbatchNull() As Boolean Return Me.IsNull(Me.tablemodelTemp.batchColumn) End Function _ Public Sub SetbatchNull() Me(Me.tablemodelTemp.batchColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelTemp.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelTemp.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelTemp.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelTemp.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelTemp.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelTemp.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelTypeRow Inherits Global.System.Data.DataRow Private tablemodelType As modelTypeDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelType = CType(Me.Table,modelTypeDataTable) End Sub _ Public Property modelType() As String Get Return CType(Me(Me.tablemodelType.modelTypeColumn),String) End Get Set Me(Me.tablemodelType.modelTypeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tablemodelType.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'modelType' is DBNull.", e) End Try End Get Set Me(Me.tablemodelType.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelType.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelType' is DBNull.", e) End Try End Get Set Me(Me.tablemodelType.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelType.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelType' is DBNull.", e) End Try End Get Set Me(Me.tablemodelType.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelType.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelType' is DBNull.", e) End Try End Get Set Me(Me.tablemodelType.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tablemodelType.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tablemodelType.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelType.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelType.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelType.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelType.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelType.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelType.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class modelTypeHistRow Inherits Global.System.Data.DataRow Private tablemodelTypeHist As modelTypeHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablemodelTypeHist = CType(Me.Table,modelTypeHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablemodelTypeHist.lineNumColumn),Long) End Get Set Me(Me.tablemodelTypeHist.lineNumColumn) = value End Set End Property _ Public Property modelType() As String Get Try Return CType(Me(Me.tablemodelTypeHist.modelTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelType' in table 'modelTypeHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTypeHist.modelTypeColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tablemodelTypeHist.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'modelTypeHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTypeHist.descriptionColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablemodelTypeHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'modelTypeHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTypeHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablemodelTypeHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'modelTypeHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTypeHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablemodelTypeHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'modelTypeHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTypeHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablemodelTypeHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'modelTypeHist' is DBNull.", e) End Try End Get Set Me(Me.tablemodelTypeHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmodelTypeNull() As Boolean Return Me.IsNull(Me.tablemodelTypeHist.modelTypeColumn) End Function _ Public Sub SetmodelTypeNull() Me(Me.tablemodelTypeHist.modelTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tablemodelTypeHist.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tablemodelTypeHist.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablemodelTypeHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablemodelTypeHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablemodelTypeHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablemodelTypeHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablemodelTypeHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablemodelTypeHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablemodelTypeHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablemodelTypeHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class Parts_ListRow Inherits Global.System.Data.DataRow Private tableParts_List As Parts_ListDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableParts_List = CType(Me.Table,Parts_ListDataTable) End Sub _ Public Property Descriptions_Parameter_Desc() As String Get Try Return CType(Me(Me.tableParts_List.Descriptions_Parameter_DescColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Descriptions_Parameter_Desc' in table 'Parts_List' is DBNul"& _ "l.", e) End Try End Get Set Me(Me.tableParts_List.Descriptions_Parameter_DescColumn) = value End Set End Property _ Public Property Item_Code() As String Get Return CType(Me(Me.tableParts_List.Item_CodeColumn),String) End Get Set Me(Me.tableParts_List.Item_CodeColumn) = value End Set End Property _ Public Property Item_Item_Desc() As String Get Try Return CType(Me(Me.tableParts_List.Item_Item_DescColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Item_Item_Desc' in table 'Parts_List' is DBNull.", e) End Try End Get Set Me(Me.tableParts_List.Item_Item_DescColumn) = value End Set End Property _ Public Function IsDescriptions_Parameter_DescNull() As Boolean Return Me.IsNull(Me.tableParts_List.Descriptions_Parameter_DescColumn) End Function _ Public Sub SetDescriptions_Parameter_DescNull() Me(Me.tableParts_List.Descriptions_Parameter_DescColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsItem_Item_DescNull() As Boolean Return Me.IsNull(Me.tableParts_List.Item_Item_DescColumn) End Function _ Public Sub SetItem_Item_DescNull() Me(Me.tableParts_List.Item_Item_DescColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class partsCodeRow Inherits Global.System.Data.DataRow Private tablepartsCode As partsCodeDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepartsCode = CType(Me.Table,partsCodeDataTable) End Sub _ Public Property part_id() As Integer Get Return CType(Me(Me.tablepartsCode.part_idColumn),Integer) End Get Set Me(Me.tablepartsCode.part_idColumn) = value End Set End Property _ Public Property partcode() As String Get Return CType(Me(Me.tablepartsCode.partcodeColumn),String) End Get Set Me(Me.tablepartsCode.partcodeColumn) = value End Set End Property _ Public Property partname() As String Get Return CType(Me(Me.tablepartsCode.partnameColumn),String) End Get Set Me(Me.tablepartsCode.partnameColumn) = value End Set End Property _ Public Property standardpack() As Integer Get Return CType(Me(Me.tablepartsCode.standardpackColumn),Integer) End Get Set Me(Me.tablepartsCode.standardpackColumn) = value End Set End Property _ Public Property model() As String Get Return CType(Me(Me.tablepartsCode.modelColumn),String) End Get Set Me(Me.tablepartsCode.modelColumn) = value End Set End Property _ Public Property additional() As String Get Return CType(Me(Me.tablepartsCode.additionalColumn),String) End Get Set Me(Me.tablepartsCode.additionalColumn) = value End Set End Property _ Public Property factory() As String Get Try Return CType(Me(Me.tablepartsCode.factoryColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'factory' in table 'partsCode' is DBNull.", e) End Try End Get Set Me(Me.tablepartsCode.factoryColumn) = value End Set End Property _ Public Property lastupdated() As Date Get Try Return CType(Me(Me.tablepartsCode.lastupdatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdated' in table 'partsCode' is DBNull.", e) End Try End Get Set Me(Me.tablepartsCode.lastupdatedColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablepartsCode.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'partsCode' is DBNull.", e) End Try End Get Set Me(Me.tablepartsCode.lastupdatedbyColumn) = value End Set End Property _ Public Function IsfactoryNull() As Boolean Return Me.IsNull(Me.tablepartsCode.factoryColumn) End Function _ Public Sub SetfactoryNull() Me(Me.tablepartsCode.factoryColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedNull() As Boolean Return Me.IsNull(Me.tablepartsCode.lastupdatedColumn) End Function _ Public Sub SetlastupdatedNull() Me(Me.tablepartsCode.lastupdatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablepartsCode.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablepartsCode.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class PartsModelRow Inherits Global.System.Data.DataRow Private tablePartsModel As PartsModelDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablePartsModel = CType(Me.Table,PartsModelDataTable) End Sub _ Public Property Account() As String Get Return CType(Me(Me.tablePartsModel.AccountColumn),String) End Get Set Me(Me.tablePartsModel.AccountColumn) = value End Set End Property _ Public Property ModelCode() As String Get Return CType(Me(Me.tablePartsModel.ModelCodeColumn),String) End Get Set Me(Me.tablePartsModel.ModelCodeColumn) = value End Set End Property _ Public Property Description() As String Get Return CType(Me(Me.tablePartsModel.DescriptionColumn),String) End Get Set Me(Me.tablePartsModel.DescriptionColumn) = value End Set End Property _ Public Property ControlID() As Integer Get Return CType(Me(Me.tablePartsModel.ControlIDColumn),Integer) End Get Set Me(Me.tablePartsModel.ControlIDColumn) = value End Set End Property End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class PartsPrepRow Inherits Global.System.Data.DataRow Private tablePartsPrep As PartsPrepDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablePartsPrep = CType(Me.Table,PartsPrepDataTable) End Sub _ Public Property Control_ID() As Integer Get Return CType(Me(Me.tablePartsPrep.Control_IDColumn),Integer) End Get Set Me(Me.tablePartsPrep.Control_IDColumn) = value End Set End Property _ Public Property Ionics_PN() As String Get Return CType(Me(Me.tablePartsPrep.Ionics_PNColumn),String) End Get Set Me(Me.tablePartsPrep.Ionics_PNColumn) = value End Set End Property _ Public Property Epson_PN() As String Get Return CType(Me(Me.tablePartsPrep.Epson_PNColumn),String) End Get Set Me(Me.tablePartsPrep.Epson_PNColumn) = value End Set End Property _ Public Property Supplier_PN() As String Get Return CType(Me(Me.tablePartsPrep.Supplier_PNColumn),String) End Get Set Me(Me.tablePartsPrep.Supplier_PNColumn) = value End Set End Property _ Public Property Description() As String Get Return CType(Me(Me.tablePartsPrep.DescriptionColumn),String) End Get Set Me(Me.tablePartsPrep.DescriptionColumn) = value End Set End Property _ Public Property Rack() As String Get Return CType(Me(Me.tablePartsPrep.RackColumn),String) End Get Set Me(Me.tablePartsPrep.RackColumn) = value End Set End Property _ Public Property Com_Type() As String Get Return CType(Me(Me.tablePartsPrep.Com_TypeColumn),String) End Get Set Me(Me.tablePartsPrep.Com_TypeColumn) = value End Set End Property _ Public Property ModelCode() As String Get Try Return CType(Me(Me.tablePartsPrep.ModelCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModelCode' in table 'PartsPrep' is DBNull.", e) End Try End Get Set Me(Me.tablePartsPrep.ModelCodeColumn) = value End Set End Property _ Public Function IsModelCodeNull() As Boolean Return Me.IsNull(Me.tablePartsPrep.ModelCodeColumn) End Function _ Public Sub SetModelCodeNull() Me(Me.tablePartsPrep.ModelCodeColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class PartsRecordsRow Inherits Global.System.Data.DataRow Private tablePartsRecords As PartsRecordsDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablePartsRecords = CType(Me.Table,PartsRecordsDataTable) End Sub _ Public Property SerialNum() As String Get Return CType(Me(Me.tablePartsRecords.SerialNumColumn),String) End Get Set Me(Me.tablePartsRecords.SerialNumColumn) = value End Set End Property _ Public Property IonicsPN() As String Get Return CType(Me(Me.tablePartsRecords.IonicsPNColumn),String) End Get Set Me(Me.tablePartsRecords.IonicsPNColumn) = value End Set End Property _ Public Property EpsonPN() As String Get Return CType(Me(Me.tablePartsRecords.EpsonPNColumn),String) End Get Set Me(Me.tablePartsRecords.EpsonPNColumn) = value End Set End Property _ Public Property SupplierPN() As String Get Return CType(Me(Me.tablePartsRecords.SupplierPNColumn),String) End Get Set Me(Me.tablePartsRecords.SupplierPNColumn) = value End Set End Property _ Public Property Description() As String Get Try Return CType(Me(Me.tablePartsRecords.DescriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Description' in table 'PartsRecords' is DBNull.", e) End Try End Get Set Me(Me.tablePartsRecords.DescriptionColumn) = value End Set End Property _ Public Property LotNO() As String Get Return CType(Me(Me.tablePartsRecords.LotNOColumn),String) End Get Set Me(Me.tablePartsRecords.LotNOColumn) = value End Set End Property _ Public Property Rack() As String Get Return CType(Me(Me.tablePartsRecords.RackColumn),String) End Get Set Me(Me.tablePartsRecords.RackColumn) = value End Set End Property _ Public Property Qty() As Integer Get Return CType(Me(Me.tablePartsRecords.QtyColumn),Integer) End Get Set Me(Me.tablePartsRecords.QtyColumn) = value End Set End Property _ Public Property Status() As String Get Return CType(Me(Me.tablePartsRecords.StatusColumn),String) End Get Set Me(Me.tablePartsRecords.StatusColumn) = value End Set End Property _ Public Property EOH() As Integer Get Try Return CType(Me(Me.tablePartsRecords.EOHColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'EOH' in table 'PartsRecords' is DBNull.", e) End Try End Get Set Me(Me.tablePartsRecords.EOHColumn) = value End Set End Property _ Public Property SPQ() As Integer Get Try Return CType(Me(Me.tablePartsRecords.SPQColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SPQ' in table 'PartsRecords' is DBNull.", e) End Try End Get Set Me(Me.tablePartsRecords.SPQColumn) = value End Set End Property _ Public Property MFGDate() As Date Get Return CType(Me(Me.tablePartsRecords.MFGDateColumn),Date) End Get Set Me(Me.tablePartsRecords.MFGDateColumn) = value End Set End Property _ Public Property RCVDate() As Date Get Return CType(Me(Me.tablePartsRecords.RCVDateColumn),Date) End Get Set Me(Me.tablePartsRecords.RCVDateColumn) = value End Set End Property _ Public Property PrintedDate() As Date Get Return CType(Me(Me.tablePartsRecords.PrintedDateColumn),Date) End Get Set Me(Me.tablePartsRecords.PrintedDateColumn) = value End Set End Property _ Public Property PrintedBy() As String Get Return CType(Me(Me.tablePartsRecords.PrintedByColumn),String) End Get Set Me(Me.tablePartsRecords.PrintedByColumn) = value End Set End Property _ Public Property Returned() As Integer Get Return CType(Me(Me.tablePartsRecords.ReturnedColumn),Integer) End Get Set Me(Me.tablePartsRecords.ReturnedColumn) = value End Set End Property _ Public Property ControlID() As Integer Get Return CType(Me(Me.tablePartsRecords.ControlIDColumn),Integer) End Get Set Me(Me.tablePartsRecords.ControlIDColumn) = value End Set End Property _ Public Property Remarks() As String Get Try Return CType(Me(Me.tablePartsRecords.RemarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Remarks' in table 'PartsRecords' is DBNull.", e) End Try End Get Set Me(Me.tablePartsRecords.RemarksColumn) = value End Set End Property _ Public Property ModelCode() As String Get Try Return CType(Me(Me.tablePartsRecords.ModelCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModelCode' in table 'PartsRecords' is DBNull.", e) End Try End Get Set Me(Me.tablePartsRecords.ModelCodeColumn) = value End Set End Property _ Public Function IsDescriptionNull() As Boolean Return Me.IsNull(Me.tablePartsRecords.DescriptionColumn) End Function _ Public Sub SetDescriptionNull() Me(Me.tablePartsRecords.DescriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsEOHNull() As Boolean Return Me.IsNull(Me.tablePartsRecords.EOHColumn) End Function _ Public Sub SetEOHNull() Me(Me.tablePartsRecords.EOHColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSPQNull() As Boolean Return Me.IsNull(Me.tablePartsRecords.SPQColumn) End Function _ Public Sub SetSPQNull() Me(Me.tablePartsRecords.SPQColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsRemarksNull() As Boolean Return Me.IsNull(Me.tablePartsRecords.RemarksColumn) End Function _ Public Sub SetRemarksNull() Me(Me.tablePartsRecords.RemarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsModelCodeNull() As Boolean Return Me.IsNull(Me.tablePartsRecords.ModelCodeColumn) End Function _ Public Sub SetModelCodeNull() Me(Me.tablePartsRecords.ModelCodeColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class partsStationRow Inherits Global.System.Data.DataRow Private tablepartsStation As partsStationDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepartsStation = CType(Me.Table,partsStationDataTable) End Sub _ Public Property station_id() As Integer Get Return CType(Me(Me.tablepartsStation.station_idColumn),Integer) End Get Set Me(Me.tablepartsStation.station_idColumn) = value End Set End Property _ Public Property station_code() As String Get Try Return CType(Me(Me.tablepartsStation.station_codeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'station_code' in table 'partsStation' is DBNull.", e) End Try End Get Set Me(Me.tablepartsStation.station_codeColumn) = value End Set End Property _ Public Property supplier_id() As Integer Get Try Return CType(Me(Me.tablepartsStation.supplier_idColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'supplier_id' in table 'partsStation' is DBNull.", e) End Try End Get Set Me(Me.tablepartsStation.supplier_idColumn) = value End Set End Property _ Public Property lastupdated() As Date Get Try Return CType(Me(Me.tablepartsStation.lastupdatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdated' in table 'partsStation' is DBNull.", e) End Try End Get Set Me(Me.tablepartsStation.lastupdatedColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablepartsStation.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'partsStation' is DBNull.", e) End Try End Get Set Me(Me.tablepartsStation.lastupdatedbyColumn) = value End Set End Property _ Public Function Isstation_codeNull() As Boolean Return Me.IsNull(Me.tablepartsStation.station_codeColumn) End Function _ Public Sub Setstation_codeNull() Me(Me.tablepartsStation.station_codeColumn) = Global.System.Convert.DBNull End Sub _ Public Function Issupplier_idNull() As Boolean Return Me.IsNull(Me.tablepartsStation.supplier_idColumn) End Function _ Public Sub Setsupplier_idNull() Me(Me.tablepartsStation.supplier_idColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedNull() As Boolean Return Me.IsNull(Me.tablepartsStation.lastupdatedColumn) End Function _ Public Sub SetlastupdatedNull() Me(Me.tablepartsStation.lastupdatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablepartsStation.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablepartsStation.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class partsSupplierRow Inherits Global.System.Data.DataRow Private tablepartsSupplier As partsSupplierDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepartsSupplier = CType(Me.Table,partsSupplierDataTable) End Sub _ Public Property supplier_id() As Integer Get Return CType(Me(Me.tablepartsSupplier.supplier_idColumn),Integer) End Get Set Me(Me.tablepartsSupplier.supplier_idColumn) = value End Set End Property _ Public Property supplier_name() As String Get Try Return CType(Me(Me.tablepartsSupplier.supplier_nameColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'supplier_name' in table 'partsSupplier' is DBNull.", e) End Try End Get Set Me(Me.tablepartsSupplier.supplier_nameColumn) = value End Set End Property _ Public Property lastupdated() As Date Get Try Return CType(Me(Me.tablepartsSupplier.lastupdatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdated' in table 'partsSupplier' is DBNull.", e) End Try End Get Set Me(Me.tablepartsSupplier.lastupdatedColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablepartsSupplier.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'partsSupplier' is DBNull.", e) End Try End Get Set Me(Me.tablepartsSupplier.lastupdatedbyColumn) = value End Set End Property _ Public Function Issupplier_nameNull() As Boolean Return Me.IsNull(Me.tablepartsSupplier.supplier_nameColumn) End Function _ Public Sub Setsupplier_nameNull() Me(Me.tablepartsSupplier.supplier_nameColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedNull() As Boolean Return Me.IsNull(Me.tablepartsSupplier.lastupdatedColumn) End Function _ Public Sub SetlastupdatedNull() Me(Me.tablepartsSupplier.lastupdatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablepartsSupplier.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablepartsSupplier.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class po_detailRow Inherits Global.System.Data.DataRow Private tablepo_detail As po_detailDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepo_detail = CType(Me.Table,po_detailDataTable) End Sub _ Public Property poNumber() As String Get Try Return CType(Me(Me.tablepo_detail.poNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poNumber' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.poNumberColumn) = value End Set End Property _ Public Property soNumber() As String Get Try Return CType(Me(Me.tablepo_detail.soNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'soNumber' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.soNumberColumn) = value End Set End Property _ Public Property poDate() As Date Get Try Return CType(Me(Me.tablepo_detail.poDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poDate' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.poDateColumn) = value End Set End Property _ Public Property poLine() As Decimal Get Try Return CType(Me(Me.tablepo_detail.poLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.poLineColumn) = value End Set End Property _ Public Property custPoLine() As Decimal Get Try Return CType(Me(Me.tablepo_detail.custPoLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custPoLine' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.custPoLineColumn) = value End Set End Property _ Public Property soline() As String Get Return CType(Me(Me.tablepo_detail.solineColumn),String) End Get Set Me(Me.tablepo_detail.solineColumn) = value End Set End Property _ Public Property alvsoline() As Decimal Get Try Return CType(Me(Me.tablepo_detail.alvsolineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'alvsoline' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.alvsolineColumn) = value End Set End Property _ Public Property duedate() As Date Get Try Return CType(Me(Me.tablepo_detail.duedateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'duedate' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.duedateColumn) = value End Set End Property _ Public Property custpartnumber() As String Get Try Return CType(Me(Me.tablepo_detail.custpartnumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custpartnumber' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.custpartnumberColumn) = value End Set End Property _ Public Property parentpartnumber() As String Get Return CType(Me(Me.tablepo_detail.parentpartnumberColumn),String) End Get Set Me(Me.tablepo_detail.parentpartnumberColumn) = value End Set End Property _ Public Property childpartnumber() As String Get Return CType(Me(Me.tablepo_detail.childpartnumberColumn),String) End Get Set Me(Me.tablepo_detail.childpartnumberColumn) = value End Set End Property _ Public Property quantity() As Decimal Get Try Return CType(Me(Me.tablepo_detail.quantityColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.quantityColumn) = value End Set End Property _ Public Property custpart() As String Get Try Return CType(Me(Me.tablepo_detail.custpartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custpart' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.custpartColumn) = value End Set End Property _ Public Property custpartno() As String Get Try Return CType(Me(Me.tablepo_detail.custpartnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custpartno' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.custpartnoColumn) = value End Set End Property _ Public Property custpartdesc() As String Get Try Return CType(Me(Me.tablepo_detail.custpartdescColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custpartdesc' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.custpartdescColumn) = value End Set End Property _ Public Property custgif() As String Get Try Return CType(Me(Me.tablepo_detail.custgifColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custgif' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.custgifColumn) = value End Set End Property _ Public Property targetDate() As Date Get Try Return CType(Me(Me.tablepo_detail.targetDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'targetDate' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.targetDateColumn) = value End Set End Property _ Public Property flag2() As String Get Try Return CType(Me(Me.tablepo_detail.flag2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'flag2' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.flag2Column) = value End Set End Property _ Public Property flag3() As String Get Try Return CType(Me(Me.tablepo_detail.flag3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'flag3' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.flag3Column) = value End Set End Property _ Public Property remarks() As String Get Try Return CType(Me(Me.tablepo_detail.remarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'remarks' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.remarksColumn) = value End Set End Property _ Public Property lineComments() As String Get Try Return CType(Me(Me.tablepo_detail.lineCommentsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lineComments' in table 'po_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail.lineCommentsColumn) = value End Set End Property _ Public Function IspoNumberNull() As Boolean Return Me.IsNull(Me.tablepo_detail.poNumberColumn) End Function _ Public Sub SetpoNumberNull() Me(Me.tablepo_detail.poNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssoNumberNull() As Boolean Return Me.IsNull(Me.tablepo_detail.soNumberColumn) End Function _ Public Sub SetsoNumberNull() Me(Me.tablepo_detail.soNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoDateNull() As Boolean Return Me.IsNull(Me.tablepo_detail.poDateColumn) End Function _ Public Sub SetpoDateNull() Me(Me.tablepo_detail.poDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tablepo_detail.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tablepo_detail.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustPoLineNull() As Boolean Return Me.IsNull(Me.tablepo_detail.custPoLineColumn) End Function _ Public Sub SetcustPoLineNull() Me(Me.tablepo_detail.custPoLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsalvsolineNull() As Boolean Return Me.IsNull(Me.tablepo_detail.alvsolineColumn) End Function _ Public Sub SetalvsolineNull() Me(Me.tablepo_detail.alvsolineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsduedateNull() As Boolean Return Me.IsNull(Me.tablepo_detail.duedateColumn) End Function _ Public Sub SetduedateNull() Me(Me.tablepo_detail.duedateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustpartnumberNull() As Boolean Return Me.IsNull(Me.tablepo_detail.custpartnumberColumn) End Function _ Public Sub SetcustpartnumberNull() Me(Me.tablepo_detail.custpartnumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablepo_detail.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablepo_detail.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustpartNull() As Boolean Return Me.IsNull(Me.tablepo_detail.custpartColumn) End Function _ Public Sub SetcustpartNull() Me(Me.tablepo_detail.custpartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustpartnoNull() As Boolean Return Me.IsNull(Me.tablepo_detail.custpartnoColumn) End Function _ Public Sub SetcustpartnoNull() Me(Me.tablepo_detail.custpartnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustpartdescNull() As Boolean Return Me.IsNull(Me.tablepo_detail.custpartdescColumn) End Function _ Public Sub SetcustpartdescNull() Me(Me.tablepo_detail.custpartdescColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustgifNull() As Boolean Return Me.IsNull(Me.tablepo_detail.custgifColumn) End Function _ Public Sub SetcustgifNull() Me(Me.tablepo_detail.custgifColumn) = Global.System.Convert.DBNull End Sub _ Public Function IstargetDateNull() As Boolean Return Me.IsNull(Me.tablepo_detail.targetDateColumn) End Function _ Public Sub SettargetDateNull() Me(Me.tablepo_detail.targetDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function Isflag2Null() As Boolean Return Me.IsNull(Me.tablepo_detail.flag2Column) End Function _ Public Sub Setflag2Null() Me(Me.tablepo_detail.flag2Column) = Global.System.Convert.DBNull End Sub _ Public Function Isflag3Null() As Boolean Return Me.IsNull(Me.tablepo_detail.flag3Column) End Function _ Public Sub Setflag3Null() Me(Me.tablepo_detail.flag3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsremarksNull() As Boolean Return Me.IsNull(Me.tablepo_detail.remarksColumn) End Function _ Public Sub SetremarksNull() Me(Me.tablepo_detail.remarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslineCommentsNull() As Boolean Return Me.IsNull(Me.tablepo_detail.lineCommentsColumn) End Function _ Public Sub SetlineCommentsNull() Me(Me.tablepo_detail.lineCommentsColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class po_detail_backupRow Inherits Global.System.Data.DataRow Private tablepo_detail_backup As po_detail_backupDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepo_detail_backup = CType(Me.Table,po_detail_backupDataTable) End Sub _ Public Property Company() As String Get Try Return CType(Me(Me.tablepo_detail_backup.CompanyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Company' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.CompanyColumn) = value End Set End Property _ Public Property CodeType() As String Get Try Return CType(Me(Me.tablepo_detail_backup.CodeTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CodeType' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.CodeTypeColumn) = value End Set End Property _ Public Property TypHD() As String Get Try Return CType(Me(Me.tablepo_detail_backup.TypHDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TypHD' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.TypHDColumn) = value End Set End Property _ Public Property ModeHD() As String Get Try Return CType(Me(Me.tablepo_detail_backup.ModeHDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModeHD' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.ModeHDColumn) = value End Set End Property _ Public Property PONUmber() As String Get Try Return CType(Me(Me.tablepo_detail_backup.PONUmberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PONUmber' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.PONUmberColumn) = value End Set End Property _ Public Property SONumber() As String Get Try Return CType(Me(Me.tablepo_detail_backup.SONumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SONumber' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.SONumberColumn) = value End Set End Property _ Public Property PODate() As Date Get Try Return CType(Me(Me.tablepo_detail_backup.PODateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PODate' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.PODateColumn) = value End Set End Property _ Public Property POLine() As Decimal Get Try Return CType(Me(Me.tablepo_detail_backup.POLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'POLine' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.POLineColumn) = value End Set End Property _ Public Property CustPOLine() As Decimal Get Try Return CType(Me(Me.tablepo_detail_backup.CustPOLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPOLine' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.CustPOLineColumn) = value End Set End Property _ Public Property SOLine() As String Get Return CType(Me(Me.tablepo_detail_backup.SOLineColumn),String) End Get Set Me(Me.tablepo_detail_backup.SOLineColumn) = value End Set End Property _ Public Property DueDate() As Date Get Try Return CType(Me(Me.tablepo_detail_backup.DueDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DueDate' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.DueDateColumn) = value End Set End Property _ Public Property CustPartNumber() As String Get Try Return CType(Me(Me.tablepo_detail_backup.CustPartNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPartNumber' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.CustPartNumberColumn) = value End Set End Property _ Public Property ParentPartNumber() As String Get Return CType(Me(Me.tablepo_detail_backup.ParentPartNumberColumn),String) End Get Set Me(Me.tablepo_detail_backup.ParentPartNumberColumn) = value End Set End Property _ Public Property ChildPartNumber() As String Get Return CType(Me(Me.tablepo_detail_backup.ChildPartNumberColumn),String) End Get Set Me(Me.tablepo_detail_backup.ChildPartNumberColumn) = value End Set End Property _ Public Property quantity() As Decimal Get Try Return CType(Me(Me.tablepo_detail_backup.quantityColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.quantityColumn) = value End Set End Property _ Public Property ParentPrice() As Integer Get Return CType(Me(Me.tablepo_detail_backup.ParentPriceColumn),Integer) End Get Set Me(Me.tablepo_detail_backup.ParentPriceColumn) = value End Set End Property _ Public Property s21Price() As Integer Get Return CType(Me(Me.tablepo_detail_backup.s21PriceColumn),Integer) End Get Set Me(Me.tablepo_detail_backup.s21PriceColumn) = value End Set End Property _ Public Property UnitofMeasure() As String Get Try Return CType(Me(Me.tablepo_detail_backup.UnitofMeasureColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UnitofMeasure' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.UnitofMeasureColumn) = value End Set End Property _ Public Property TargetDate() As Date Get Try Return CType(Me(Me.tablepo_detail_backup.TargetDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TargetDate' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.TargetDateColumn) = value End Set End Property _ Public Property CustPart() As String Get Try Return CType(Me(Me.tablepo_detail_backup.CustPartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPart' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.CustPartColumn) = value End Set End Property _ Public Property CustPartDesc() As String Get Try Return CType(Me(Me.tablepo_detail_backup.CustPartDescColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPartDesc' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.CustPartDescColumn) = value End Set End Property _ Public Property CustGif() As String Get Try Return CType(Me(Me.tablepo_detail_backup.CustGifColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustGif' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.CustGifColumn) = value End Set End Property _ Public Property Flag() As String Get Try Return CType(Me(Me.tablepo_detail_backup.FlagColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.FlagColumn) = value End Set End Property _ Public Property Flag1() As String Get Try Return CType(Me(Me.tablepo_detail_backup.Flag1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag1' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.Flag1Column) = value End Set End Property _ Public Property Flag2() As String Get Try Return CType(Me(Me.tablepo_detail_backup.Flag2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag2' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.Flag2Column) = value End Set End Property _ Public Property Flag3() As String Get Try Return CType(Me(Me.tablepo_detail_backup.Flag3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag3' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.Flag3Column) = value End Set End Property _ Public Property Remarks() As String Get Try Return CType(Me(Me.tablepo_detail_backup.RemarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Remarks' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.RemarksColumn) = value End Set End Property _ Public Property Field1() As String Get Try Return CType(Me(Me.tablepo_detail_backup.Field1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Field1' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.Field1Column) = value End Set End Property _ Public Property Field2() As String Get Try Return CType(Me(Me.tablepo_detail_backup.Field2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Field2' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.Field2Column) = value End Set End Property _ Public Property Field3() As String Get Try Return CType(Me(Me.tablepo_detail_backup.Field3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Field3' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.Field3Column) = value End Set End Property _ Public Property LineComments() As String Get Try Return CType(Me(Me.tablepo_detail_backup.LineCommentsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'LineComments' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.LineCommentsColumn) = value End Set End Property _ Public Property DateCreated() As Date Get Try Return CType(Me(Me.tablepo_detail_backup.DateCreatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateCreated' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.DateCreatedColumn) = value End Set End Property _ Public Property TimeCreated() As String Get Try Return CType(Me(Me.tablepo_detail_backup.TimeCreatedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TimeCreated' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.TimeCreatedColumn) = value End Set End Property _ Public Property UserID() As String Get Try Return CType(Me(Me.tablepo_detail_backup.UserIDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UserID' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.UserIDColumn) = value End Set End Property _ Public Property DateLastChanged() As String Get Try Return CType(Me(Me.tablepo_detail_backup.DateLastChangedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateLastChanged' in table 'po_detail_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_backup.DateLastChangedColumn) = value End Set End Property _ Public Function IsCompanyNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.CompanyColumn) End Function _ Public Sub SetCompanyNull() Me(Me.tablepo_detail_backup.CompanyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCodeTypeNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.CodeTypeColumn) End Function _ Public Sub SetCodeTypeNull() Me(Me.tablepo_detail_backup.CodeTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTypHDNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.TypHDColumn) End Function _ Public Sub SetTypHDNull() Me(Me.tablepo_detail_backup.TypHDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsModeHDNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.ModeHDColumn) End Function _ Public Sub SetModeHDNull() Me(Me.tablepo_detail_backup.ModeHDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPONUmberNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.PONUmberColumn) End Function _ Public Sub SetPONUmberNull() Me(Me.tablepo_detail_backup.PONUmberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSONumberNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.SONumberColumn) End Function _ Public Sub SetSONumberNull() Me(Me.tablepo_detail_backup.SONumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPODateNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.PODateColumn) End Function _ Public Sub SetPODateNull() Me(Me.tablepo_detail_backup.PODateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPOLineNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.POLineColumn) End Function _ Public Sub SetPOLineNull() Me(Me.tablepo_detail_backup.POLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPOLineNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.CustPOLineColumn) End Function _ Public Sub SetCustPOLineNull() Me(Me.tablepo_detail_backup.CustPOLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDueDateNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.DueDateColumn) End Function _ Public Sub SetDueDateNull() Me(Me.tablepo_detail_backup.DueDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartNumberNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.CustPartNumberColumn) End Function _ Public Sub SetCustPartNumberNull() Me(Me.tablepo_detail_backup.CustPartNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablepo_detail_backup.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUnitofMeasureNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.UnitofMeasureColumn) End Function _ Public Sub SetUnitofMeasureNull() Me(Me.tablepo_detail_backup.UnitofMeasureColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTargetDateNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.TargetDateColumn) End Function _ Public Sub SetTargetDateNull() Me(Me.tablepo_detail_backup.TargetDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.CustPartColumn) End Function _ Public Sub SetCustPartNull() Me(Me.tablepo_detail_backup.CustPartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartDescNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.CustPartDescColumn) End Function _ Public Sub SetCustPartDescNull() Me(Me.tablepo_detail_backup.CustPartDescColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustGifNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.CustGifColumn) End Function _ Public Sub SetCustGifNull() Me(Me.tablepo_detail_backup.CustGifColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlagNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.FlagColumn) End Function _ Public Sub SetFlagNull() Me(Me.tablepo_detail_backup.FlagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag1Null() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.Flag1Column) End Function _ Public Sub SetFlag1Null() Me(Me.tablepo_detail_backup.Flag1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag2Null() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.Flag2Column) End Function _ Public Sub SetFlag2Null() Me(Me.tablepo_detail_backup.Flag2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag3Null() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.Flag3Column) End Function _ Public Sub SetFlag3Null() Me(Me.tablepo_detail_backup.Flag3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsRemarksNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.RemarksColumn) End Function _ Public Sub SetRemarksNull() Me(Me.tablepo_detail_backup.RemarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsField1Null() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.Field1Column) End Function _ Public Sub SetField1Null() Me(Me.tablepo_detail_backup.Field1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsField2Null() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.Field2Column) End Function _ Public Sub SetField2Null() Me(Me.tablepo_detail_backup.Field2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsField3Null() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.Field3Column) End Function _ Public Sub SetField3Null() Me(Me.tablepo_detail_backup.Field3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsLineCommentsNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.LineCommentsColumn) End Function _ Public Sub SetLineCommentsNull() Me(Me.tablepo_detail_backup.LineCommentsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateCreatedNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.DateCreatedColumn) End Function _ Public Sub SetDateCreatedNull() Me(Me.tablepo_detail_backup.DateCreatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTimeCreatedNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.TimeCreatedColumn) End Function _ Public Sub SetTimeCreatedNull() Me(Me.tablepo_detail_backup.TimeCreatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUserIDNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.UserIDColumn) End Function _ Public Sub SetUserIDNull() Me(Me.tablepo_detail_backup.UserIDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateLastChangedNull() As Boolean Return Me.IsNull(Me.tablepo_detail_backup.DateLastChangedColumn) End Function _ Public Sub SetDateLastChangedNull() Me(Me.tablepo_detail_backup.DateLastChangedColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class po_detail_tempRow Inherits Global.System.Data.DataRow Private tablepo_detail_temp As po_detail_tempDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepo_detail_temp = CType(Me.Table,po_detail_tempDataTable) End Sub _ Public Property Company() As String Get Try Return CType(Me(Me.tablepo_detail_temp.CompanyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Company' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.CompanyColumn) = value End Set End Property _ Public Property CodeType() As String Get Try Return CType(Me(Me.tablepo_detail_temp.CodeTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CodeType' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.CodeTypeColumn) = value End Set End Property _ Public Property TypHD() As String Get Try Return CType(Me(Me.tablepo_detail_temp.TypHDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TypHD' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.TypHDColumn) = value End Set End Property _ Public Property ModeHD() As String Get Try Return CType(Me(Me.tablepo_detail_temp.ModeHDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModeHD' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.ModeHDColumn) = value End Set End Property _ Public Property PONumber() As String Get Try Return CType(Me(Me.tablepo_detail_temp.PONumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PONumber' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.PONumberColumn) = value End Set End Property _ Public Property SONumber() As String Get Try Return CType(Me(Me.tablepo_detail_temp.SONumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SONumber' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.SONumberColumn) = value End Set End Property _ Public Property PODate() As Date Get Try Return CType(Me(Me.tablepo_detail_temp.PODateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PODate' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.PODateColumn) = value End Set End Property _ Public Property POLine() As Decimal Get Try Return CType(Me(Me.tablepo_detail_temp.POLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'POLine' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.POLineColumn) = value End Set End Property _ Public Property CustPOLine() As Decimal Get Try Return CType(Me(Me.tablepo_detail_temp.CustPOLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPOLine' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.CustPOLineColumn) = value End Set End Property _ Public Property SOLine() As String Get Return CType(Me(Me.tablepo_detail_temp.SOLineColumn),String) End Get Set Me(Me.tablepo_detail_temp.SOLineColumn) = value End Set End Property _ Public Property AlvSOLine() As Decimal Get Try Return CType(Me(Me.tablepo_detail_temp.AlvSOLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'AlvSOLine' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.AlvSOLineColumn) = value End Set End Property _ Public Property DueDate() As Date Get Try Return CType(Me(Me.tablepo_detail_temp.DueDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DueDate' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.DueDateColumn) = value End Set End Property _ Public Property CustPartNumber() As String Get Try Return CType(Me(Me.tablepo_detail_temp.CustPartNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPartNumber' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.CustPartNumberColumn) = value End Set End Property _ Public Property ParentPartNumber() As String Get Return CType(Me(Me.tablepo_detail_temp.ParentPartNumberColumn),String) End Get Set Me(Me.tablepo_detail_temp.ParentPartNumberColumn) = value End Set End Property _ Public Property ChildPartNumber() As String Get Return CType(Me(Me.tablepo_detail_temp.ChildPartNumberColumn),String) End Get Set Me(Me.tablepo_detail_temp.ChildPartNumberColumn) = value End Set End Property _ Public Property quantity() As Decimal Get Try Return CType(Me(Me.tablepo_detail_temp.quantityColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.quantityColumn) = value End Set End Property _ Public Property ParentPrice() As Integer Get Return CType(Me(Me.tablepo_detail_temp.ParentPriceColumn),Integer) End Get Set Me(Me.tablepo_detail_temp.ParentPriceColumn) = value End Set End Property _ Public Property s21Price() As Integer Get Return CType(Me(Me.tablepo_detail_temp.s21PriceColumn),Integer) End Get Set Me(Me.tablepo_detail_temp.s21PriceColumn) = value End Set End Property _ Public Property UnitofMeasure() As String Get Try Return CType(Me(Me.tablepo_detail_temp.UnitofMeasureColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UnitofMeasure' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.UnitofMeasureColumn) = value End Set End Property _ Public Property TargetDate() As Date Get Try Return CType(Me(Me.tablepo_detail_temp.TargetDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TargetDate' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.TargetDateColumn) = value End Set End Property _ Public Property CustPart() As String Get Try Return CType(Me(Me.tablepo_detail_temp.CustPartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPart' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.CustPartColumn) = value End Set End Property _ Public Property CustPartNo() As String Get Try Return CType(Me(Me.tablepo_detail_temp.CustPartNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPartNo' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.CustPartNoColumn) = value End Set End Property _ Public Property CustPartDesc() As String Get Try Return CType(Me(Me.tablepo_detail_temp.CustPartDescColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPartDesc' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.CustPartDescColumn) = value End Set End Property _ Public Property CustGif() As String Get Try Return CType(Me(Me.tablepo_detail_temp.CustGifColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustGif' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.CustGifColumn) = value End Set End Property _ Public Property Flag() As String Get Try Return CType(Me(Me.tablepo_detail_temp.FlagColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.FlagColumn) = value End Set End Property _ Public Property Flag1() As String Get Try Return CType(Me(Me.tablepo_detail_temp.Flag1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag1' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.Flag1Column) = value End Set End Property _ Public Property Flag2() As String Get Try Return CType(Me(Me.tablepo_detail_temp.Flag2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag2' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.Flag2Column) = value End Set End Property _ Public Property Flag3() As String Get Try Return CType(Me(Me.tablepo_detail_temp.Flag3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag3' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.Flag3Column) = value End Set End Property _ Public Property Remarks() As String Get Try Return CType(Me(Me.tablepo_detail_temp.RemarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Remarks' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.RemarksColumn) = value End Set End Property _ Public Property Field1() As String Get Try Return CType(Me(Me.tablepo_detail_temp.Field1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Field1' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.Field1Column) = value End Set End Property _ Public Property Field2() As String Get Try Return CType(Me(Me.tablepo_detail_temp.Field2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Field2' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.Field2Column) = value End Set End Property _ Public Property Field3() As String Get Try Return CType(Me(Me.tablepo_detail_temp.Field3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Field3' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.Field3Column) = value End Set End Property _ Public Property LineComments() As String Get Try Return CType(Me(Me.tablepo_detail_temp.LineCommentsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'LineComments' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.LineCommentsColumn) = value End Set End Property _ Public Property DateCreated() As Date Get Try Return CType(Me(Me.tablepo_detail_temp.DateCreatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateCreated' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.DateCreatedColumn) = value End Set End Property _ Public Property TimeCreated() As String Get Try Return CType(Me(Me.tablepo_detail_temp.TimeCreatedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TimeCreated' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.TimeCreatedColumn) = value End Set End Property _ Public Property UserID() As String Get Try Return CType(Me(Me.tablepo_detail_temp.UserIDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UserID' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.UserIDColumn) = value End Set End Property _ Public Property DateLastChanged() As String Get Try Return CType(Me(Me.tablepo_detail_temp.DateLastChangedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateLastChanged' in table 'po_detail_temp' is DBNull.", e) End Try End Get Set Me(Me.tablepo_detail_temp.DateLastChangedColumn) = value End Set End Property _ Public Function IsCompanyNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.CompanyColumn) End Function _ Public Sub SetCompanyNull() Me(Me.tablepo_detail_temp.CompanyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCodeTypeNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.CodeTypeColumn) End Function _ Public Sub SetCodeTypeNull() Me(Me.tablepo_detail_temp.CodeTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTypHDNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.TypHDColumn) End Function _ Public Sub SetTypHDNull() Me(Me.tablepo_detail_temp.TypHDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsModeHDNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.ModeHDColumn) End Function _ Public Sub SetModeHDNull() Me(Me.tablepo_detail_temp.ModeHDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPONumberNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.PONumberColumn) End Function _ Public Sub SetPONumberNull() Me(Me.tablepo_detail_temp.PONumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSONumberNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.SONumberColumn) End Function _ Public Sub SetSONumberNull() Me(Me.tablepo_detail_temp.SONumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPODateNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.PODateColumn) End Function _ Public Sub SetPODateNull() Me(Me.tablepo_detail_temp.PODateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPOLineNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.POLineColumn) End Function _ Public Sub SetPOLineNull() Me(Me.tablepo_detail_temp.POLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPOLineNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.CustPOLineColumn) End Function _ Public Sub SetCustPOLineNull() Me(Me.tablepo_detail_temp.CustPOLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsAlvSOLineNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.AlvSOLineColumn) End Function _ Public Sub SetAlvSOLineNull() Me(Me.tablepo_detail_temp.AlvSOLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDueDateNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.DueDateColumn) End Function _ Public Sub SetDueDateNull() Me(Me.tablepo_detail_temp.DueDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartNumberNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.CustPartNumberColumn) End Function _ Public Sub SetCustPartNumberNull() Me(Me.tablepo_detail_temp.CustPartNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablepo_detail_temp.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUnitofMeasureNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.UnitofMeasureColumn) End Function _ Public Sub SetUnitofMeasureNull() Me(Me.tablepo_detail_temp.UnitofMeasureColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTargetDateNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.TargetDateColumn) End Function _ Public Sub SetTargetDateNull() Me(Me.tablepo_detail_temp.TargetDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.CustPartColumn) End Function _ Public Sub SetCustPartNull() Me(Me.tablepo_detail_temp.CustPartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartNoNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.CustPartNoColumn) End Function _ Public Sub SetCustPartNoNull() Me(Me.tablepo_detail_temp.CustPartNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartDescNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.CustPartDescColumn) End Function _ Public Sub SetCustPartDescNull() Me(Me.tablepo_detail_temp.CustPartDescColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustGifNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.CustGifColumn) End Function _ Public Sub SetCustGifNull() Me(Me.tablepo_detail_temp.CustGifColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlagNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.FlagColumn) End Function _ Public Sub SetFlagNull() Me(Me.tablepo_detail_temp.FlagColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag1Null() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.Flag1Column) End Function _ Public Sub SetFlag1Null() Me(Me.tablepo_detail_temp.Flag1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag2Null() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.Flag2Column) End Function _ Public Sub SetFlag2Null() Me(Me.tablepo_detail_temp.Flag2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag3Null() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.Flag3Column) End Function _ Public Sub SetFlag3Null() Me(Me.tablepo_detail_temp.Flag3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsRemarksNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.RemarksColumn) End Function _ Public Sub SetRemarksNull() Me(Me.tablepo_detail_temp.RemarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsField1Null() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.Field1Column) End Function _ Public Sub SetField1Null() Me(Me.tablepo_detail_temp.Field1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsField2Null() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.Field2Column) End Function _ Public Sub SetField2Null() Me(Me.tablepo_detail_temp.Field2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsField3Null() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.Field3Column) End Function _ Public Sub SetField3Null() Me(Me.tablepo_detail_temp.Field3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsLineCommentsNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.LineCommentsColumn) End Function _ Public Sub SetLineCommentsNull() Me(Me.tablepo_detail_temp.LineCommentsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateCreatedNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.DateCreatedColumn) End Function _ Public Sub SetDateCreatedNull() Me(Me.tablepo_detail_temp.DateCreatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTimeCreatedNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.TimeCreatedColumn) End Function _ Public Sub SetTimeCreatedNull() Me(Me.tablepo_detail_temp.TimeCreatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUserIDNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.UserIDColumn) End Function _ Public Sub SetUserIDNull() Me(Me.tablepo_detail_temp.UserIDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateLastChangedNull() As Boolean Return Me.IsNull(Me.tablepo_detail_temp.DateLastChangedColumn) End Function _ Public Sub SetDateLastChangedNull() Me(Me.tablepo_detail_temp.DateLastChangedColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class po_headerRow Inherits Global.System.Data.DataRow Private tablepo_header As po_headerDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepo_header = CType(Me.Table,po_headerDataTable) End Sub _ Public Property Company() As String Get Try Return CType(Me(Me.tablepo_header.CompanyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Company' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.CompanyColumn) = value End Set End Property _ Public Property CodeType() As String Get Try Return CType(Me(Me.tablepo_header.CodeTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CodeType' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.CodeTypeColumn) = value End Set End Property _ Public Property TypeHD() As String Get Try Return CType(Me(Me.tablepo_header.TypeHDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TypeHD' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.TypeHDColumn) = value End Set End Property _ Public Property ModeHD() As String Get Try Return CType(Me(Me.tablepo_header.ModeHDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModeHD' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.ModeHDColumn) = value End Set End Property _ Public Property Prefix() As String Get Try Return CType(Me(Me.tablepo_header.PrefixColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Prefix' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.PrefixColumn) = value End Set End Property _ Public Property GenDate() As Date Get Try Return CType(Me(Me.tablepo_header.GenDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'GenDate' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.GenDateColumn) = value End Set End Property _ Public Property GenHour() As Date Get Try Return CType(Me(Me.tablepo_header.GenHourColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'GenHour' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.GenHourColumn) = value End Set End Property _ Public Property PONumber() As String Get Try Return CType(Me(Me.tablepo_header.PONumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PONumber' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.PONumberColumn) = value End Set End Property _ Public Property PONumberPrev() As String Get Try Return CType(Me(Me.tablepo_header.PONumberPrevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PONumberPrev' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.PONumberPrevColumn) = value End Set End Property _ Public Property SONumber() As String Get Try Return CType(Me(Me.tablepo_header.SONumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SONumber' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.SONumberColumn) = value End Set End Property _ Public Property PODate() As Date Get Try Return CType(Me(Me.tablepo_header.PODateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PODate' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.PODateColumn) = value End Set End Property _ Public Property Revision() As Decimal Get Try Return CType(Me(Me.tablepo_header.RevisionColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Revision' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.RevisionColumn) = value End Set End Property _ Public Property Status() As String Get Try Return CType(Me(Me.tablepo_header.StatusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Status' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.StatusColumn) = value End Set End Property _ Public Property AlvSO() As String Get Try Return CType(Me(Me.tablepo_header.AlvSOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'AlvSO' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.AlvSOColumn) = value End Set End Property _ Public Property CustPO() As String Get Try Return CType(Me(Me.tablepo_header.CustPOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPO' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.CustPOColumn) = value End Set End Property _ Public Property ShipVia() As String Get Try Return CType(Me(Me.tablepo_header.ShipViaColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipVia' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.ShipViaColumn) = value End Set End Property _ Public Property ShipTo() As String Get Try Return CType(Me(Me.tablepo_header.ShipToColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipTo' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.ShipToColumn) = value End Set End Property _ Public Property SipAdd1() As String Get Try Return CType(Me(Me.tablepo_header.SipAdd1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SipAdd1' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.SipAdd1Column) = value End Set End Property _ Public Property ShipAdd2() As String Get Try Return CType(Me(Me.tablepo_header.ShipAdd2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipAdd2' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.ShipAdd2Column) = value End Set End Property _ Public Property ShipAdd3() As String Get Try Return CType(Me(Me.tablepo_header.ShipAdd3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipAdd3' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.ShipAdd3Column) = value End Set End Property _ Public Property City() As String Get Try Return CType(Me(Me.tablepo_header.CityColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'City' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.CityColumn) = value End Set End Property _ Public Property State() As String Get Try Return CType(Me(Me.tablepo_header.StateColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'State' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.StateColumn) = value End Set End Property _ Public Property PostalCode() As String Get Try Return CType(Me(Me.tablepo_header.PostalCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PostalCode' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.PostalCodeColumn) = value End Set End Property _ Public Property CountryCode() As String Get Try Return CType(Me(Me.tablepo_header.CountryCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CountryCode' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.CountryCodeColumn) = value End Set End Property _ Public Property ShipToNum() As String Get Try Return CType(Me(Me.tablepo_header.ShipToNumColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipToNum' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.ShipToNumColumn) = value End Set End Property _ Public Property Flag0() As String Get Try Return CType(Me(Me.tablepo_header.Flag0Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag0' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Flag0Column) = value End Set End Property _ Public Property Flag1() As String Get Try Return CType(Me(Me.tablepo_header.Flag1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag1' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Flag1Column) = value End Set End Property _ Public Property Flag2() As String Get Try Return CType(Me(Me.tablepo_header.Flag2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag2' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Flag2Column) = value End Set End Property _ Public Property Flag3() As String Get Try Return CType(Me(Me.tablepo_header.Flag3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag3' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Flag3Column) = value End Set End Property _ Public Property Remark() As String Get Try Return CType(Me(Me.tablepo_header.RemarkColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Remark' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.RemarkColumn) = value End Set End Property _ Public Property Fild1() As String Get Try Return CType(Me(Me.tablepo_header.Fild1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Fild1' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Fild1Column) = value End Set End Property _ Public Property Fild2() As String Get Try Return CType(Me(Me.tablepo_header.Fild2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Fild2' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Fild2Column) = value End Set End Property _ Public Property Fild3() As String Get Try Return CType(Me(Me.tablepo_header.Fild3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Fild3' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Fild3Column) = value End Set End Property _ Public Property Fild4() As String Get Try Return CType(Me(Me.tablepo_header.Fild4Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Fild4' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Fild4Column) = value End Set End Property _ Public Property Fild5() As String Get Try Return CType(Me(Me.tablepo_header.Fild5Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Fild5' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.Fild5Column) = value End Set End Property _ Public Property Comments() As String Get Try Return CType(Me(Me.tablepo_header.CommentsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Comments' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.CommentsColumn) = value End Set End Property _ Public Property DateCreated() As Date Get Try Return CType(Me(Me.tablepo_header.DateCreatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateCreated' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.DateCreatedColumn) = value End Set End Property _ Public Property TimeCreated() As String Get Try Return CType(Me(Me.tablepo_header.TimeCreatedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TimeCreated' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.TimeCreatedColumn) = value End Set End Property _ Public Property UserID() As String Get Try Return CType(Me(Me.tablepo_header.UserIDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UserID' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.UserIDColumn) = value End Set End Property _ Public Property DateLastChanged() As String Get Try Return CType(Me(Me.tablepo_header.DateLastChangedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateLastChanged' in table 'po_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header.DateLastChangedColumn) = value End Set End Property _ Public Function IsCompanyNull() As Boolean Return Me.IsNull(Me.tablepo_header.CompanyColumn) End Function _ Public Sub SetCompanyNull() Me(Me.tablepo_header.CompanyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCodeTypeNull() As Boolean Return Me.IsNull(Me.tablepo_header.CodeTypeColumn) End Function _ Public Sub SetCodeTypeNull() Me(Me.tablepo_header.CodeTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTypeHDNull() As Boolean Return Me.IsNull(Me.tablepo_header.TypeHDColumn) End Function _ Public Sub SetTypeHDNull() Me(Me.tablepo_header.TypeHDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsModeHDNull() As Boolean Return Me.IsNull(Me.tablepo_header.ModeHDColumn) End Function _ Public Sub SetModeHDNull() Me(Me.tablepo_header.ModeHDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPrefixNull() As Boolean Return Me.IsNull(Me.tablepo_header.PrefixColumn) End Function _ Public Sub SetPrefixNull() Me(Me.tablepo_header.PrefixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGenDateNull() As Boolean Return Me.IsNull(Me.tablepo_header.GenDateColumn) End Function _ Public Sub SetGenDateNull() Me(Me.tablepo_header.GenDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGenHourNull() As Boolean Return Me.IsNull(Me.tablepo_header.GenHourColumn) End Function _ Public Sub SetGenHourNull() Me(Me.tablepo_header.GenHourColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPONumberNull() As Boolean Return Me.IsNull(Me.tablepo_header.PONumberColumn) End Function _ Public Sub SetPONumberNull() Me(Me.tablepo_header.PONumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPONumberPrevNull() As Boolean Return Me.IsNull(Me.tablepo_header.PONumberPrevColumn) End Function _ Public Sub SetPONumberPrevNull() Me(Me.tablepo_header.PONumberPrevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSONumberNull() As Boolean Return Me.IsNull(Me.tablepo_header.SONumberColumn) End Function _ Public Sub SetSONumberNull() Me(Me.tablepo_header.SONumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPODateNull() As Boolean Return Me.IsNull(Me.tablepo_header.PODateColumn) End Function _ Public Sub SetPODateNull() Me(Me.tablepo_header.PODateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsRevisionNull() As Boolean Return Me.IsNull(Me.tablepo_header.RevisionColumn) End Function _ Public Sub SetRevisionNull() Me(Me.tablepo_header.RevisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsStatusNull() As Boolean Return Me.IsNull(Me.tablepo_header.StatusColumn) End Function _ Public Sub SetStatusNull() Me(Me.tablepo_header.StatusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsAlvSONull() As Boolean Return Me.IsNull(Me.tablepo_header.AlvSOColumn) End Function _ Public Sub SetAlvSONull() Me(Me.tablepo_header.AlvSOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPONull() As Boolean Return Me.IsNull(Me.tablepo_header.CustPOColumn) End Function _ Public Sub SetCustPONull() Me(Me.tablepo_header.CustPOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsShipViaNull() As Boolean Return Me.IsNull(Me.tablepo_header.ShipViaColumn) End Function _ Public Sub SetShipViaNull() Me(Me.tablepo_header.ShipViaColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsShipToNull() As Boolean Return Me.IsNull(Me.tablepo_header.ShipToColumn) End Function _ Public Sub SetShipToNull() Me(Me.tablepo_header.ShipToColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSipAdd1Null() As Boolean Return Me.IsNull(Me.tablepo_header.SipAdd1Column) End Function _ Public Sub SetSipAdd1Null() Me(Me.tablepo_header.SipAdd1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsShipAdd2Null() As Boolean Return Me.IsNull(Me.tablepo_header.ShipAdd2Column) End Function _ Public Sub SetShipAdd2Null() Me(Me.tablepo_header.ShipAdd2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsShipAdd3Null() As Boolean Return Me.IsNull(Me.tablepo_header.ShipAdd3Column) End Function _ Public Sub SetShipAdd3Null() Me(Me.tablepo_header.ShipAdd3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsCityNull() As Boolean Return Me.IsNull(Me.tablepo_header.CityColumn) End Function _ Public Sub SetCityNull() Me(Me.tablepo_header.CityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsStateNull() As Boolean Return Me.IsNull(Me.tablepo_header.StateColumn) End Function _ Public Sub SetStateNull() Me(Me.tablepo_header.StateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPostalCodeNull() As Boolean Return Me.IsNull(Me.tablepo_header.PostalCodeColumn) End Function _ Public Sub SetPostalCodeNull() Me(Me.tablepo_header.PostalCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCountryCodeNull() As Boolean Return Me.IsNull(Me.tablepo_header.CountryCodeColumn) End Function _ Public Sub SetCountryCodeNull() Me(Me.tablepo_header.CountryCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsShipToNumNull() As Boolean Return Me.IsNull(Me.tablepo_header.ShipToNumColumn) End Function _ Public Sub SetShipToNumNull() Me(Me.tablepo_header.ShipToNumColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag0Null() As Boolean Return Me.IsNull(Me.tablepo_header.Flag0Column) End Function _ Public Sub SetFlag0Null() Me(Me.tablepo_header.Flag0Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag1Null() As Boolean Return Me.IsNull(Me.tablepo_header.Flag1Column) End Function _ Public Sub SetFlag1Null() Me(Me.tablepo_header.Flag1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag2Null() As Boolean Return Me.IsNull(Me.tablepo_header.Flag2Column) End Function _ Public Sub SetFlag2Null() Me(Me.tablepo_header.Flag2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag3Null() As Boolean Return Me.IsNull(Me.tablepo_header.Flag3Column) End Function _ Public Sub SetFlag3Null() Me(Me.tablepo_header.Flag3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsRemarkNull() As Boolean Return Me.IsNull(Me.tablepo_header.RemarkColumn) End Function _ Public Sub SetRemarkNull() Me(Me.tablepo_header.RemarkColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFild1Null() As Boolean Return Me.IsNull(Me.tablepo_header.Fild1Column) End Function _ Public Sub SetFild1Null() Me(Me.tablepo_header.Fild1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFild2Null() As Boolean Return Me.IsNull(Me.tablepo_header.Fild2Column) End Function _ Public Sub SetFild2Null() Me(Me.tablepo_header.Fild2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFild3Null() As Boolean Return Me.IsNull(Me.tablepo_header.Fild3Column) End Function _ Public Sub SetFild3Null() Me(Me.tablepo_header.Fild3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFild4Null() As Boolean Return Me.IsNull(Me.tablepo_header.Fild4Column) End Function _ Public Sub SetFild4Null() Me(Me.tablepo_header.Fild4Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFild5Null() As Boolean Return Me.IsNull(Me.tablepo_header.Fild5Column) End Function _ Public Sub SetFild5Null() Me(Me.tablepo_header.Fild5Column) = Global.System.Convert.DBNull End Sub _ Public Function IsCommentsNull() As Boolean Return Me.IsNull(Me.tablepo_header.CommentsColumn) End Function _ Public Sub SetCommentsNull() Me(Me.tablepo_header.CommentsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateCreatedNull() As Boolean Return Me.IsNull(Me.tablepo_header.DateCreatedColumn) End Function _ Public Sub SetDateCreatedNull() Me(Me.tablepo_header.DateCreatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTimeCreatedNull() As Boolean Return Me.IsNull(Me.tablepo_header.TimeCreatedColumn) End Function _ Public Sub SetTimeCreatedNull() Me(Me.tablepo_header.TimeCreatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUserIDNull() As Boolean Return Me.IsNull(Me.tablepo_header.UserIDColumn) End Function _ Public Sub SetUserIDNull() Me(Me.tablepo_header.UserIDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateLastChangedNull() As Boolean Return Me.IsNull(Me.tablepo_header.DateLastChangedColumn) End Function _ Public Sub SetDateLastChangedNull() Me(Me.tablepo_header.DateLastChangedColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class po_header_backupRow Inherits Global.System.Data.DataRow Private tablepo_header_backup As po_header_backupDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepo_header_backup = CType(Me.Table,po_header_backupDataTable) End Sub _ Public Property Company() As String Get Try Return CType(Me(Me.tablepo_header_backup.CompanyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Company' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.CompanyColumn) = value End Set End Property _ Public Property CodeType() As String Get Try Return CType(Me(Me.tablepo_header_backup.CodeTypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CodeType' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.CodeTypeColumn) = value End Set End Property _ Public Property TypeHD() As String Get Try Return CType(Me(Me.tablepo_header_backup.TypeHDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TypeHD' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.TypeHDColumn) = value End Set End Property _ Public Property ModeHD() As String Get Try Return CType(Me(Me.tablepo_header_backup.ModeHDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModeHD' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.ModeHDColumn) = value End Set End Property _ Public Property Prefix() As String Get Try Return CType(Me(Me.tablepo_header_backup.PrefixColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Prefix' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.PrefixColumn) = value End Set End Property _ Public Property GenDate() As Date Get Try Return CType(Me(Me.tablepo_header_backup.GenDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'GenDate' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.GenDateColumn) = value End Set End Property _ Public Property GenHour() As Date Get Try Return CType(Me(Me.tablepo_header_backup.GenHourColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'GenHour' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.GenHourColumn) = value End Set End Property _ Public Property PONumber() As String Get Try Return CType(Me(Me.tablepo_header_backup.PONumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PONumber' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.PONumberColumn) = value End Set End Property _ Public Property SONumber() As String Get Try Return CType(Me(Me.tablepo_header_backup.SONumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SONumber' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.SONumberColumn) = value End Set End Property _ Public Property PODate() As Date Get Try Return CType(Me(Me.tablepo_header_backup.PODateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PODate' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.PODateColumn) = value End Set End Property _ Public Property Revision() As Decimal Get Try Return CType(Me(Me.tablepo_header_backup.RevisionColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Revision' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.RevisionColumn) = value End Set End Property _ Public Property Status() As String Get Try Return CType(Me(Me.tablepo_header_backup.StatusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Status' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.StatusColumn) = value End Set End Property _ Public Property CustPO() As String Get Try Return CType(Me(Me.tablepo_header_backup.CustPOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPO' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.CustPOColumn) = value End Set End Property _ Public Property ShipVia() As String Get Try Return CType(Me(Me.tablepo_header_backup.ShipViaColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipVia' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.ShipViaColumn) = value End Set End Property _ Public Property ShipTo() As String Get Try Return CType(Me(Me.tablepo_header_backup.ShipToColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipTo' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.ShipToColumn) = value End Set End Property _ Public Property SipAdd1() As String Get Try Return CType(Me(Me.tablepo_header_backup.SipAdd1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SipAdd1' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.SipAdd1Column) = value End Set End Property _ Public Property ShipAdd2() As String Get Try Return CType(Me(Me.tablepo_header_backup.ShipAdd2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipAdd2' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.ShipAdd2Column) = value End Set End Property _ Public Property ShipAdd3() As String Get Try Return CType(Me(Me.tablepo_header_backup.ShipAdd3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ShipAdd3' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.ShipAdd3Column) = value End Set End Property _ Public Property City() As String Get Try Return CType(Me(Me.tablepo_header_backup.CityColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'City' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.CityColumn) = value End Set End Property _ Public Property State() As String Get Try Return CType(Me(Me.tablepo_header_backup.StateColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'State' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.StateColumn) = value End Set End Property _ Public Property PostalCode() As String Get Try Return CType(Me(Me.tablepo_header_backup.PostalCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PostalCode' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.PostalCodeColumn) = value End Set End Property _ Public Property CountryCode() As String Get Try Return CType(Me(Me.tablepo_header_backup.CountryCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CountryCode' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.CountryCodeColumn) = value End Set End Property _ Public Property Flag0() As String Get Try Return CType(Me(Me.tablepo_header_backup.Flag0Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag0' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.Flag0Column) = value End Set End Property _ Public Property Flag1() As String Get Try Return CType(Me(Me.tablepo_header_backup.Flag1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag1' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.Flag1Column) = value End Set End Property _ Public Property Flag2() As String Get Try Return CType(Me(Me.tablepo_header_backup.Flag2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag2' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.Flag2Column) = value End Set End Property _ Public Property Flag3() As String Get Try Return CType(Me(Me.tablepo_header_backup.Flag3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag3' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.Flag3Column) = value End Set End Property _ Public Property Remark() As String Get Try Return CType(Me(Me.tablepo_header_backup.RemarkColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Remark' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.RemarkColumn) = value End Set End Property _ Public Property Fild1() As String Get Try Return CType(Me(Me.tablepo_header_backup.Fild1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Fild1' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.Fild1Column) = value End Set End Property _ Public Property Fild2() As String Get Try Return CType(Me(Me.tablepo_header_backup.Fild2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Fild2' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.Fild2Column) = value End Set End Property _ Public Property Fild3() As String Get Try Return CType(Me(Me.tablepo_header_backup.Fild3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Fild3' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.Fild3Column) = value End Set End Property _ Public Property Comments() As String Get Try Return CType(Me(Me.tablepo_header_backup.CommentsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Comments' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.CommentsColumn) = value End Set End Property _ Public Property DateCreated() As Date Get Try Return CType(Me(Me.tablepo_header_backup.DateCreatedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateCreated' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.DateCreatedColumn) = value End Set End Property _ Public Property TimeCreated() As String Get Try Return CType(Me(Me.tablepo_header_backup.TimeCreatedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'TimeCreated' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.TimeCreatedColumn) = value End Set End Property _ Public Property UserID() As String Get Try Return CType(Me(Me.tablepo_header_backup.UserIDColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UserID' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.UserIDColumn) = value End Set End Property _ Public Property DateLastChanged() As String Get Try Return CType(Me(Me.tablepo_header_backup.DateLastChangedColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateLastChanged' in table 'po_header_backup' is DBNull.", e) End Try End Get Set Me(Me.tablepo_header_backup.DateLastChangedColumn) = value End Set End Property _ Public Function IsCompanyNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.CompanyColumn) End Function _ Public Sub SetCompanyNull() Me(Me.tablepo_header_backup.CompanyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCodeTypeNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.CodeTypeColumn) End Function _ Public Sub SetCodeTypeNull() Me(Me.tablepo_header_backup.CodeTypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTypeHDNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.TypeHDColumn) End Function _ Public Sub SetTypeHDNull() Me(Me.tablepo_header_backup.TypeHDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsModeHDNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.ModeHDColumn) End Function _ Public Sub SetModeHDNull() Me(Me.tablepo_header_backup.ModeHDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPrefixNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.PrefixColumn) End Function _ Public Sub SetPrefixNull() Me(Me.tablepo_header_backup.PrefixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGenDateNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.GenDateColumn) End Function _ Public Sub SetGenDateNull() Me(Me.tablepo_header_backup.GenDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsGenHourNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.GenHourColumn) End Function _ Public Sub SetGenHourNull() Me(Me.tablepo_header_backup.GenHourColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPONumberNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.PONumberColumn) End Function _ Public Sub SetPONumberNull() Me(Me.tablepo_header_backup.PONumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSONumberNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.SONumberColumn) End Function _ Public Sub SetSONumberNull() Me(Me.tablepo_header_backup.SONumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPODateNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.PODateColumn) End Function _ Public Sub SetPODateNull() Me(Me.tablepo_header_backup.PODateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsRevisionNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.RevisionColumn) End Function _ Public Sub SetRevisionNull() Me(Me.tablepo_header_backup.RevisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsStatusNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.StatusColumn) End Function _ Public Sub SetStatusNull() Me(Me.tablepo_header_backup.StatusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPONull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.CustPOColumn) End Function _ Public Sub SetCustPONull() Me(Me.tablepo_header_backup.CustPOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsShipViaNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.ShipViaColumn) End Function _ Public Sub SetShipViaNull() Me(Me.tablepo_header_backup.ShipViaColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsShipToNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.ShipToColumn) End Function _ Public Sub SetShipToNull() Me(Me.tablepo_header_backup.ShipToColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSipAdd1Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.SipAdd1Column) End Function _ Public Sub SetSipAdd1Null() Me(Me.tablepo_header_backup.SipAdd1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsShipAdd2Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.ShipAdd2Column) End Function _ Public Sub SetShipAdd2Null() Me(Me.tablepo_header_backup.ShipAdd2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsShipAdd3Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.ShipAdd3Column) End Function _ Public Sub SetShipAdd3Null() Me(Me.tablepo_header_backup.ShipAdd3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsCityNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.CityColumn) End Function _ Public Sub SetCityNull() Me(Me.tablepo_header_backup.CityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsStateNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.StateColumn) End Function _ Public Sub SetStateNull() Me(Me.tablepo_header_backup.StateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPostalCodeNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.PostalCodeColumn) End Function _ Public Sub SetPostalCodeNull() Me(Me.tablepo_header_backup.PostalCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCountryCodeNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.CountryCodeColumn) End Function _ Public Sub SetCountryCodeNull() Me(Me.tablepo_header_backup.CountryCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag0Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.Flag0Column) End Function _ Public Sub SetFlag0Null() Me(Me.tablepo_header_backup.Flag0Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag1Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.Flag1Column) End Function _ Public Sub SetFlag1Null() Me(Me.tablepo_header_backup.Flag1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag2Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.Flag2Column) End Function _ Public Sub SetFlag2Null() Me(Me.tablepo_header_backup.Flag2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag3Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.Flag3Column) End Function _ Public Sub SetFlag3Null() Me(Me.tablepo_header_backup.Flag3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsRemarkNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.RemarkColumn) End Function _ Public Sub SetRemarkNull() Me(Me.tablepo_header_backup.RemarkColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFild1Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.Fild1Column) End Function _ Public Sub SetFild1Null() Me(Me.tablepo_header_backup.Fild1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFild2Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.Fild2Column) End Function _ Public Sub SetFild2Null() Me(Me.tablepo_header_backup.Fild2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsFild3Null() As Boolean Return Me.IsNull(Me.tablepo_header_backup.Fild3Column) End Function _ Public Sub SetFild3Null() Me(Me.tablepo_header_backup.Fild3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsCommentsNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.CommentsColumn) End Function _ Public Sub SetCommentsNull() Me(Me.tablepo_header_backup.CommentsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateCreatedNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.DateCreatedColumn) End Function _ Public Sub SetDateCreatedNull() Me(Me.tablepo_header_backup.DateCreatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsTimeCreatedNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.TimeCreatedColumn) End Function _ Public Sub SetTimeCreatedNull() Me(Me.tablepo_header_backup.TimeCreatedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUserIDNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.UserIDColumn) End Function _ Public Sub SetUserIDNull() Me(Me.tablepo_header_backup.UserIDColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateLastChangedNull() As Boolean Return Me.IsNull(Me.tablepo_header_backup.DateLastChangedColumn) End Function _ Public Sub SetDateLastChangedNull() Me(Me.tablepo_header_backup.DateLastChangedColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class po_history_detailRow Inherits Global.System.Data.DataRow Private tablepo_history_detail As po_history_detailDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepo_history_detail = CType(Me.Table,po_history_detailDataTable) End Sub _ Public Property poNumber() As String Get Try Return CType(Me(Me.tablepo_history_detail.poNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poNumber' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.poNumberColumn) = value End Set End Property _ Public Property revision() As String Get Try Return CType(Me(Me.tablepo_history_detail.revisionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'revision' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.revisionColumn) = value End Set End Property _ Public Property chg_type() As String Get Try Return CType(Me(Me.tablepo_history_detail.chg_typeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'chg_type' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.chg_typeColumn) = value End Set End Property _ Public Property poLine() As String Get Try Return CType(Me(Me.tablepo_history_detail.poLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.poLineColumn) = value End Set End Property _ Public Property change() As String Get Try Return CType(Me(Me.tablepo_history_detail.changeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'change' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.changeColumn) = value End Set End Property _ Public Property from_value() As String Get Try Return CType(Me(Me.tablepo_history_detail.from_valueColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'from_value' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.from_valueColumn) = value End Set End Property _ Public Property to_value() As String Get Try Return CType(Me(Me.tablepo_history_detail.to_valueColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'to_value' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.to_valueColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablepo_history_detail.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.lastupdateColumn) = value End Set End Property _ Public Property content() As String Get Try Return CType(Me(Me.tablepo_history_detail.contentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'content' in table 'po_history_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_history_detail.contentColumn) = value End Set End Property _ Public Function IspoNumberNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.poNumberColumn) End Function _ Public Sub SetpoNumberNull() Me(Me.tablepo_history_detail.poNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsrevisionNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.revisionColumn) End Function _ Public Sub SetrevisionNull() Me(Me.tablepo_history_detail.revisionColumn) = Global.System.Convert.DBNull End Sub _ Public Function Ischg_typeNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.chg_typeColumn) End Function _ Public Sub Setchg_typeNull() Me(Me.tablepo_history_detail.chg_typeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tablepo_history_detail.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IschangeNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.changeColumn) End Function _ Public Sub SetchangeNull() Me(Me.tablepo_history_detail.changeColumn) = Global.System.Convert.DBNull End Sub _ Public Function Isfrom_valueNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.from_valueColumn) End Function _ Public Sub Setfrom_valueNull() Me(Me.tablepo_history_detail.from_valueColumn) = Global.System.Convert.DBNull End Sub _ Public Function Isto_valueNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.to_valueColumn) End Function _ Public Sub Setto_valueNull() Me(Me.tablepo_history_detail.to_valueColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablepo_history_detail.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscontentNull() As Boolean Return Me.IsNull(Me.tablepo_history_detail.contentColumn) End Function _ Public Sub SetcontentNull() Me(Me.tablepo_history_detail.contentColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class po_orig_detailRow Inherits Global.System.Data.DataRow Private tablepo_orig_detail As po_orig_detailDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepo_orig_detail = CType(Me.Table,po_orig_detailDataTable) End Sub _ Public Property poNumber() As String Get Try Return CType(Me(Me.tablepo_orig_detail.poNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poNumber' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.poNumberColumn) = value End Set End Property _ Public Property poLine() As String Get Try Return CType(Me(Me.tablepo_orig_detail.poLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.poLineColumn) = value End Set End Property _ Public Property soLine() As String Get Try Return CType(Me(Me.tablepo_orig_detail.soLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'soLine' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.soLineColumn) = value End Set End Property _ Public Property targetDate() As Date Get Try Return CType(Me(Me.tablepo_orig_detail.targetDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'targetDate' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.targetDateColumn) = value End Set End Property _ Public Property lineComments() As String Get Try Return CType(Me(Me.tablepo_orig_detail.lineCommentsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lineComments' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.lineCommentsColumn) = value End Set End Property _ Public Property custPartNumber() As String Get Try Return CType(Me(Me.tablepo_orig_detail.custPartNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custPartNumber' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.custPartNumberColumn) = value End Set End Property _ Public Property quantity() As Integer Get Try Return CType(Me(Me.tablepo_orig_detail.quantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'quantity' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.quantityColumn) = value End Set End Property _ Public Property unitPrice() As Integer Get Try Return CType(Me(Me.tablepo_orig_detail.unitPriceColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'unitPrice' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.unitPriceColumn) = value End Set End Property _ Public Property custPartNo() As String Get Try Return CType(Me(Me.tablepo_orig_detail.custPartNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custPartNo' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.custPartNoColumn) = value End Set End Property _ Public Property dueDate() As Date Get Try Return CType(Me(Me.tablepo_orig_detail.dueDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dueDate' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.dueDateColumn) = value End Set End Property _ Public Property custPart() As String Get Try Return CType(Me(Me.tablepo_orig_detail.custPartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custPart' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.custPartColumn) = value End Set End Property _ Public Property custPartGif() As String Get Try Return CType(Me(Me.tablepo_orig_detail.custPartGifColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custPartGif' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.custPartGifColumn) = value End Set End Property _ Public Property custPartDesc() As String Get Try Return CType(Me(Me.tablepo_orig_detail.custPartDescColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custPartDesc' in table 'po_orig_detail' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_detail.custPartDescColumn) = value End Set End Property _ Public Function IspoNumberNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.poNumberColumn) End Function _ Public Sub SetpoNumberNull() Me(Me.tablepo_orig_detail.poNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tablepo_orig_detail.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssoLineNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.soLineColumn) End Function _ Public Sub SetsoLineNull() Me(Me.tablepo_orig_detail.soLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IstargetDateNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.targetDateColumn) End Function _ Public Sub SettargetDateNull() Me(Me.tablepo_orig_detail.targetDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslineCommentsNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.lineCommentsColumn) End Function _ Public Sub SetlineCommentsNull() Me(Me.tablepo_orig_detail.lineCommentsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustPartNumberNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.custPartNumberColumn) End Function _ Public Sub SetcustPartNumberNull() Me(Me.tablepo_orig_detail.custPartNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsquantityNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.quantityColumn) End Function _ Public Sub SetquantityNull() Me(Me.tablepo_orig_detail.quantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsunitPriceNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.unitPriceColumn) End Function _ Public Sub SetunitPriceNull() Me(Me.tablepo_orig_detail.unitPriceColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustPartNoNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.custPartNoColumn) End Function _ Public Sub SetcustPartNoNull() Me(Me.tablepo_orig_detail.custPartNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdueDateNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.dueDateColumn) End Function _ Public Sub SetdueDateNull() Me(Me.tablepo_orig_detail.dueDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustPartNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.custPartColumn) End Function _ Public Sub SetcustPartNull() Me(Me.tablepo_orig_detail.custPartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustPartGifNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.custPartGifColumn) End Function _ Public Sub SetcustPartGifNull() Me(Me.tablepo_orig_detail.custPartGifColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustPartDescNull() As Boolean Return Me.IsNull(Me.tablepo_orig_detail.custPartDescColumn) End Function _ Public Sub SetcustPartDescNull() Me(Me.tablepo_orig_detail.custPartDescColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class po_orig_headerRow Inherits Global.System.Data.DataRow Private tablepo_orig_header As po_orig_headerDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablepo_orig_header = CType(Me.Table,po_orig_headerDataTable) End Sub _ Public Property poNumber() As String Get Try Return CType(Me(Me.tablepo_orig_header.poNumberColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poNumber' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.poNumberColumn) = value End Set End Property _ Public Property poDate() As Date Get Try Return CType(Me(Me.tablepo_orig_header.poDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poDate' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.poDateColumn) = value End Set End Property _ Public Property poRev() As String Get Try Return CType(Me(Me.tablepo_orig_header.poRevColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poRev' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.poRevColumn) = value End Set End Property _ Public Property comments() As String Get Try Return CType(Me(Me.tablepo_orig_header.commentsColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'comments' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.commentsColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablepo_orig_header.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.statusColumn) = value End Set End Property _ Public Property custPo() As String Get Try Return CType(Me(Me.tablepo_orig_header.custPoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custPo' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.custPoColumn) = value End Set End Property _ Public Property alvSo() As String Get Try Return CType(Me(Me.tablepo_orig_header.alvSoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'alvSo' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.alvSoColumn) = value End Set End Property _ Public Property shipVia() As String Get Try Return CType(Me(Me.tablepo_orig_header.shipViaColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipVia' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.shipViaColumn) = value End Set End Property _ Public Property shipTo() As String Get Try Return CType(Me(Me.tablepo_orig_header.shipToColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipTo' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.shipToColumn) = value End Set End Property _ Public Property shipAdd1() As String Get Try Return CType(Me(Me.tablepo_orig_header.shipAdd1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd1' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.shipAdd1Column) = value End Set End Property _ Public Property shipAdd2() As String Get Try Return CType(Me(Me.tablepo_orig_header.shipAdd2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd2' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.shipAdd2Column) = value End Set End Property _ Public Property shipAdd3() As String Get Try Return CType(Me(Me.tablepo_orig_header.shipAdd3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd3' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.shipAdd3Column) = value End Set End Property _ Public Property shipToNum() As String Get Try Return CType(Me(Me.tablepo_orig_header.shipToNumColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipToNum' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.shipToNumColumn) = value End Set End Property _ Public Property city() As String Get Try Return CType(Me(Me.tablepo_orig_header.cityColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'city' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.cityColumn) = value End Set End Property _ Public Property state() As String Get Try Return CType(Me(Me.tablepo_orig_header.stateColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'state' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.stateColumn) = value End Set End Property _ Public Property postalCode() As String Get Try Return CType(Me(Me.tablepo_orig_header.postalCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'postalCode' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.postalCodeColumn) = value End Set End Property _ Public Property countryCode() As String Get Try Return CType(Me(Me.tablepo_orig_header.countryCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'countryCode' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.countryCodeColumn) = value End Set End Property _ Public Property insertDate() As Date Get Try Return CType(Me(Me.tablepo_orig_header.insertDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'insertDate' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.insertDateColumn) = value End Set End Property _ Public Property content() As String Get Try Return CType(Me(Me.tablepo_orig_header.contentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'content' in table 'po_orig_header' is DBNull.", e) End Try End Get Set Me(Me.tablepo_orig_header.contentColumn) = value End Set End Property _ Public Function IspoNumberNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.poNumberColumn) End Function _ Public Sub SetpoNumberNull() Me(Me.tablepo_orig_header.poNumberColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoDateNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.poDateColumn) End Function _ Public Sub SetpoDateNull() Me(Me.tablepo_orig_header.poDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoRevNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.poRevColumn) End Function _ Public Sub SetpoRevNull() Me(Me.tablepo_orig_header.poRevColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscommentsNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.commentsColumn) End Function _ Public Sub SetcommentsNull() Me(Me.tablepo_orig_header.commentsColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablepo_orig_header.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustPoNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.custPoColumn) End Function _ Public Sub SetcustPoNull() Me(Me.tablepo_orig_header.custPoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsalvSoNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.alvSoColumn) End Function _ Public Sub SetalvSoNull() Me(Me.tablepo_orig_header.alvSoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipViaNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.shipViaColumn) End Function _ Public Sub SetshipViaNull() Me(Me.tablepo_orig_header.shipViaColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipToNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.shipToColumn) End Function _ Public Sub SetshipToNull() Me(Me.tablepo_orig_header.shipToColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd1Null() As Boolean Return Me.IsNull(Me.tablepo_orig_header.shipAdd1Column) End Function _ Public Sub SetshipAdd1Null() Me(Me.tablepo_orig_header.shipAdd1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd2Null() As Boolean Return Me.IsNull(Me.tablepo_orig_header.shipAdd2Column) End Function _ Public Sub SetshipAdd2Null() Me(Me.tablepo_orig_header.shipAdd2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd3Null() As Boolean Return Me.IsNull(Me.tablepo_orig_header.shipAdd3Column) End Function _ Public Sub SetshipAdd3Null() Me(Me.tablepo_orig_header.shipAdd3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipToNumNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.shipToNumColumn) End Function _ Public Sub SetshipToNumNull() Me(Me.tablepo_orig_header.shipToNumColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscityNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.cityColumn) End Function _ Public Sub SetcityNull() Me(Me.tablepo_orig_header.cityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstateNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.stateColumn) End Function _ Public Sub SetstateNull() Me(Me.tablepo_orig_header.stateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspostalCodeNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.postalCodeColumn) End Function _ Public Sub SetpostalCodeNull() Me(Me.tablepo_orig_header.postalCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscountryCodeNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.countryCodeColumn) End Function _ Public Sub SetcountryCodeNull() Me(Me.tablepo_orig_header.countryCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsinsertDateNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.insertDateColumn) End Function _ Public Sub SetinsertDateNull() Me(Me.tablepo_orig_header.insertDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscontentNull() As Boolean Return Me.IsNull(Me.tablepo_orig_header.contentColumn) End Function _ Public Sub SetcontentNull() Me(Me.tablepo_orig_header.contentColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class printerRow Inherits Global.System.Data.DataRow Private tableprinter As printerDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableprinter = CType(Me.Table,printerDataTable) End Sub _ Public Property printerName() As String Get Try Return CType(Me(Me.tableprinter.printerNameColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'printerName' in table 'printer' is DBNull.", e) End Try End Get Set Me(Me.tableprinter.printerNameColumn) = value End Set End Property _ Public Function IsprinterNameNull() As Boolean Return Me.IsNull(Me.tableprinter.printerNameColumn) End Function _ Public Sub SetprinterNameNull() Me(Me.tableprinter.printerNameColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class ptRow Inherits Global.System.Data.DataRow Private tablept As ptDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablept = CType(Me.Table,ptDataTable) End Sub _ Public Property ptID() As Integer Get Return CType(Me(Me.tablept.ptIDColumn),Integer) End Get Set Me(Me.tablept.ptIDColumn) = value End Set End Property _ Public Property batchNo() As String Get Try Return CType(Me(Me.tablept.batchNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'batchNo' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.batchNoColumn) = value End Set End Property _ Public Property ptNo() As String Get Try Return CType(Me(Me.tablept.ptNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptNo' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.ptNoColumn) = value End Set End Property _ Public Property partNo() As String Get Try Return CType(Me(Me.tablept.partNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partNo' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.partNoColumn) = value End Set End Property _ Public Property curtstage() As String Get Try Return CType(Me(Me.tablept.curtstageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'curtstage' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.curtstageColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablept.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.statusColumn) = value End Set End Property _ Public Property ptParent() As String Get Try Return CType(Me(Me.tablept.ptParentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptParent' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.ptParentColumn) = value End Set End Property _ Public Property ptStart() As String Get Try Return CType(Me(Me.tablept.ptStartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptStart' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.ptStartColumn) = value End Set End Property _ Public Property prefix() As String Get Try Return CType(Me(Me.tablept.prefixColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'prefix' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.prefixColumn) = value End Set End Property _ Public Property suffix() As Integer Get Try Return CType(Me(Me.tablept.suffixColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'suffix' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.suffixColumn) = value End Set End Property _ Public Property origQuantity() As Integer Get Try Return CType(Me(Me.tablept.origQuantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'origQuantity' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.origQuantityColumn) = value End Set End Property _ Public Property currQuantity() As Integer Get Try Return CType(Me(Me.tablept.currQuantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'currQuantity' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.currQuantityColumn) = value End Set End Property _ Public Property startTime() As Date Get Try Return CType(Me(Me.tablept.startTimeColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'startTime' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.startTimeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablept.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablept.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'pt' is DBNull.", e) End Try End Get Set Me(Me.tablept.lastupdatedbyColumn) = value End Set End Property _ Public Function IsbatchNoNull() As Boolean Return Me.IsNull(Me.tablept.batchNoColumn) End Function _ Public Sub SetbatchNoNull() Me(Me.tablept.batchNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptNoNull() As Boolean Return Me.IsNull(Me.tablept.ptNoColumn) End Function _ Public Sub SetptNoNull() Me(Me.tablept.ptNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartNoNull() As Boolean Return Me.IsNull(Me.tablept.partNoColumn) End Function _ Public Sub SetpartNoNull() Me(Me.tablept.partNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscurtstageNull() As Boolean Return Me.IsNull(Me.tablept.curtstageColumn) End Function _ Public Sub SetcurtstageNull() Me(Me.tablept.curtstageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablept.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablept.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptParentNull() As Boolean Return Me.IsNull(Me.tablept.ptParentColumn) End Function _ Public Sub SetptParentNull() Me(Me.tablept.ptParentColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptStartNull() As Boolean Return Me.IsNull(Me.tablept.ptStartColumn) End Function _ Public Sub SetptStartNull() Me(Me.tablept.ptStartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsprefixNull() As Boolean Return Me.IsNull(Me.tablept.prefixColumn) End Function _ Public Sub SetprefixNull() Me(Me.tablept.prefixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssuffixNull() As Boolean Return Me.IsNull(Me.tablept.suffixColumn) End Function _ Public Sub SetsuffixNull() Me(Me.tablept.suffixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsorigQuantityNull() As Boolean Return Me.IsNull(Me.tablept.origQuantityColumn) End Function _ Public Sub SetorigQuantityNull() Me(Me.tablept.origQuantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscurrQuantityNull() As Boolean Return Me.IsNull(Me.tablept.currQuantityColumn) End Function _ Public Sub SetcurrQuantityNull() Me(Me.tablept.currQuantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstartTimeNull() As Boolean Return Me.IsNull(Me.tablept.startTimeColumn) End Function _ Public Sub SetstartTimeNull() Me(Me.tablept.startTimeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablept.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablept.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablept.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablept.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class pt_HistRow Inherits Global.System.Data.DataRow Private tablept_Hist As pt_HistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablept_Hist = CType(Me.Table,pt_HistDataTable) End Sub _ Public Property ptID() As Integer Get Return CType(Me(Me.tablept_Hist.ptIDColumn),Integer) End Get Set Me(Me.tablept_Hist.ptIDColumn) = value End Set End Property _ Public Property batchNo() As String Get Try Return CType(Me(Me.tablept_Hist.batchNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'batchNo' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.batchNoColumn) = value End Set End Property _ Public Property ptNo() As String Get Try Return CType(Me(Me.tablept_Hist.ptNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptNo' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.ptNoColumn) = value End Set End Property _ Public Property partNo() As String Get Try Return CType(Me(Me.tablept_Hist.partNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partNo' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.partNoColumn) = value End Set End Property _ Public Property curtstage() As String Get Try Return CType(Me(Me.tablept_Hist.curtstageColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'curtstage' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.curtstageColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablept_Hist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.statusColumn) = value End Set End Property _ Public Property ptParent() As String Get Try Return CType(Me(Me.tablept_Hist.ptParentColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptParent' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.ptParentColumn) = value End Set End Property _ Public Property ptStart() As String Get Try Return CType(Me(Me.tablept_Hist.ptStartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ptStart' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.ptStartColumn) = value End Set End Property _ Public Property prefix() As String Get Try Return CType(Me(Me.tablept_Hist.prefixColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'prefix' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.prefixColumn) = value End Set End Property _ Public Property suffix() As Integer Get Try Return CType(Me(Me.tablept_Hist.suffixColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'suffix' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.suffixColumn) = value End Set End Property _ Public Property origQuantity() As Integer Get Try Return CType(Me(Me.tablept_Hist.origQuantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'origQuantity' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.origQuantityColumn) = value End Set End Property _ Public Property currQuantity() As Integer Get Try Return CType(Me(Me.tablept_Hist.currQuantityColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'currQuantity' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.currQuantityColumn) = value End Set End Property _ Public Property startTime() As Date Get Try Return CType(Me(Me.tablept_Hist.startTimeColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'startTime' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.startTimeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablept_Hist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablept_Hist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'pt_Hist' is DBNull.", e) End Try End Get Set Me(Me.tablept_Hist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsbatchNoNull() As Boolean Return Me.IsNull(Me.tablept_Hist.batchNoColumn) End Function _ Public Sub SetbatchNoNull() Me(Me.tablept_Hist.batchNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptNoNull() As Boolean Return Me.IsNull(Me.tablept_Hist.ptNoColumn) End Function _ Public Sub SetptNoNull() Me(Me.tablept_Hist.ptNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartNoNull() As Boolean Return Me.IsNull(Me.tablept_Hist.partNoColumn) End Function _ Public Sub SetpartNoNull() Me(Me.tablept_Hist.partNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscurtstageNull() As Boolean Return Me.IsNull(Me.tablept_Hist.curtstageColumn) End Function _ Public Sub SetcurtstageNull() Me(Me.tablept_Hist.curtstageColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablept_Hist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablept_Hist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptParentNull() As Boolean Return Me.IsNull(Me.tablept_Hist.ptParentColumn) End Function _ Public Sub SetptParentNull() Me(Me.tablept_Hist.ptParentColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsptStartNull() As Boolean Return Me.IsNull(Me.tablept_Hist.ptStartColumn) End Function _ Public Sub SetptStartNull() Me(Me.tablept_Hist.ptStartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsprefixNull() As Boolean Return Me.IsNull(Me.tablept_Hist.prefixColumn) End Function _ Public Sub SetprefixNull() Me(Me.tablept_Hist.prefixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssuffixNull() As Boolean Return Me.IsNull(Me.tablept_Hist.suffixColumn) End Function _ Public Sub SetsuffixNull() Me(Me.tablept_Hist.suffixColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsorigQuantityNull() As Boolean Return Me.IsNull(Me.tablept_Hist.origQuantityColumn) End Function _ Public Sub SetorigQuantityNull() Me(Me.tablept_Hist.origQuantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscurrQuantityNull() As Boolean Return Me.IsNull(Me.tablept_Hist.currQuantityColumn) End Function _ Public Sub SetcurrQuantityNull() Me(Me.tablept_Hist.currQuantityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstartTimeNull() As Boolean Return Me.IsNull(Me.tablept_Hist.startTimeColumn) End Function _ Public Sub SetstartTimeNull() Me(Me.tablept_Hist.startTimeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablept_Hist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablept_Hist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablept_Hist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablept_Hist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class serialAlvarisetRow Inherits Global.System.Data.DataRow Private tableserialAlvariset As serialAlvarisetDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableserialAlvariset = CType(Me.Table,serialAlvarisetDataTable) End Sub _ Public Property cardno() As String Get Return CType(Me(Me.tableserialAlvariset.cardnoColumn),String) End Get Set Me(Me.tableserialAlvariset.cardnoColumn) = value End Set End Property _ Public Property mpPartno() As String Get Try Return CType(Me(Me.tableserialAlvariset.mpPartnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'mpPartno' in table 'serialAlvariset' is DBNull.", e) End Try End Get Set Me(Me.tableserialAlvariset.mpPartnoColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tableserialAlvariset.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'serialAlvariset' is DBNull.", e) End Try End Get Set Me(Me.tableserialAlvariset.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tableserialAlvariset.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'serialAlvariset' is DBNull.", e) End Try End Get Set Me(Me.tableserialAlvariset.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmpPartnoNull() As Boolean Return Me.IsNull(Me.tableserialAlvariset.mpPartnoColumn) End Function _ Public Sub SetmpPartnoNull() Me(Me.tableserialAlvariset.mpPartnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tableserialAlvariset.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tableserialAlvariset.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tableserialAlvariset.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tableserialAlvariset.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class serialMacRow Inherits Global.System.Data.DataRow Private tableserialMac As serialMacDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableserialMac = CType(Me.Table,serialMacDataTable) End Sub _ Public Property cardno() As String Get Return CType(Me(Me.tableserialMac.cardnoColumn),String) End Get Set Me(Me.tableserialMac.cardnoColumn) = value End Set End Property _ Public Property macaddress() As String Get Try Return CType(Me(Me.tableserialMac.macaddressColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'macaddress' in table 'serialMac' is DBNull.", e) End Try End Get Set Me(Me.tableserialMac.macaddressColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tableserialMac.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'serialMac' is DBNull.", e) End Try End Get Set Me(Me.tableserialMac.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tableserialMac.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'serialMac' is DBNull.", e) End Try End Get Set Me(Me.tableserialMac.lastupdatedbyColumn) = value End Set End Property _ Public Function IsmacaddressNull() As Boolean Return Me.IsNull(Me.tableserialMac.macaddressColumn) End Function _ Public Sub SetmacaddressNull() Me(Me.tableserialMac.macaddressColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tableserialMac.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tableserialMac.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tableserialMac.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tableserialMac.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class SHIPPER_REPORT_TABLERow Inherits Global.System.Data.DataRow Private tableSHIPPER_REPORT_TABLE As SHIPPER_REPORT_TABLEDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableSHIPPER_REPORT_TABLE = CType(Me.Table,SHIPPER_REPORT_TABLEDataTable) End Sub _ Public Property cnNo() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.cnNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cnNo' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.cnNoColumn) = value End Set End Property _ Public Property shipno() As String Get Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.shipnoColumn),String) End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.shipnoColumn) = value End Set End Property _ Public Property shipDate() As Date Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.shipDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipDate' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.shipDateColumn) = value End Set End Property _ Public Property shipto() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.shiptoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipto' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.shiptoColumn) = value End Set End Property _ Public Property sipAdd1() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.sipAdd1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'sipAdd1' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.sipAdd1Column) = value End Set End Property _ Public Property shipAdd2() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.shipAdd2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd2' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.shipAdd2Column) = value End Set End Property _ Public Property shipAdd3() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.shipAdd3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd3' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.shipAdd3Column) = value End Set End Property _ Public Property ZIP() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.ZIPColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ZIP' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.ZIPColumn) = value End Set End Property _ Public Property countryCode() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.countryCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'countryCode' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.countryCodeColumn) = value End Set End Property _ Public Property Phone() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.PhoneColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Phone' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.PhoneColumn) = value End Set End Property _ Public Property shipVia() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.shipViaColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipVia' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.shipViaColumn) = value End Set End Property _ Public Property POLine() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.POLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'POLine' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.POLineColumn) = value End Set End Property _ Public Property modelDesc1() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.modelDesc1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc1' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.modelDesc1Column) = value End Set End Property _ Public Property CustPO() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.CustPOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPO' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.CustPOColumn) = value End Set End Property _ Public Property AlvSO() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.AlvSOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'AlvSO' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.AlvSOColumn) = value End Set End Property _ Public Property AlvSOLine() As Decimal Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.AlvSOLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'AlvSOLine' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.AlvSOLineColumn) = value End Set End Property _ Public Property Flag3() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.Flag3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag3' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.Flag3Column) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.modelColumn) = value End Set End Property _ Public Property custPart() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.custPartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'custPart' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.custPartColumn) = value End Set End Property _ Public Property SNQty() As Integer Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.SNQtyColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SNQty' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.SNQtyColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.serialnoColumn) = value End Set End Property _ Public Property layer() As Single Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.layerColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layer' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.layerColumn) = value End Set End Property _ Public Property dimension() As String Get Try Return CType(Me(Me.tableSHIPPER_REPORT_TABLE.dimensionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimension' in table 'SHIPPER_REPORT_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_REPORT_TABLE.dimensionColumn) = value End Set End Property _ Public Function IscnNoNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.cnNoColumn) End Function _ Public Sub SetcnNoNull() Me(Me.tableSHIPPER_REPORT_TABLE.cnNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipDateNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.shipDateColumn) End Function _ Public Sub SetshipDateNull() Me(Me.tableSHIPPER_REPORT_TABLE.shipDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshiptoNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.shiptoColumn) End Function _ Public Sub SetshiptoNull() Me(Me.tableSHIPPER_REPORT_TABLE.shiptoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssipAdd1Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.sipAdd1Column) End Function _ Public Sub SetsipAdd1Null() Me(Me.tableSHIPPER_REPORT_TABLE.sipAdd1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd2Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.shipAdd2Column) End Function _ Public Sub SetshipAdd2Null() Me(Me.tableSHIPPER_REPORT_TABLE.shipAdd2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd3Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.shipAdd3Column) End Function _ Public Sub SetshipAdd3Null() Me(Me.tableSHIPPER_REPORT_TABLE.shipAdd3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsZIPNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.ZIPColumn) End Function _ Public Sub SetZIPNull() Me(Me.tableSHIPPER_REPORT_TABLE.ZIPColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscountryCodeNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.countryCodeColumn) End Function _ Public Sub SetcountryCodeNull() Me(Me.tableSHIPPER_REPORT_TABLE.countryCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPhoneNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.PhoneColumn) End Function _ Public Sub SetPhoneNull() Me(Me.tableSHIPPER_REPORT_TABLE.PhoneColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipViaNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.shipViaColumn) End Function _ Public Sub SetshipViaNull() Me(Me.tableSHIPPER_REPORT_TABLE.shipViaColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPOLineNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.POLineColumn) End Function _ Public Sub SetPOLineNull() Me(Me.tableSHIPPER_REPORT_TABLE.POLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelDesc1Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.modelDesc1Column) End Function _ Public Sub SetmodelDesc1Null() Me(Me.tableSHIPPER_REPORT_TABLE.modelDesc1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPONull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.CustPOColumn) End Function _ Public Sub SetCustPONull() Me(Me.tableSHIPPER_REPORT_TABLE.CustPOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsAlvSONull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.AlvSOColumn) End Function _ Public Sub SetAlvSONull() Me(Me.tableSHIPPER_REPORT_TABLE.AlvSOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsAlvSOLineNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.AlvSOLineColumn) End Function _ Public Sub SetAlvSOLineNull() Me(Me.tableSHIPPER_REPORT_TABLE.AlvSOLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag3Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.Flag3Column) End Function _ Public Sub SetFlag3Null() Me(Me.tableSHIPPER_REPORT_TABLE.Flag3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tableSHIPPER_REPORT_TABLE.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscustPartNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.custPartColumn) End Function _ Public Sub SetcustPartNull() Me(Me.tableSHIPPER_REPORT_TABLE.custPartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSNQtyNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.SNQtyColumn) End Function _ Public Sub SetSNQtyNull() Me(Me.tableSHIPPER_REPORT_TABLE.SNQtyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tableSHIPPER_REPORT_TABLE.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslayerNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.layerColumn) End Function _ Public Sub SetlayerNull() Me(Me.tableSHIPPER_REPORT_TABLE.layerColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimensionNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_REPORT_TABLE.dimensionColumn) End Function _ Public Sub SetdimensionNull() Me(Me.tableSHIPPER_REPORT_TABLE.dimensionColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class SHIPPER_STATUSRow Inherits Global.System.Data.DataRow Private tableSHIPPER_STATUS As SHIPPER_STATUSDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableSHIPPER_STATUS = CType(Me.Table,SHIPPER_STATUSDataTable) End Sub _ Public Property Shipno() As String Get Try Return CType(Me(Me.tableSHIPPER_STATUS.ShipnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Shipno' in table 'SHIPPER_STATUS' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_STATUS.ShipnoColumn) = value End Set End Property _ Public Property Process() As String Get Try Return CType(Me(Me.tableSHIPPER_STATUS.ProcessColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Process' in table 'SHIPPER_STATUS' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_STATUS.ProcessColumn) = value End Set End Property _ Public Property Result() As String Get Try Return CType(Me(Me.tableSHIPPER_STATUS.ResultColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Result' in table 'SHIPPER_STATUS' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_STATUS.ResultColumn) = value End Set End Property _ Public Property Remarks() As String Get Try Return CType(Me(Me.tableSHIPPER_STATUS.RemarksColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Remarks' in table 'SHIPPER_STATUS' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_STATUS.RemarksColumn) = value End Set End Property _ Public Property UPDTime() As Date Get Try Return CType(Me(Me.tableSHIPPER_STATUS.UPDTimeColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'UPDTime' in table 'SHIPPER_STATUS' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_STATUS.UPDTimeColumn) = value End Set End Property _ Public Function IsShipnoNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_STATUS.ShipnoColumn) End Function _ Public Sub SetShipnoNull() Me(Me.tableSHIPPER_STATUS.ShipnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsProcessNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_STATUS.ProcessColumn) End Function _ Public Sub SetProcessNull() Me(Me.tableSHIPPER_STATUS.ProcessColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsResultNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_STATUS.ResultColumn) End Function _ Public Sub SetResultNull() Me(Me.tableSHIPPER_STATUS.ResultColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsRemarksNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_STATUS.RemarksColumn) End Function _ Public Sub SetRemarksNull() Me(Me.tableSHIPPER_STATUS.RemarksColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsUPDTimeNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_STATUS.UPDTimeColumn) End Function _ Public Sub SetUPDTimeNull() Me(Me.tableSHIPPER_STATUS.UPDTimeColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class SHIPPER_SUMMARY_TABLERow Inherits Global.System.Data.DataRow Private tableSHIPPER_SUMMARY_TABLE As SHIPPER_SUMMARY_TABLEDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableSHIPPER_SUMMARY_TABLE = CType(Me.Table,SHIPPER_SUMMARY_TABLEDataTable) End Sub _ Public Property cnNo() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.cnNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cnNo' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.cnNoColumn) = value End Set End Property _ Public Property shipno() As String Get Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.shipnoColumn),String) End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.shipnoColumn) = value End Set End Property _ Public Property shipDate() As Date Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.shipDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipDate' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.shipDateColumn) = value End Set End Property _ Public Property shipto() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.shiptoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipto' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.shiptoColumn) = value End Set End Property _ Public Property sipAdd1() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.sipAdd1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'sipAdd1' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.sipAdd1Column) = value End Set End Property _ Public Property shipAdd2() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.shipAdd2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd2' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.shipAdd2Column) = value End Set End Property _ Public Property shipAdd3() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.shipAdd3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd3' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.shipAdd3Column) = value End Set End Property _ Public Property ZIP() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.ZIPColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ZIP' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.ZIPColumn) = value End Set End Property _ Public Property countryCode() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.countryCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'countryCode' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.countryCodeColumn) = value End Set End Property _ Public Property Phone() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.PhoneColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Phone' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.PhoneColumn) = value End Set End Property _ Public Property shipVia() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.shipViaColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipVia' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.shipViaColumn) = value End Set End Property _ Public Property POLine() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.POLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'POLine' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.POLineColumn) = value End Set End Property _ Public Property modelDesc1() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.modelDesc1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc1' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.modelDesc1Column) = value End Set End Property _ Public Property CustPO() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.CustPOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPO' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.CustPOColumn) = value End Set End Property _ Public Property AlvSO() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.AlvSOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'AlvSO' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.AlvSOColumn) = value End Set End Property _ Public Property AlvSOLine() As Decimal Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.AlvSOLineColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'AlvSOLine' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.AlvSOLineColumn) = value End Set End Property _ Public Property Flag3() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.Flag3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag3' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.Flag3Column) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.modelColumn) = value End Set End Property _ Public Property CustPart() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.CustPartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPart' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.CustPartColumn) = value End Set End Property _ Public Property SNQty() As Integer Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.SNQtyColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'SNQty' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.SNQtyColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.serialnoColumn) = value End Set End Property _ Public Property layer() As Single Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.layerColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layer' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.layerColumn) = value End Set End Property _ Public Property dimension() As String Get Try Return CType(Me(Me.tableSHIPPER_SUMMARY_TABLE.dimensionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimension' in table 'SHIPPER_SUMMARY_TABLE' is DBNull.", e) End Try End Get Set Me(Me.tableSHIPPER_SUMMARY_TABLE.dimensionColumn) = value End Set End Property _ Public Function IscnNoNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.cnNoColumn) End Function _ Public Sub SetcnNoNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.cnNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipDateNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.shipDateColumn) End Function _ Public Sub SetshipDateNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.shipDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshiptoNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.shiptoColumn) End Function _ Public Sub SetshiptoNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.shiptoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssipAdd1Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.sipAdd1Column) End Function _ Public Sub SetsipAdd1Null() Me(Me.tableSHIPPER_SUMMARY_TABLE.sipAdd1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd2Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.shipAdd2Column) End Function _ Public Sub SetshipAdd2Null() Me(Me.tableSHIPPER_SUMMARY_TABLE.shipAdd2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd3Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.shipAdd3Column) End Function _ Public Sub SetshipAdd3Null() Me(Me.tableSHIPPER_SUMMARY_TABLE.shipAdd3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsZIPNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.ZIPColumn) End Function _ Public Sub SetZIPNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.ZIPColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscountryCodeNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.countryCodeColumn) End Function _ Public Sub SetcountryCodeNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.countryCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPhoneNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.PhoneColumn) End Function _ Public Sub SetPhoneNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.PhoneColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipViaNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.shipViaColumn) End Function _ Public Sub SetshipViaNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.shipViaColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPOLineNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.POLineColumn) End Function _ Public Sub SetPOLineNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.POLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelDesc1Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.modelDesc1Column) End Function _ Public Sub SetmodelDesc1Null() Me(Me.tableSHIPPER_SUMMARY_TABLE.modelDesc1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPONull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.CustPOColumn) End Function _ Public Sub SetCustPONull() Me(Me.tableSHIPPER_SUMMARY_TABLE.CustPOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsAlvSONull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.AlvSOColumn) End Function _ Public Sub SetAlvSONull() Me(Me.tableSHIPPER_SUMMARY_TABLE.AlvSOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsAlvSOLineNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.AlvSOLineColumn) End Function _ Public Sub SetAlvSOLineNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.AlvSOLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag3Null() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.Flag3Column) End Function _ Public Sub SetFlag3Null() Me(Me.tableSHIPPER_SUMMARY_TABLE.Flag3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.CustPartColumn) End Function _ Public Sub SetCustPartNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.CustPartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsSNQtyNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.SNQtyColumn) End Function _ Public Sub SetSNQtyNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.SNQtyColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslayerNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.layerColumn) End Function _ Public Sub SetlayerNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.layerColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimensionNull() As Boolean Return Me.IsNull(Me.tableSHIPPER_SUMMARY_TABLE.dimensionColumn) End Function _ Public Sub SetdimensionNull() Me(Me.tableSHIPPER_SUMMARY_TABLE.dimensionColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class stationRow Inherits Global.System.Data.DataRow Private tablestation As stationDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablestation = CType(Me.Table,stationDataTable) End Sub _ Public Property station() As String Get Return CType(Me(Me.tablestation.stationColumn),String) End Get Set Me(Me.tablestation.stationColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tablestation.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'station' is DBNull.", e) End Try End Get Set Me(Me.tablestation.descriptionColumn) = value End Set End Property _ Public Property sequence() As Integer Get Try Return CType(Me(Me.tablestation.sequenceColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'sequence' in table 'station' is DBNull.", e) End Try End Get Set Me(Me.tablestation.sequenceColumn) = value End Set End Property _ Public Property stype() As String Get Try Return CType(Me(Me.tablestation.stypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stype' in table 'station' is DBNull.", e) End Try End Get Set Me(Me.tablestation.stypeColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablestation.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'station' is DBNull.", e) End Try End Get Set Me(Me.tablestation.activeColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablestation.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'station' is DBNull.", e) End Try End Get Set Me(Me.tablestation.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablestation.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'station' is DBNull.", e) End Try End Get Set Me(Me.tablestation.lastupdatedbyColumn) = value End Set End Property _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tablestation.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tablestation.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssequenceNull() As Boolean Return Me.IsNull(Me.tablestation.sequenceColumn) End Function _ Public Sub SetsequenceNull() Me(Me.tablestation.sequenceColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstypeNull() As Boolean Return Me.IsNull(Me.tablestation.stypeColumn) End Function _ Public Sub SetstypeNull() Me(Me.tablestation.stypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablestation.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablestation.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablestation.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablestation.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablestation.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablestation.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class station_convertRow Inherits Global.System.Data.DataRow Private tablestation_convert As station_convertDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablestation_convert = CType(Me.Table,station_convertDataTable) End Sub _ Public Property ioStation() As String Get Try Return CType(Me(Me.tablestation_convert.ioStationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ioStation' in table 'station_convert' is DBNull.", e) End Try End Get Set Me(Me.tablestation_convert.ioStationColumn) = value End Set End Property _ Public Property alvStation() As String Get Try Return CType(Me(Me.tablestation_convert.alvStationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'alvStation' in table 'station_convert' is DBNull.", e) End Try End Get Set Me(Me.tablestation_convert.alvStationColumn) = value End Set End Property _ Public Function IsioStationNull() As Boolean Return Me.IsNull(Me.tablestation_convert.ioStationColumn) End Function _ Public Sub SetioStationNull() Me(Me.tablestation_convert.ioStationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsalvStationNull() As Boolean Return Me.IsNull(Me.tablestation_convert.alvStationColumn) End Function _ Public Sub SetalvStationNull() Me(Me.tablestation_convert.alvStationColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class stationHistRow Inherits Global.System.Data.DataRow Private tablestationHist As stationHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablestationHist = CType(Me.Table,stationHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tablestationHist.lineNumColumn),Long) End Get Set Me(Me.tablestationHist.lineNumColumn) = value End Set End Property _ Public Property station() As String Get Try Return CType(Me(Me.tablestationHist.stationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'station' in table 'stationHist' is DBNull.", e) End Try End Get Set Me(Me.tablestationHist.stationColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tablestationHist.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'stationHist' is DBNull.", e) End Try End Get Set Me(Me.tablestationHist.descriptionColumn) = value End Set End Property _ Public Property sequence() As Integer Get Try Return CType(Me(Me.tablestationHist.sequenceColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'sequence' in table 'stationHist' is DBNull.", e) End Try End Get Set Me(Me.tablestationHist.sequenceColumn) = value End Set End Property _ Public Property stype() As String Get Try Return CType(Me(Me.tablestationHist.stypeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'stype' in table 'stationHist' is DBNull.", e) End Try End Get Set Me(Me.tablestationHist.stypeColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tablestationHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'stationHist' is DBNull.", e) End Try End Get Set Me(Me.tablestationHist.activeColumn) = value End Set End Property _ Public Property status() As String Get Try Return CType(Me(Me.tablestationHist.statusColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'status' in table 'stationHist' is DBNull.", e) End Try End Get Set Me(Me.tablestationHist.statusColumn) = value End Set End Property _ Public Property lastupdate() As Date Get Try Return CType(Me(Me.tablestationHist.lastupdateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdate' in table 'stationHist' is DBNull.", e) End Try End Get Set Me(Me.tablestationHist.lastupdateColumn) = value End Set End Property _ Public Property lastupdatedby() As String Get Try Return CType(Me(Me.tablestationHist.lastupdatedbyColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'lastupdatedby' in table 'stationHist' is DBNull.", e) End Try End Get Set Me(Me.tablestationHist.lastupdatedbyColumn) = value End Set End Property _ Public Function IsstationNull() As Boolean Return Me.IsNull(Me.tablestationHist.stationColumn) End Function _ Public Sub SetstationNull() Me(Me.tablestationHist.stationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tablestationHist.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tablestationHist.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssequenceNull() As Boolean Return Me.IsNull(Me.tablestationHist.sequenceColumn) End Function _ Public Sub SetsequenceNull() Me(Me.tablestationHist.sequenceColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstypeNull() As Boolean Return Me.IsNull(Me.tablestationHist.stypeColumn) End Function _ Public Sub SetstypeNull() Me(Me.tablestationHist.stypeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tablestationHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tablestationHist.activeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstatusNull() As Boolean Return Me.IsNull(Me.tablestationHist.statusColumn) End Function _ Public Sub SetstatusNull() Me(Me.tablestationHist.statusColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdateNull() As Boolean Return Me.IsNull(Me.tablestationHist.lastupdateColumn) End Function _ Public Sub SetlastupdateNull() Me(Me.tablestationHist.lastupdateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslastupdatedbyNull() As Boolean Return Me.IsNull(Me.tablestationHist.lastupdatedbyColumn) End Function _ Public Sub SetlastupdatedbyNull() Me(Me.tablestationHist.lastupdatedbyColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class usersRow Inherits Global.System.Data.DataRow Private tableusers As usersDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableusers = CType(Me.Table,usersDataTable) End Sub _ Public Property username() As String Get Return CType(Me(Me.tableusers.usernameColumn),String) End Get Set Me(Me.tableusers.usernameColumn) = value End Set End Property _ Public Property password() As String Get Try Return CType(Me(Me.tableusers.passwordColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'password' in table 'users' is DBNull.", e) End Try End Get Set Me(Me.tableusers.passwordColumn) = value End Set End Property _ Public Property employeeCode() As String Get Try Return CType(Me(Me.tableusers.employeeCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'employeeCode' in table 'users' is DBNull.", e) End Try End Get Set Me(Me.tableusers.employeeCodeColumn) = value End Set End Property _ Public Property dateJoined() As Date Get Try Return CType(Me(Me.tableusers.dateJoinedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dateJoined' in table 'users' is DBNull.", e) End Try End Get Set Me(Me.tableusers.dateJoinedColumn) = value End Set End Property _ Public Property authentication() As String Get Try Return CType(Me(Me.tableusers.authenticationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'authentication' in table 'users' is DBNull.", e) End Try End Get Set Me(Me.tableusers.authenticationColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tableusers.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'users' is DBNull.", e) End Try End Get Set Me(Me.tableusers.activeColumn) = value End Set End Property _ Public Function IspasswordNull() As Boolean Return Me.IsNull(Me.tableusers.passwordColumn) End Function _ Public Sub SetpasswordNull() Me(Me.tableusers.passwordColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsemployeeCodeNull() As Boolean Return Me.IsNull(Me.tableusers.employeeCodeColumn) End Function _ Public Sub SetemployeeCodeNull() Me(Me.tableusers.employeeCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdateJoinedNull() As Boolean Return Me.IsNull(Me.tableusers.dateJoinedColumn) End Function _ Public Sub SetdateJoinedNull() Me(Me.tableusers.dateJoinedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsauthenticationNull() As Boolean Return Me.IsNull(Me.tableusers.authenticationColumn) End Function _ Public Sub SetauthenticationNull() Me(Me.tableusers.authenticationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tableusers.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tableusers.activeColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class usersHistRow Inherits Global.System.Data.DataRow Private tableusersHist As usersHistDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableusersHist = CType(Me.Table,usersHistDataTable) End Sub _ Public Property lineNum() As Long Get Return CType(Me(Me.tableusersHist.lineNumColumn),Long) End Get Set Me(Me.tableusersHist.lineNumColumn) = value End Set End Property _ Public Property username() As String Get Try Return CType(Me(Me.tableusersHist.usernameColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'username' in table 'usersHist' is DBNull.", e) End Try End Get Set Me(Me.tableusersHist.usernameColumn) = value End Set End Property _ Public Property password() As String Get Try Return CType(Me(Me.tableusersHist.passwordColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'password' in table 'usersHist' is DBNull.", e) End Try End Get Set Me(Me.tableusersHist.passwordColumn) = value End Set End Property _ Public Property employeeCode() As String Get Try Return CType(Me(Me.tableusersHist.employeeCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'employeeCode' in table 'usersHist' is DBNull.", e) End Try End Get Set Me(Me.tableusersHist.employeeCodeColumn) = value End Set End Property _ Public Property dateJoined() As Date Get Try Return CType(Me(Me.tableusersHist.dateJoinedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dateJoined' in table 'usersHist' is DBNull.", e) End Try End Get Set Me(Me.tableusersHist.dateJoinedColumn) = value End Set End Property _ Public Property authentication() As String Get Try Return CType(Me(Me.tableusersHist.authenticationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'authentication' in table 'usersHist' is DBNull.", e) End Try End Get Set Me(Me.tableusersHist.authenticationColumn) = value End Set End Property _ Public Property active() As Integer Get Try Return CType(Me(Me.tableusersHist.activeColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'active' in table 'usersHist' is DBNull.", e) End Try End Get Set Me(Me.tableusersHist.activeColumn) = value End Set End Property _ Public Function IsusernameNull() As Boolean Return Me.IsNull(Me.tableusersHist.usernameColumn) End Function _ Public Sub SetusernameNull() Me(Me.tableusersHist.usernameColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspasswordNull() As Boolean Return Me.IsNull(Me.tableusersHist.passwordColumn) End Function _ Public Sub SetpasswordNull() Me(Me.tableusersHist.passwordColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsemployeeCodeNull() As Boolean Return Me.IsNull(Me.tableusersHist.employeeCodeColumn) End Function _ Public Sub SetemployeeCodeNull() Me(Me.tableusersHist.employeeCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdateJoinedNull() As Boolean Return Me.IsNull(Me.tableusersHist.dateJoinedColumn) End Function _ Public Sub SetdateJoinedNull() Me(Me.tableusersHist.dateJoinedColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsauthenticationNull() As Boolean Return Me.IsNull(Me.tableusersHist.authenticationColumn) End Function _ Public Sub SetauthenticationNull() Me(Me.tableusersHist.authenticationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsactiveNull() As Boolean Return Me.IsNull(Me.tableusersHist.activeColumn) End Function _ Public Sub SetactiveNull() Me(Me.tableusersHist.activeColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class WIP_TEMPRow Inherits Global.System.Data.DataRow Private tableWIP_TEMP As WIP_TEMPDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableWIP_TEMP = CType(Me.Table,WIP_TEMPDataTable) End Sub _ Public Property modelno() As String Get Return CType(Me(Me.tableWIP_TEMP.modelnoColumn),String) End Get Set Me(Me.tableWIP_TEMP.modelnoColumn) = value End Set End Property _ Public Property station() As String Get Return CType(Me(Me.tableWIP_TEMP.stationColumn),String) End Get Set Me(Me.tableWIP_TEMP.stationColumn) = value End Set End Property _ Public Property previous() As String Get Try Return CType(Me(Me.tableWIP_TEMP.previousColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'previous' in table 'WIP_TEMP' is DBNull.", e) End Try End Get Set Me(Me.tableWIP_TEMP.previousColumn) = value End Set End Property _ Public Property description() As String Get Try Return CType(Me(Me.tableWIP_TEMP.descriptionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'description' in table 'WIP_TEMP' is DBNull.", e) End Try End Get Set Me(Me.tableWIP_TEMP.descriptionColumn) = value End Set End Property _ Public Property WIP() As Integer Get Try Return CType(Me(Me.tableWIP_TEMP.WIPColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'WIP' in table 'WIP_TEMP' is DBNull.", e) End Try End Get Set Me(Me.tableWIP_TEMP.WIPColumn) = value End Set End Property _ Public Property _date() As Date Get Try Return CType(Me(Me.tableWIP_TEMP.dateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'date' in table 'WIP_TEMP' is DBNull.", e) End Try End Get Set Me(Me.tableWIP_TEMP.dateColumn) = value End Set End Property _ Public Function IspreviousNull() As Boolean Return Me.IsNull(Me.tableWIP_TEMP.previousColumn) End Function _ Public Sub SetpreviousNull() Me(Me.tableWIP_TEMP.previousColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdescriptionNull() As Boolean Return Me.IsNull(Me.tableWIP_TEMP.descriptionColumn) End Function _ Public Sub SetdescriptionNull() Me(Me.tableWIP_TEMP.descriptionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsWIPNull() As Boolean Return Me.IsNull(Me.tableWIP_TEMP.WIPColumn) End Function _ Public Sub SetWIPNull() Me(Me.tableWIP_TEMP.WIPColumn) = Global.System.Convert.DBNull End Sub _ Public Function Is_dateNull() As Boolean Return Me.IsNull(Me.tableWIP_TEMP.dateColumn) End Function _ Public Sub Set_dateNull() Me(Me.tableWIP_TEMP.dateColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class _CTSB9_00001Row Inherits Global.System.Data.DataRow Private _tableCTSB9_00001 As _CTSB9_00001DataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me._tableCTSB9_00001 = CType(Me.Table,_CTSB9_00001DataTable) End Sub _ Public Property ModuleAndFeeder() As String Get Try Return CType(Me(Me._tableCTSB9_00001.ModuleAndFeederColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModuleAndFeeder' in table 'CTSB9-00001' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00001.ModuleAndFeederColumn) = value End Set End Property _ Public Property PartNo() As String Get Try Return CType(Me(Me._tableCTSB9_00001.PartNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PartNo' in table 'CTSB9-00001' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00001.PartNoColumn) = value End Set End Property _ Public Property Lot() As String Get Try Return CType(Me(Me._tableCTSB9_00001.LotColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Lot' in table 'CTSB9-00001' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00001.LotColumn) = value End Set End Property _ Public Property Location() As String Get Try Return CType(Me(Me._tableCTSB9_00001.LocationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Location' in table 'CTSB9-00001' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00001.LocationColumn) = value End Set End Property _ Public Property DateAndTimeMounted() As Date Get Try Return CType(Me(Me._tableCTSB9_00001.DateAndTimeMountedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateAndTimeMounted' in table 'CTSB9-00001' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00001.DateAndTimeMountedColumn) = value End Set End Property _ Public Property _Operator() As String Get Try Return CType(Me(Me._tableCTSB9_00001.OperatorColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Operator' in table 'CTSB9-00001' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00001.OperatorColumn) = value End Set End Property _ Public Function IsModuleAndFeederNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00001.ModuleAndFeederColumn) End Function _ Public Sub SetModuleAndFeederNull() Me(Me._tableCTSB9_00001.ModuleAndFeederColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPartNoNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00001.PartNoColumn) End Function _ Public Sub SetPartNoNull() Me(Me._tableCTSB9_00001.PartNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsLotNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00001.LotColumn) End Function _ Public Sub SetLotNull() Me(Me._tableCTSB9_00001.LotColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsLocationNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00001.LocationColumn) End Function _ Public Sub SetLocationNull() Me(Me._tableCTSB9_00001.LocationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateAndTimeMountedNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00001.DateAndTimeMountedColumn) End Function _ Public Sub SetDateAndTimeMountedNull() Me(Me._tableCTSB9_00001.DateAndTimeMountedColumn) = Global.System.Convert.DBNull End Sub _ Public Function Is_OperatorNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00001.OperatorColumn) End Function _ Public Sub Set_OperatorNull() Me(Me._tableCTSB9_00001.OperatorColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class _CTSB9_00002Row Inherits Global.System.Data.DataRow Private _tableCTSB9_00002 As _CTSB9_00002DataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me._tableCTSB9_00002 = CType(Me.Table,_CTSB9_00002DataTable) End Sub _ Public Property ModuleAndFeeder() As String Get Try Return CType(Me(Me._tableCTSB9_00002.ModuleAndFeederColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModuleAndFeeder' in table 'CTSB9-00002' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00002.ModuleAndFeederColumn) = value End Set End Property _ Public Property PartNo() As String Get Try Return CType(Me(Me._tableCTSB9_00002.PartNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PartNo' in table 'CTSB9-00002' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00002.PartNoColumn) = value End Set End Property _ Public Property Lot() As String Get Try Return CType(Me(Me._tableCTSB9_00002.LotColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Lot' in table 'CTSB9-00002' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00002.LotColumn) = value End Set End Property _ Public Property Location() As String Get Try Return CType(Me(Me._tableCTSB9_00002.LocationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Location' in table 'CTSB9-00002' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00002.LocationColumn) = value End Set End Property _ Public Property DateAndTimeMounted() As Date Get Try Return CType(Me(Me._tableCTSB9_00002.DateAndTimeMountedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateAndTimeMounted' in table 'CTSB9-00002' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00002.DateAndTimeMountedColumn) = value End Set End Property _ Public Property _Operator() As String Get Try Return CType(Me(Me._tableCTSB9_00002.OperatorColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Operator' in table 'CTSB9-00002' is DBNull.", e) End Try End Get Set Me(Me._tableCTSB9_00002.OperatorColumn) = value End Set End Property _ Public Function IsModuleAndFeederNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00002.ModuleAndFeederColumn) End Function _ Public Sub SetModuleAndFeederNull() Me(Me._tableCTSB9_00002.ModuleAndFeederColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPartNoNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00002.PartNoColumn) End Function _ Public Sub SetPartNoNull() Me(Me._tableCTSB9_00002.PartNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsLotNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00002.LotColumn) End Function _ Public Sub SetLotNull() Me(Me._tableCTSB9_00002.LotColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsLocationNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00002.LocationColumn) End Function _ Public Sub SetLocationNull() Me(Me._tableCTSB9_00002.LocationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateAndTimeMountedNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00002.DateAndTimeMountedColumn) End Function _ Public Sub SetDateAndTimeMountedNull() Me(Me._tableCTSB9_00002.DateAndTimeMountedColumn) = Global.System.Convert.DBNull End Sub _ Public Function Is_OperatorNull() As Boolean Return Me.IsNull(Me._tableCTSB9_00002.OperatorColumn) End Function _ Public Sub Set_OperatorNull() Me(Me._tableCTSB9_00002.OperatorColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class getMaxDateRow Inherits Global.System.Data.DataRow Private tablegetMaxDate As getMaxDateDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablegetMaxDate = CType(Me.Table,getMaxDateDataTable) End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class getMinDateRow Inherits Global.System.Data.DataRow Private tablegetMinDate As getMinDateDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablegetMinDate = CType(Me.Table,getMinDateDataTable) End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class Shipper_FileRow Inherits Global.System.Data.DataRow Private tableShipper_File As Shipper_FileDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableShipper_File = CType(Me.Table,Shipper_FileDataTable) End Sub _ Public Property shipno() As String Get Return CType(Me(Me.tableShipper_File.shipnoColumn),String) End Get Set Me(Me.tableShipper_File.shipnoColumn) = value End Set End Property _ Public Property shipDate() As Date Get Try Return CType(Me(Me.tableShipper_File.shipDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipDate' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.shipDateColumn) = value End Set End Property _ Public Property shipVia() As String Get Try Return CType(Me(Me.tableShipper_File.shipViaColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipVia' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.shipViaColumn) = value End Set End Property _ Public Property shipto() As String Get Try Return CType(Me(Me.tableShipper_File.shiptoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipto' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.shiptoColumn) = value End Set End Property _ Public Property sipAdd1() As String Get Try Return CType(Me(Me.tableShipper_File.sipAdd1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'sipAdd1' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.sipAdd1Column) = value End Set End Property _ Public Property shipAdd2() As String Get Try Return CType(Me(Me.tableShipper_File.shipAdd2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd2' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.shipAdd2Column) = value End Set End Property _ Public Property shipAdd3() As String Get Try Return CType(Me(Me.tableShipper_File.shipAdd3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd3' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.shipAdd3Column) = value End Set End Property _ Public Property city() As String Get Try Return CType(Me(Me.tableShipper_File.cityColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'city' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.cityColumn) = value End Set End Property _ Public Property state() As String Get Try Return CType(Me(Me.tableShipper_File.stateColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'state' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.stateColumn) = value End Set End Property _ Public Property postalCode() As String Get Try Return CType(Me(Me.tableShipper_File.postalCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'postalCode' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.postalCodeColumn) = value End Set End Property _ Public Property countryCode() As String Get Try Return CType(Me(Me.tableShipper_File.countryCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'countryCode' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.countryCodeColumn) = value End Set End Property _ Public Property cnNo() As String Get Try Return CType(Me(Me.tableShipper_File.cnNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cnNo' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.cnNoColumn) = value End Set End Property _ Public Property layer() As Single Get Try Return CType(Me(Me.tableShipper_File.layerColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layer' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.layerColumn) = value End Set End Property _ Public Property dimension() As String Get Try Return CType(Me(Me.tableShipper_File.dimensionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimension' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.dimensionColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tableShipper_File.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.serialnoColumn) = value End Set End Property _ Public Property poLine() As String Get Try Return CType(Me(Me.tableShipper_File.poLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.poLineColumn) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tableShipper_File.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'Shipper_File' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File.modelColumn) = value End Set End Property _ Public Function IsshipDateNull() As Boolean Return Me.IsNull(Me.tableShipper_File.shipDateColumn) End Function _ Public Sub SetshipDateNull() Me(Me.tableShipper_File.shipDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipViaNull() As Boolean Return Me.IsNull(Me.tableShipper_File.shipViaColumn) End Function _ Public Sub SetshipViaNull() Me(Me.tableShipper_File.shipViaColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshiptoNull() As Boolean Return Me.IsNull(Me.tableShipper_File.shiptoColumn) End Function _ Public Sub SetshiptoNull() Me(Me.tableShipper_File.shiptoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssipAdd1Null() As Boolean Return Me.IsNull(Me.tableShipper_File.sipAdd1Column) End Function _ Public Sub SetsipAdd1Null() Me(Me.tableShipper_File.sipAdd1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd2Null() As Boolean Return Me.IsNull(Me.tableShipper_File.shipAdd2Column) End Function _ Public Sub SetshipAdd2Null() Me(Me.tableShipper_File.shipAdd2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd3Null() As Boolean Return Me.IsNull(Me.tableShipper_File.shipAdd3Column) End Function _ Public Sub SetshipAdd3Null() Me(Me.tableShipper_File.shipAdd3Column) = Global.System.Convert.DBNull End Sub _ Public Function IscityNull() As Boolean Return Me.IsNull(Me.tableShipper_File.cityColumn) End Function _ Public Sub SetcityNull() Me(Me.tableShipper_File.cityColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsstateNull() As Boolean Return Me.IsNull(Me.tableShipper_File.stateColumn) End Function _ Public Sub SetstateNull() Me(Me.tableShipper_File.stateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspostalCodeNull() As Boolean Return Me.IsNull(Me.tableShipper_File.postalCodeColumn) End Function _ Public Sub SetpostalCodeNull() Me(Me.tableShipper_File.postalCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscountryCodeNull() As Boolean Return Me.IsNull(Me.tableShipper_File.countryCodeColumn) End Function _ Public Sub SetcountryCodeNull() Me(Me.tableShipper_File.countryCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscnNoNull() As Boolean Return Me.IsNull(Me.tableShipper_File.cnNoColumn) End Function _ Public Sub SetcnNoNull() Me(Me.tableShipper_File.cnNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslayerNull() As Boolean Return Me.IsNull(Me.tableShipper_File.layerColumn) End Function _ Public Sub SetlayerNull() Me(Me.tableShipper_File.layerColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimensionNull() As Boolean Return Me.IsNull(Me.tableShipper_File.dimensionColumn) End Function _ Public Sub SetdimensionNull() Me(Me.tableShipper_File.dimensionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tableShipper_File.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tableShipper_File.serialnoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tableShipper_File.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tableShipper_File.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tableShipper_File.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tableShipper_File.modelColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class Shipper_File_BodyRow Inherits Global.System.Data.DataRow Private tableShipper_File_Body As Shipper_File_BodyDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableShipper_File_Body = CType(Me.Table,Shipper_File_BodyDataTable) End Sub _ Public Property POLine() As String Get Try Return CType(Me(Me.tableShipper_File_Body.POLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'POLine' in table 'Shipper_File_Body' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Body.POLineColumn) = value End Set End Property _ Public Property modelDesc1() As String Get Try Return CType(Me(Me.tableShipper_File_Body.modelDesc1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'modelDesc1' in table 'Shipper_File_Body' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Body.modelDesc1Column) = value End Set End Property _ Public Property CustPO() As String Get Try Return CType(Me(Me.tableShipper_File_Body.CustPOColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPO' in table 'Shipper_File_Body' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Body.CustPOColumn) = value End Set End Property _ Public Property Flag3() As String Get Try Return CType(Me(Me.tableShipper_File_Body.Flag3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Flag3' in table 'Shipper_File_Body' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Body.Flag3Column) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tableShipper_File_Body.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'Shipper_File_Body' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Body.modelColumn) = value End Set End Property _ Public Property CustPart() As String Get Try Return CType(Me(Me.tableShipper_File_Body.CustPartColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'CustPart' in table 'Shipper_File_Body' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Body.CustPartColumn) = value End Set End Property _ Public Property serialno() As String Get Try Return CType(Me(Me.tableShipper_File_Body.serialnoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'serialno' in table 'Shipper_File_Body' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Body.serialnoColumn) = value End Set End Property _ Public Function IsPOLineNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Body.POLineColumn) End Function _ Public Sub SetPOLineNull() Me(Me.tableShipper_File_Body.POLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelDesc1Null() As Boolean Return Me.IsNull(Me.tableShipper_File_Body.modelDesc1Column) End Function _ Public Sub SetmodelDesc1Null() Me(Me.tableShipper_File_Body.modelDesc1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPONull() As Boolean Return Me.IsNull(Me.tableShipper_File_Body.CustPOColumn) End Function _ Public Sub SetCustPONull() Me(Me.tableShipper_File_Body.CustPOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsFlag3Null() As Boolean Return Me.IsNull(Me.tableShipper_File_Body.Flag3Column) End Function _ Public Sub SetFlag3Null() Me(Me.tableShipper_File_Body.Flag3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Body.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tableShipper_File_Body.modelColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsCustPartNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Body.CustPartColumn) End Function _ Public Sub SetCustPartNull() Me(Me.tableShipper_File_Body.CustPartColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsserialnoNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Body.serialnoColumn) End Function _ Public Sub SetserialnoNull() Me(Me.tableShipper_File_Body.serialnoColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class Shipper_File_HeaderRow Inherits Global.System.Data.DataRow Private tableShipper_File_Header As Shipper_File_HeaderDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableShipper_File_Header = CType(Me.Table,Shipper_File_HeaderDataTable) End Sub _ Public Property shipno() As String Get Return CType(Me(Me.tableShipper_File_Header.shipnoColumn),String) End Get Set Me(Me.tableShipper_File_Header.shipnoColumn) = value End Set End Property _ Public Property shipDate() As Date Get Try Return CType(Me(Me.tableShipper_File_Header.shipDateColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipDate' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.shipDateColumn) = value End Set End Property _ Public Property shipVia() As String Get Try Return CType(Me(Me.tableShipper_File_Header.shipViaColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipVia' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.shipViaColumn) = value End Set End Property _ Public Property shipto() As String Get Try Return CType(Me(Me.tableShipper_File_Header.shiptoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipto' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.shiptoColumn) = value End Set End Property _ Public Property sipAdd1() As String Get Try Return CType(Me(Me.tableShipper_File_Header.sipAdd1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'sipAdd1' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.sipAdd1Column) = value End Set End Property _ Public Property shipAdd2() As String Get Try Return CType(Me(Me.tableShipper_File_Header.shipAdd2Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd2' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.shipAdd2Column) = value End Set End Property _ Public Property shipAdd3() As String Get Try Return CType(Me(Me.tableShipper_File_Header.shipAdd3Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'shipAdd3' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.shipAdd3Column) = value End Set End Property _ Public Property ZIP() As String Get Try Return CType(Me(Me.tableShipper_File_Header.ZIPColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ZIP' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.ZIPColumn) = value End Set End Property _ Public Property countryCode() As String Get Try Return CType(Me(Me.tableShipper_File_Header.countryCodeColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'countryCode' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.countryCodeColumn) = value End Set End Property _ Public Property cnNo() As String Get Try Return CType(Me(Me.tableShipper_File_Header.cnNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'cnNo' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.cnNoColumn) = value End Set End Property _ Public Property layer() As Single Get Try Return CType(Me(Me.tableShipper_File_Header.layerColumn),Single) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'layer' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.layerColumn) = value End Set End Property _ Public Property dimension() As String Get Try Return CType(Me(Me.tableShipper_File_Header.dimensionColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'dimension' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.dimensionColumn) = value End Set End Property _ Public Property poLine() As String Get Try Return CType(Me(Me.tableShipper_File_Header.poLineColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'poLine' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.poLineColumn) = value End Set End Property _ Public Property model() As String Get Try Return CType(Me(Me.tableShipper_File_Header.modelColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'model' in table 'Shipper_File_Header' is DBNull.", e) End Try End Get Set Me(Me.tableShipper_File_Header.modelColumn) = value End Set End Property _ Public Function IsshipDateNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.shipDateColumn) End Function _ Public Sub SetshipDateNull() Me(Me.tableShipper_File_Header.shipDateColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshipViaNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.shipViaColumn) End Function _ Public Sub SetshipViaNull() Me(Me.tableShipper_File_Header.shipViaColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsshiptoNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.shiptoColumn) End Function _ Public Sub SetshiptoNull() Me(Me.tableShipper_File_Header.shiptoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IssipAdd1Null() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.sipAdd1Column) End Function _ Public Sub SetsipAdd1Null() Me(Me.tableShipper_File_Header.sipAdd1Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd2Null() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.shipAdd2Column) End Function _ Public Sub SetshipAdd2Null() Me(Me.tableShipper_File_Header.shipAdd2Column) = Global.System.Convert.DBNull End Sub _ Public Function IsshipAdd3Null() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.shipAdd3Column) End Function _ Public Sub SetshipAdd3Null() Me(Me.tableShipper_File_Header.shipAdd3Column) = Global.System.Convert.DBNull End Sub _ Public Function IsZIPNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.ZIPColumn) End Function _ Public Sub SetZIPNull() Me(Me.tableShipper_File_Header.ZIPColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscountryCodeNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.countryCodeColumn) End Function _ Public Sub SetcountryCodeNull() Me(Me.tableShipper_File_Header.countryCodeColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscnNoNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.cnNoColumn) End Function _ Public Sub SetcnNoNull() Me(Me.tableShipper_File_Header.cnNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IslayerNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.layerColumn) End Function _ Public Sub SetlayerNull() Me(Me.tableShipper_File_Header.layerColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsdimensionNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.dimensionColumn) End Function _ Public Sub SetdimensionNull() Me(Me.tableShipper_File_Header.dimensionColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspoLineNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.poLineColumn) End Function _ Public Sub SetpoLineNull() Me(Me.tableShipper_File_Header.poLineColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsmodelNull() As Boolean Return Me.IsNull(Me.tableShipper_File_Header.modelColumn) End Function _ Public Sub SetmodelNull() Me(Me.tableShipper_File_Header.modelColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class containerRow Inherits Global.System.Data.DataRow Private tablecontainer As containerDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablecontainer = CType(Me.Table,containerDataTable) End Sub _ Public Property Column1() As String Get Try Return CType(Me(Me.tablecontainer.Column1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Column1' in table 'container' is DBNull.", e) End Try End Get Set Me(Me.tablecontainer.Column1Column) = value End Set End Property _ Public Function IsColumn1Null() As Boolean Return Me.IsNull(Me.tablecontainer.Column1Column) End Function _ Public Sub SetColumn1Null() Me(Me.tablecontainer.Column1Column) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class createViewRow Inherits Global.System.Data.DataRow Private tablecreateView As createViewDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablecreateView = CType(Me.Table,createViewDataTable) End Sub _ Public Property ModuleAndFeeder() As String Get Try Return CType(Me(Me.tablecreateView.ModuleAndFeederColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'ModuleAndFeeder' in table 'createView' is DBNull.", e) End Try End Get Set Me(Me.tablecreateView.ModuleAndFeederColumn) = value End Set End Property _ Public Property PartNo() As String Get Try Return CType(Me(Me.tablecreateView.PartNoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'PartNo' in table 'createView' is DBNull.", e) End Try End Get Set Me(Me.tablecreateView.PartNoColumn) = value End Set End Property _ Public Property Lot() As String Get Try Return CType(Me(Me.tablecreateView.LotColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Lot' in table 'createView' is DBNull.", e) End Try End Get Set Me(Me.tablecreateView.LotColumn) = value End Set End Property _ Public Property Location() As String Get Try Return CType(Me(Me.tablecreateView.LocationColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Location' in table 'createView' is DBNull.", e) End Try End Get Set Me(Me.tablecreateView.LocationColumn) = value End Set End Property _ Public Property DateAndTimeMounted() As Date Get Try Return CType(Me(Me.tablecreateView.DateAndTimeMountedColumn),Date) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'DateAndTimeMounted' in table 'createView' is DBNull.", e) End Try End Get Set Me(Me.tablecreateView.DateAndTimeMountedColumn) = value End Set End Property _ Public Property _Operator() As String Get Try Return CType(Me(Me.tablecreateView.OperatorColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Operator' in table 'createView' is DBNull.", e) End Try End Get Set Me(Me.tablecreateView.OperatorColumn) = value End Set End Property _ Public Function IsModuleAndFeederNull() As Boolean Return Me.IsNull(Me.tablecreateView.ModuleAndFeederColumn) End Function _ Public Sub SetModuleAndFeederNull() Me(Me.tablecreateView.ModuleAndFeederColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsPartNoNull() As Boolean Return Me.IsNull(Me.tablecreateView.PartNoColumn) End Function _ Public Sub SetPartNoNull() Me(Me.tablecreateView.PartNoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsLotNull() As Boolean Return Me.IsNull(Me.tablecreateView.LotColumn) End Function _ Public Sub SetLotNull() Me(Me.tablecreateView.LotColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsLocationNull() As Boolean Return Me.IsNull(Me.tablecreateView.LocationColumn) End Function _ Public Sub SetLocationNull() Me(Me.tablecreateView.LocationColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsDateAndTimeMountedNull() As Boolean Return Me.IsNull(Me.tablecreateView.DateAndTimeMountedColumn) End Function _ Public Sub SetDateAndTimeMountedNull() Me(Me.tablecreateView.DateAndTimeMountedColumn) = Global.System.Convert.DBNull End Sub _ Public Function Is_OperatorNull() As Boolean Return Me.IsNull(Me.tablecreateView.OperatorColumn) End Function _ Public Sub Set_OperatorNull() Me(Me.tablecreateView.OperatorColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class itemRow Inherits Global.System.Data.DataRow Private tableitem As itemDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableitem = CType(Me.Table,itemDataTable) End Sub _ Public Property Column1() As String Get Try Return CType(Me(Me.tableitem.Column1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Column1' in table 'item' is DBNull.", e) End Try End Get Set Me(Me.tableitem.Column1Column) = value End Set End Property _ Public Function IsColumn1Null() As Boolean Return Me.IsNull(Me.tableitem.Column1Column) End Function _ Public Sub SetColumn1Null() Me(Me.tableitem.Column1Column) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class PORow Inherits Global.System.Data.DataRow Private tablePO As PODataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablePO = CType(Me.Table,PODataTable) End Sub _ Public Property Column1() As String Get Try Return CType(Me(Me.tablePO.Column1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Column1' in table 'PO' is DBNull.", e) End Try End Get Set Me(Me.tablePO.Column1Column) = value End Set End Property _ Public Function IsColumn1Null() As Boolean Return Me.IsNull(Me.tablePO.Column1Column) End Function _ Public Sub SetColumn1Null() Me(Me.tablePO.Column1Column) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class POLINERow Inherits Global.System.Data.DataRow Private tablePOLINE As POLINEDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablePOLINE = CType(Me.Table,POLINEDataTable) End Sub _ Public Property Column1() As String Get Try Return CType(Me(Me.tablePOLINE.Column1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Column1' in table 'POLINE' is DBNull.", e) End Try End Get Set Me(Me.tablePOLINE.Column1Column) = value End Set End Property _ Public Function IsColumn1Null() As Boolean Return Me.IsNull(Me.tablePOLINE.Column1Column) End Function _ Public Sub SetColumn1Null() Me(Me.tablePOLINE.Column1Column) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class shipAdd1Row Inherits Global.System.Data.DataRow Private tableshipAdd1 As shipAdd1DataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableshipAdd1 = CType(Me.Table,shipAdd1DataTable) End Sub _ Public Property Column1() As String Get Try Return CType(Me(Me.tableshipAdd1.Column1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Column1' in table 'shipAdd1' is DBNull.", e) End Try End Get Set Me(Me.tableshipAdd1.Column1Column) = value End Set End Property _ Public Function IsColumn1Null() As Boolean Return Me.IsNull(Me.tableshipAdd1.Column1Column) End Function _ Public Sub SetColumn1Null() Me(Me.tableshipAdd1.Column1Column) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class shipAdd2Row Inherits Global.System.Data.DataRow Private tableshipAdd2 As shipAdd2DataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableshipAdd2 = CType(Me.Table,shipAdd2DataTable) End Sub _ Public Property Column1() As String Get Try Return CType(Me(Me.tableshipAdd2.Column1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Column1' in table 'shipAdd2' is DBNull.", e) End Try End Get Set Me(Me.tableshipAdd2.Column1Column) = value End Set End Property _ Public Function IsColumn1Null() As Boolean Return Me.IsNull(Me.tableshipAdd2.Column1Column) End Function _ Public Sub SetColumn1Null() Me(Me.tableshipAdd2.Column1Column) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class shipAdd3Row Inherits Global.System.Data.DataRow Private tableshipAdd3 As shipAdd3DataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tableshipAdd3 = CType(Me.Table,shipAdd3DataTable) End Sub _ Public Property Column1() As String Get Try Return CType(Me(Me.tableshipAdd3.Column1Column),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'Column1' in table 'shipAdd3' is DBNull.", e) End Try End Get Set Me(Me.tableshipAdd3.Column1Column) = value End Set End Property _ Public Function IsColumn1Null() As Boolean Return Me.IsNull(Me.tableshipAdd3.Column1Column) End Function _ Public Sub SetColumn1Null() Me(Me.tableshipAdd3.Column1Column) = Global.System.Convert.DBNull End Sub End Class ''' '''Represents strongly named DataRow class. ''' Partial Public Class validatePOTransferRow Inherits Global.System.Data.DataRow Private tablevalidatePOTransfer As validatePOTransferDataTable _ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) MyBase.New(rb) Me.tablevalidatePOTransfer = CType(Me.Table,validatePOTransferDataTable) End Sub _ Public Property partOldPo() As String Get Try Return CType(Me(Me.tablevalidatePOTransfer.partOldPoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partOldPo' in table 'validatePOTransfer' is DBNull.", e) End Try End Get Set Me(Me.tablevalidatePOTransfer.partOldPoColumn) = value End Set End Property _ Public Property partNewPo() As String Get Try Return CType(Me(Me.tablevalidatePOTransfer.partNewPoColumn),String) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'partNewPo' in table 'validatePOTransfer' is DBNull.", e) End Try End Get Set Me(Me.tablevalidatePOTransfer.partNewPoColumn) = value End Set End Property _ Public Property countOldPO() As Integer Get Try Return CType(Me(Me.tablevalidatePOTransfer.countOldPOColumn),Integer) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'countOldPO' in table 'validatePOTransfer' is DBNull.", e) End Try End Get Set Me(Me.tablevalidatePOTransfer.countOldPOColumn) = value End Set End Property _ Public Property openNewPo() As Decimal Get Try Return CType(Me(Me.tablevalidatePOTransfer.openNewPoColumn),Decimal) Catch e As Global.System.InvalidCastException Throw New Global.System.Data.StrongTypingException("The value for column 'openNewPo' in table 'validatePOTransfer' is DBNull.", e) End Try End Get Set Me(Me.tablevalidatePOTransfer.openNewPoColumn) = value End Set End Property _ Public Function IspartOldPoNull() As Boolean Return Me.IsNull(Me.tablevalidatePOTransfer.partOldPoColumn) End Function _ Public Sub SetpartOldPoNull() Me(Me.tablevalidatePOTransfer.partOldPoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IspartNewPoNull() As Boolean Return Me.IsNull(Me.tablevalidatePOTransfer.partNewPoColumn) End Function _ Public Sub SetpartNewPoNull() Me(Me.tablevalidatePOTransfer.partNewPoColumn) = Global.System.Convert.DBNull End Sub _ Public Function IscountOldPONull() As Boolean Return Me.IsNull(Me.tablevalidatePOTransfer.countOldPOColumn) End Function _ Public Sub SetcountOldPONull() Me(Me.tablevalidatePOTransfer.countOldPOColumn) = Global.System.Convert.DBNull End Sub _ Public Function IsopenNewPoNull() As Boolean Return Me.IsNull(Me.tablevalidatePOTransfer.openNewPoColumn) End Function _ Public Sub SetopenNewPoNull() Me(Me.tablevalidatePOTransfer.openNewPoColumn) = Global.System.Convert.DBNull End Sub End Class ''' '''Row event argument class ''' _ Public Class AOIQ_TempRowChangeEvent Inherits Global.System.EventArgs Private eventRow As AOIQ_TempRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As AOIQ_TempRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As AOIQ_TempRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class batchRowChangeEvent Inherits Global.System.EventArgs Private eventRow As batchRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As batchRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As batchRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class cardRowChangeEvent Inherits Global.System.EventArgs Private eventRow As cardRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As cardRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As cardRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class card_backupRowChangeEvent Inherits Global.System.EventArgs Private eventRow As card_backupRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As card_backupRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As card_backupRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class card_HistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As card_HistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As card_HistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As card_HistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class cardHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As cardHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As cardHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As cardHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class component_partsRowChangeEvent Inherits Global.System.EventArgs Private eventRow As component_partsRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As component_partsRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As component_partsRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class CTSRowChangeEvent Inherits Global.System.EventArgs Private eventRow As CTSRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As CTSRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As CTSRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class defectCatProdRowChangeEvent Inherits Global.System.EventArgs Private eventRow As defectCatProdRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As defectCatProdRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As defectCatProdRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class defectCatProdHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As defectCatProdHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As defectCatProdHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As defectCatProdHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class defectCatQCRowChangeEvent Inherits Global.System.EventArgs Private eventRow As defectCatQCRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As defectCatQCRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As defectCatQCRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class defectCatQCHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As defectCatQCHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As defectCatQCHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As defectCatQCHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class defectProdRowChangeEvent Inherits Global.System.EventArgs Private eventRow As defectProdRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As defectProdRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As defectProdRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class defectProdHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As defectProdHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As defectProdHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As defectProdHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class defectQCRowChangeEvent Inherits Global.System.EventArgs Private eventRow As defectQCRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As defectQCRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As defectQCRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class defectQCHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As defectQCHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As defectQCHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As defectQCHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class FA_NewPTRowChangeEvent Inherits Global.System.EventArgs Private eventRow As FA_NewPTRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As FA_NewPTRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As FA_NewPTRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class faNoRowChangeEvent Inherits Global.System.EventArgs Private eventRow As faNoRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As faNoRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As faNoRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class KITTINGRowChangeEvent Inherits Global.System.EventArgs Private eventRow As KITTINGRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As KITTINGRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As KITTINGRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class KMOUNTINGRowChangeEvent Inherits Global.System.EventArgs Private eventRow As KMOUNTINGRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As KMOUNTINGRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As KMOUNTINGRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class KSEQUENCE_DETAILRowChangeEvent Inherits Global.System.EventArgs Private eventRow As KSEQUENCE_DETAILRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As KSEQUENCE_DETAILRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As KSEQUENCE_DETAILRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class KSEQUENCE_HEADERRowChangeEvent Inherits Global.System.EventArgs Private eventRow As KSEQUENCE_HEADERRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As KSEQUENCE_HEADERRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As KSEQUENCE_HEADERRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class KSETTINGSRowChangeEvent Inherits Global.System.EventArgs Private eventRow As KSETTINGSRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As KSETTINGSRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As KSETTINGSRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class LabelDefRowChangeEvent Inherits Global.System.EventArgs Private eventRow As LabelDefRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As LabelDefRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As LabelDefRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class LabelDefHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As LabelDefHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As LabelDefHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As LabelDefHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_actionRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_actionRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_actionRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_actionRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_alvarion_serialRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_alvarion_serialRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_alvarion_serialRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_alvarion_serialRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_ATE_errorRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_ATE_errorRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_ATE_errorRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_ATE_errorRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_BL_DetailRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_BL_DetailRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_BL_DetailRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_BL_DetailRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_BL_Detail_HistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_BL_Detail_HistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_BL_Detail_HistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_BL_Detail_HistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_BL_HeaderRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_BL_HeaderRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_BL_HeaderRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_BL_HeaderRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_BL_Header_HistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_BL_Header_HistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_BL_Header_HistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_BL_Header_HistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_CAPARowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_CAPARow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_CAPARow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_CAPARow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_cardRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_cardRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_cardRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_cardRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_CT_DetailRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_CT_DetailRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_CT_DetailRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_CT_DetailRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_CT_Detail_HistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_CT_Detail_HistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_CT_Detail_HistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_CT_Detail_HistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_CT_HeaderRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_CT_HeaderRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_CT_HeaderRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_CT_HeaderRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_CT_Header_HistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_CT_Header_HistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_CT_Header_HistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_CT_Header_HistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_ct_header_tempRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_ct_header_tempRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_ct_header_tempRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_ct_header_tempRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_DARowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_DARow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_DARow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_DARow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_labelRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_labelRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_labelRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_labelRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_labelHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_labelHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_labelHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_labelHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_linkRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_linkRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_linkRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_linkRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_linkHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_linkHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_linkHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_linkHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_lotRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_lotRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_lotRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_lotRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_passRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_passRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_passRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_passRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_pass_serialRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_pass_serialRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_pass_serialRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_pass_serialRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_PreTest_DetailRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_PreTest_DetailRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_PreTest_DetailRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_PreTest_DetailRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_repairRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_repairRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_repairRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_repairRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_repair_faRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_repair_faRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_repair_faRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_repair_faRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_repair_serialRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_repair_serialRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_repair_serialRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_repair_serialRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_serialRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_serialRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_serialRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_serialRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_SH_DetailRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_SH_DetailRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_SH_DetailRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_SH_DetailRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_SH_Detail_HistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_SH_Detail_HistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_SH_Detail_HistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_SH_Detail_HistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_SH_HeaderRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_SH_HeaderRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_SH_HeaderRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_SH_HeaderRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class log_SH_Header_HistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As log_SH_Header_HistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As log_SH_Header_HistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As log_SH_Header_HistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class lotNoRowChangeEvent Inherits Global.System.EventArgs Private eventRow As lotNoRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As lotNoRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As lotNoRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class LotNumberRowChangeEvent Inherits Global.System.EventArgs Private eventRow As LotNumberRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As LotNumberRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As LotNumberRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class machineRowChangeEvent Inherits Global.System.EventArgs Private eventRow As machineRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As machineRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As machineRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class machineHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As machineHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As machineHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As machineHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelBackupRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelBackupRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelBackupRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelBackupRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelDimRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelDimRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelDimRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelDimRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelDimHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelDimHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelDimHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelDimHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelFamilyRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelFamilyRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelFamilyRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelFamilyRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelFamilyHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelFamilyHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelFamilyHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelFamilyHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelHierarchyRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelHierarchyRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelHierarchyRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelHierarchyRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelHierarchyHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelHierarchyHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelHierarchyHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelHierarchyHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelRouteRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelRouteRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelRouteRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelRouteRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelRoute_backup_1RowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelRoute_backup_1Row Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelRoute_backup_1Row, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelRoute_backup_1Row Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelRouteHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelRouteHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelRouteHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelRouteHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelTempRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelTempRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelTempRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelTempRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelTypeRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelTypeRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelTypeRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelTypeRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class modelTypeHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As modelTypeHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As modelTypeHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As modelTypeHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class Parts_ListRowChangeEvent Inherits Global.System.EventArgs Private eventRow As Parts_ListRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As Parts_ListRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As Parts_ListRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class partsCodeRowChangeEvent Inherits Global.System.EventArgs Private eventRow As partsCodeRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As partsCodeRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As partsCodeRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class PartsModelRowChangeEvent Inherits Global.System.EventArgs Private eventRow As PartsModelRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As PartsModelRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As PartsModelRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class PartsPrepRowChangeEvent Inherits Global.System.EventArgs Private eventRow As PartsPrepRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As PartsPrepRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As PartsPrepRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class PartsRecordsRowChangeEvent Inherits Global.System.EventArgs Private eventRow As PartsRecordsRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As PartsRecordsRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As PartsRecordsRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class partsStationRowChangeEvent Inherits Global.System.EventArgs Private eventRow As partsStationRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As partsStationRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As partsStationRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class partsSupplierRowChangeEvent Inherits Global.System.EventArgs Private eventRow As partsSupplierRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As partsSupplierRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As partsSupplierRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class po_detailRowChangeEvent Inherits Global.System.EventArgs Private eventRow As po_detailRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As po_detailRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As po_detailRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class po_detail_backupRowChangeEvent Inherits Global.System.EventArgs Private eventRow As po_detail_backupRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As po_detail_backupRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As po_detail_backupRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class po_detail_tempRowChangeEvent Inherits Global.System.EventArgs Private eventRow As po_detail_tempRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As po_detail_tempRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As po_detail_tempRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class po_headerRowChangeEvent Inherits Global.System.EventArgs Private eventRow As po_headerRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As po_headerRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As po_headerRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class po_header_backupRowChangeEvent Inherits Global.System.EventArgs Private eventRow As po_header_backupRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As po_header_backupRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As po_header_backupRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class po_history_detailRowChangeEvent Inherits Global.System.EventArgs Private eventRow As po_history_detailRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As po_history_detailRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As po_history_detailRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class po_orig_detailRowChangeEvent Inherits Global.System.EventArgs Private eventRow As po_orig_detailRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As po_orig_detailRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As po_orig_detailRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class po_orig_headerRowChangeEvent Inherits Global.System.EventArgs Private eventRow As po_orig_headerRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As po_orig_headerRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As po_orig_headerRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class printerRowChangeEvent Inherits Global.System.EventArgs Private eventRow As printerRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As printerRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As printerRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class ptRowChangeEvent Inherits Global.System.EventArgs Private eventRow As ptRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As ptRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As ptRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class pt_HistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As pt_HistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As pt_HistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As pt_HistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class serialAlvarisetRowChangeEvent Inherits Global.System.EventArgs Private eventRow As serialAlvarisetRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As serialAlvarisetRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As serialAlvarisetRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class serialMacRowChangeEvent Inherits Global.System.EventArgs Private eventRow As serialMacRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As serialMacRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As serialMacRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class SHIPPER_REPORT_TABLERowChangeEvent Inherits Global.System.EventArgs Private eventRow As SHIPPER_REPORT_TABLERow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As SHIPPER_REPORT_TABLERow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As SHIPPER_REPORT_TABLERow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class SHIPPER_STATUSRowChangeEvent Inherits Global.System.EventArgs Private eventRow As SHIPPER_STATUSRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As SHIPPER_STATUSRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As SHIPPER_STATUSRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class SHIPPER_SUMMARY_TABLERowChangeEvent Inherits Global.System.EventArgs Private eventRow As SHIPPER_SUMMARY_TABLERow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As SHIPPER_SUMMARY_TABLERow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As SHIPPER_SUMMARY_TABLERow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class stationRowChangeEvent Inherits Global.System.EventArgs Private eventRow As stationRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As stationRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As stationRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class station_convertRowChangeEvent Inherits Global.System.EventArgs Private eventRow As station_convertRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As station_convertRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As station_convertRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class stationHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As stationHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As stationHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As stationHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class usersRowChangeEvent Inherits Global.System.EventArgs Private eventRow As usersRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As usersRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As usersRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class usersHistRowChangeEvent Inherits Global.System.EventArgs Private eventRow As usersHistRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As usersHistRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As usersHistRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class WIP_TEMPRowChangeEvent Inherits Global.System.EventArgs Private eventRow As WIP_TEMPRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As WIP_TEMPRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As WIP_TEMPRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class _CTSB9_00001RowChangeEvent Inherits Global.System.EventArgs Private eventRow As _CTSB9_00001Row Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As _CTSB9_00001Row, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As _CTSB9_00001Row Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class _CTSB9_00002RowChangeEvent Inherits Global.System.EventArgs Private eventRow As _CTSB9_00002Row Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As _CTSB9_00002Row, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As _CTSB9_00002Row Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class getMaxDateRowChangeEvent Inherits Global.System.EventArgs Private eventRow As getMaxDateRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As getMaxDateRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As getMaxDateRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class getMinDateRowChangeEvent Inherits Global.System.EventArgs Private eventRow As getMinDateRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As getMinDateRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As getMinDateRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class Shipper_FileRowChangeEvent Inherits Global.System.EventArgs Private eventRow As Shipper_FileRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As Shipper_FileRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As Shipper_FileRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class Shipper_File_BodyRowChangeEvent Inherits Global.System.EventArgs Private eventRow As Shipper_File_BodyRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As Shipper_File_BodyRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As Shipper_File_BodyRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class Shipper_File_HeaderRowChangeEvent Inherits Global.System.EventArgs Private eventRow As Shipper_File_HeaderRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As Shipper_File_HeaderRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As Shipper_File_HeaderRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class containerRowChangeEvent Inherits Global.System.EventArgs Private eventRow As containerRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As containerRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As containerRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class createViewRowChangeEvent Inherits Global.System.EventArgs Private eventRow As createViewRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As createViewRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As createViewRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class itemRowChangeEvent Inherits Global.System.EventArgs Private eventRow As itemRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As itemRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As itemRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class PORowChangeEvent Inherits Global.System.EventArgs Private eventRow As PORow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As PORow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As PORow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class POLINERowChangeEvent Inherits Global.System.EventArgs Private eventRow As POLINERow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As POLINERow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As POLINERow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class shipAdd1RowChangeEvent Inherits Global.System.EventArgs Private eventRow As shipAdd1Row Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As shipAdd1Row, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As shipAdd1Row Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class shipAdd2RowChangeEvent Inherits Global.System.EventArgs Private eventRow As shipAdd2Row Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As shipAdd2Row, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As shipAdd2Row Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class shipAdd3RowChangeEvent Inherits Global.System.EventArgs Private eventRow As shipAdd3Row Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As shipAdd3Row, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As shipAdd3Row Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class ''' '''Row event argument class ''' _ Public Class validatePOTransferRowChangeEvent Inherits Global.System.EventArgs Private eventRow As validatePOTransferRow Private eventAction As Global.System.Data.DataRowAction _ Public Sub New(ByVal row As validatePOTransferRow, ByVal action As Global.System.Data.DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub _ Public ReadOnly Property Row() As validatePOTransferRow Get Return Me.eventRow End Get End Property _ Public ReadOnly Property Action() As Global.System.Data.DataRowAction Get Return Me.eventAction End Get End Property End Class End Class Namespace EpsonDataSet1TableAdapters ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class AOIQ_TempTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "AOIQ_Temp" tableMapping.ColumnMappings.Add("Stage", "Stage") tableMapping.ColumnMappings.Add("Qty", "Qty") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[AOIQ_Temp] ([Stage], [Qty]) VALUES (@Stage, @Qty)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Qty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Stage, Qty FROM dbo.AOIQ_Temp" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.AOIQ_TempDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.AOIQ_TempDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.AOIQ_TempDataTable = New EpsonDataSet1.AOIQ_TempDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.AOIQ_TempDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "AOIQ_Temp") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal Stage As String, ByVal Qty As Global.System.Nullable(Of Integer)) As Integer If (Stage Is Nothing) Then Throw New Global.System.ArgumentNullException("Stage") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Stage,String) End If If (Qty.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(Qty.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class batchTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "batch" tableMapping.ColumnMappings.Add("batchId", "batchId") tableMapping.ColumnMappings.Add("batchNo", "batchNo") tableMapping.ColumnMappings.Add("partNo", "partNo") tableMapping.ColumnMappings.Add("line", "line") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("prefix", "prefix") tableMapping.ColumnMappings.Add("suffix", "suffix") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[batch] WHERE (([batchId] = @Original_batchId) AND ((@IsNull_ba"& _ "tchNo = 1 AND [batchNo] IS NULL) OR ([batchNo] = @Original_batchNo)) AND ((@IsNu"& _ "ll_partNo = 1 AND [partNo] IS NULL) OR ([partNo] = @Original_partNo)) AND ((@IsN"& _ "ull_line = 1 AND [line] IS NULL) OR ([line] = @Original_line)) AND ((@IsNull_qua"& _ "ntity = 1 AND [quantity] IS NULL) OR ([quantity] = @Original_quantity)) AND ((@I"& _ "sNull_prefix = 1 AND [prefix] IS NULL) OR ([prefix] = @Original_prefix)) AND ((@"& _ "IsNull_suffix = 1 AND [suffix] IS NULL) OR ([suffix] = @Original_suffix)) AND (("& _ "@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Or"& _ "iginal_lastupdatedby)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR"& _ " ([lastupdate] = @Original_lastupdate)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchId", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchId", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_batchNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_partNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_prefix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[batch] ([batchNo], [partNo], [line], [quantity], [prefix], [su"& _ "ffix], [lastupdatedby], [lastupdate]) VALUES (@batchNo, @partNo, @line, @quantit"& _ "y, @prefix, @suffix, @lastupdatedby, @lastupdate);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT batchId, batchNo, par"& _ "tNo, line, quantity, prefix, suffix, lastupdatedby, lastupdate FROM batch WHERE "& _ "(batchId = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[batch] SET [batchNo] = @batchNo, [partNo] = @partNo, [line] = @line"& _ ", [quantity] = @quantity, [prefix] = @prefix, [suffix] = @suffix, [lastupdatedby"& _ "] = @lastupdatedby, [lastupdate] = @lastupdate WHERE (([batchId] = @Original_bat"& _ "chId) AND ((@IsNull_batchNo = 1 AND [batchNo] IS NULL) OR ([batchNo] = @Original"& _ "_batchNo)) AND ((@IsNull_partNo = 1 AND [partNo] IS NULL) OR ([partNo] = @Origin"& _ "al_partNo)) AND ((@IsNull_line = 1 AND [line] IS NULL) OR ([line] = @Original_li"& _ "ne)) AND ((@IsNull_quantity = 1 AND [quantity] IS NULL) OR ([quantity] = @Origin"& _ "al_quantity)) AND ((@IsNull_prefix = 1 AND [prefix] IS NULL) OR ([prefix] = @Ori"& _ "ginal_prefix)) AND ((@IsNull_suffix = 1 AND [suffix] IS NULL) OR ([suffix] = @Or"& _ "iginal_suffix)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR "& _ "([lastupdatedby] = @Original_lastupdatedby)) AND ((@IsNull_lastupdate = 1 AND [l"& _ "astupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT batchId,"& _ " batchNo, partNo, line, quantity, prefix, suffix, lastupdatedby, lastupdate FROM"& _ " batch WHERE (batchId = @batchId)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchId", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchId", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_batchNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_partNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_prefix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchId", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "batchId", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT batchId, batchNo, partNo, line, quantity, prefix, suffix, lastupdatedby, l"& _ "astupdate FROM dbo.batch" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.batchDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.batchDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.batchDataTable = New EpsonDataSet1.batchDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.batchDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "batch") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_batchId As Integer, ByVal Original_batchNo As String, ByVal Original_partNo As String, ByVal Original_line As Global.System.Nullable(Of Integer), ByVal Original_quantity As Global.System.Nullable(Of Integer), ByVal Original_prefix As String, ByVal Original_suffix As Global.System.Nullable(Of Integer), ByVal Original_lastupdatedby As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date)) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_batchId,Integer) If (Original_batchNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_batchNo,String) End If If (Original_partNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_partNo,String) End If If (Original_line.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_line.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_quantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_quantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_prefix Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_prefix,String) End If If (Original_suffix.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_suffix.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_lastupdatedby,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal batchNo As String, ByVal partNo As String, ByVal line As Global.System.Nullable(Of Integer), ByVal quantity As Global.System.Nullable(Of Integer), ByVal prefix As String, ByVal suffix As Global.System.Nullable(Of Integer), ByVal lastupdatedby As String, ByVal lastupdate As Global.System.Nullable(Of Date)) As Integer If (batchNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(batchNo,String) End If If (partNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(partNo,String) End If If (line.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(line.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(quantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (prefix Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(prefix,String) End If If (suffix.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(suffix.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal batchNo As String, _ ByVal partNo As String, _ ByVal line As Global.System.Nullable(Of Integer), _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal prefix As String, _ ByVal suffix As Global.System.Nullable(Of Integer), _ ByVal lastupdatedby As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_batchId As Integer, _ ByVal Original_batchNo As String, _ ByVal Original_partNo As String, _ ByVal Original_line As Global.System.Nullable(Of Integer), _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_prefix As String, _ ByVal Original_suffix As Global.System.Nullable(Of Integer), _ ByVal Original_lastupdatedby As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal batchId As Integer) As Integer If (batchNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(batchNo,String) End If If (partNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(partNo,String) End If If (line.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(line.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (prefix Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(prefix,String) End If If (suffix.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(suffix.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdatedby,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_batchId,Integer) If (Original_batchNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_batchNo,String) End If If (Original_partNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_partNo,String) End If If (Original_line.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_line.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_prefix Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_prefix,String) End If If (Original_suffix.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_suffix.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_lastupdatedby,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(25).Value = CType(batchId,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal batchNo As String, _ ByVal partNo As String, _ ByVal line As Global.System.Nullable(Of Integer), _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal prefix As String, _ ByVal suffix As Global.System.Nullable(Of Integer), _ ByVal lastupdatedby As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_batchId As Integer, _ ByVal Original_batchNo As String, _ ByVal Original_partNo As String, _ ByVal Original_line As Global.System.Nullable(Of Integer), _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_prefix As String, _ ByVal Original_suffix As Global.System.Nullable(Of Integer), _ ByVal Original_lastupdatedby As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date)) As Integer Return Me.Update(batchNo, partNo, line, quantity, prefix, suffix, lastupdatedby, lastupdate, Original_batchId, Original_batchNo, Original_partNo, Original_line, Original_quantity, Original_prefix, Original_suffix, Original_lastupdatedby, Original_lastupdate, Original_batchId) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class cardTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "card" tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("ptno", "ptno") tableMapping.ColumnMappings.Add("lotno", "lotno") tableMapping.ColumnMappings.Add("partno", "partno") tableMapping.ColumnMappings.Add("revision", "revision") tableMapping.ColumnMappings.Add("linecode", "linecode") tableMapping.ColumnMappings.Add("holdflag", "holdflag") tableMapping.ColumnMappings.Add("packflag", "packflag") tableMapping.ColumnMappings.Add("shipflag", "shipflag") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lottype", "lottype") tableMapping.ColumnMappings.Add("curtstage", "curtstage") tableMapping.ColumnMappings.Add("starttime", "starttime") tableMapping.ColumnMappings.Add("starttimeRef", "starttimeRef") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[card] WHERE (([cardno] = @Original_cardno) AND ((@IsNull_seria"& _ "lno = 1 AND [serialno] IS NULL) OR ([serialno] = @Original_serialno)) AND ((@IsN"& _ "ull_ptno = 1 AND [ptno] IS NULL) OR ([ptno] = @Original_ptno)) AND ((@IsNull_lot"& _ "no = 1 AND [lotno] IS NULL) OR ([lotno] = @Original_lotno)) AND ((@IsNull_partno"& _ " = 1 AND [partno] IS NULL) OR ([partno] = @Original_partno)) AND ((@IsNull_revis"& _ "ion = 1 AND [revision] IS NULL) OR ([revision] = @Original_revision)) AND ((@IsN"& _ "ull_linecode = 1 AND [linecode] IS NULL) OR ([linecode] = @Original_linecode)) A"& _ "ND ((@IsNull_holdflag = 1 AND [holdflag] IS NULL) OR ([holdflag] = @Original_hol"& _ "dflag)) AND ((@IsNull_packflag = 1 AND [packflag] IS NULL) OR ([packflag] = @Ori"& _ "ginal_packflag)) AND ((@IsNull_shipflag = 1 AND [shipflag] IS NULL) OR ([shipfla"& _ "g] = @Original_shipflag)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([st"& _ "atus] = @Original_status)) AND ((@IsNull_lottype = 1 AND [lottype] IS NULL) OR ("& _ "[lottype] = @Original_lottype)) AND ((@IsNull_curtstage = 1 AND [curtstage] IS N"& _ "ULL) OR ([curtstage] = @Original_curtstage)) AND ((@IsNull_starttime = 1 AND [st"& _ "arttime] IS NULL) OR ([starttime] = @Original_starttime)) AND ((@IsNull_starttim"& _ "eRef = 1 AND [starttimeRef] IS NULL) OR ([starttimeRef] = @Original_starttimeRef"& _ ")) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Or"& _ "iginal_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL)"& _ " OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lotno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lotno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_partno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_revision", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lottype", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_curtstage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_starttime", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_starttimeRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[card] ([cardno], [serialno], [ptno], [lotno], [partno], [revis"& _ "ion], [linecode], [holdflag], [packflag], [shipflag], [status], [lottype], [curt"& _ "stage], [starttime], [starttimeRef], [lastupdate], [lastupdatedby]) VALUES (@car"& _ "dno, @serialno, @ptno, @lotno, @partno, @revision, @linecode, @holdflag, @packfl"& _ "ag, @shipflag, @status, @lottype, @curtstage, @starttime, @starttimeRef, @lastup"& _ "date, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT cardno, serialno, ptno, lotno, partno, revision, "& _ "linecode, holdflag, packflag, shipflag, status, lottype, curtstage, starttime, s"& _ "tarttimeRef, lastupdate, lastupdatedby FROM card WHERE (cardno = @cardno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lotno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[card] SET [cardno] = @cardno, [serialno] = @serialno, [ptno] = @ptn"& _ "o, [lotno] = @lotno, [partno] = @partno, [revision] = @revision, [linecode] = @l"& _ "inecode, [holdflag] = @holdflag, [packflag] = @packflag, [shipflag] = @shipflag,"& _ " [status] = @status, [lottype] = @lottype, [curtstage] = @curtstage, [starttime]"& _ " = @starttime, [starttimeRef] = @starttimeRef, [lastupdate] = @lastupdate, [last"& _ "updatedby] = @lastupdatedby WHERE (([cardno] = @Original_cardno) AND ((@IsNull_s"& _ "erialno = 1 AND [serialno] IS NULL) OR ([serialno] = @Original_serialno)) AND (("& _ "@IsNull_ptno = 1 AND [ptno] IS NULL) OR ([ptno] = @Original_ptno)) AND ((@IsNull"& _ "_lotno = 1 AND [lotno] IS NULL) OR ([lotno] = @Original_lotno)) AND ((@IsNull_pa"& _ "rtno = 1 AND [partno] IS NULL) OR ([partno] = @Original_partno)) AND ((@IsNull_r"& _ "evision = 1 AND [revision] IS NULL) OR ([revision] = @Original_revision)) AND (("& _ "@IsNull_linecode = 1 AND [linecode] IS NULL) OR ([linecode] = @Original_linecode"& _ ")) AND ((@IsNull_holdflag = 1 AND [holdflag] IS NULL) OR ([holdflag] = @Original"& _ "_holdflag)) AND ((@IsNull_packflag = 1 AND [packflag] IS NULL) OR ([packflag] = "& _ "@Original_packflag)) AND ((@IsNull_shipflag = 1 AND [shipflag] IS NULL) OR ([shi"& _ "pflag] = @Original_shipflag)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR "& _ "([status] = @Original_status)) AND ((@IsNull_lottype = 1 AND [lottype] IS NULL) "& _ "OR ([lottype] = @Original_lottype)) AND ((@IsNull_curtstage = 1 AND [curtstage] "& _ "IS NULL) OR ([curtstage] = @Original_curtstage)) AND ((@IsNull_starttime = 1 AND"& _ " [starttime] IS NULL) OR ([starttime] = @Original_starttime)) AND ((@IsNull_star"& _ "ttimeRef = 1 AND [starttimeRef] IS NULL) OR ([starttimeRef] = @Original_starttim"& _ "eRef)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] ="& _ " @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS N"& _ "ULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT cardno, serialno,"& _ " ptno, lotno, partno, revision, linecode, holdflag, packflag, shipflag, status, "& _ "lottype, curtstage, starttime, starttimeRef, lastupdate, lastupdatedby FROM card"& _ " WHERE (cardno = @cardno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lotno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lotno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lotno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_partno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_revision", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lottype", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_curtstage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_starttime", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_starttimeRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cardno, serialno, ptno, lotno, partno, revision, linecode, holdflag, packf"& _ "lag, shipflag, status, lottype, curtstage, starttime, starttimeRef, lastupdate, "& _ "lastupdatedby FROM dbo.card" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.cardDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.cardDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.cardDataTable = New EpsonDataSet1.cardDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.cardDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "card") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete( _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_ptno As String, _ ByVal Original_lotno As String, _ ByVal Original_partno As String, _ ByVal Original_revision As String, _ ByVal Original_linecode As Global.System.Nullable(Of Integer), _ ByVal Original_holdflag As Global.System.Nullable(Of Integer), _ ByVal Original_packflag As Global.System.Nullable(Of Integer), _ ByVal Original_shipflag As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lottype As String, _ ByVal Original_curtstage As String, _ ByVal Original_starttime As Global.System.Nullable(Of Date), _ ByVal Original_starttimeRef As Global.System.Nullable(Of Date), _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer If (Original_cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_cardno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_serialno,String) End If If (Original_ptno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_ptno,String) End If If (Original_lotno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lotno,String) End If If (Original_partno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_partno,String) End If If (Original_revision Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_revision,String) End If If (Original_linecode.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_linecode.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_holdflag.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_holdflag.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_packflag.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_packflag.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_shipflag.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_shipflag.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_status,String) End If If (Original_lottype Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_lottype,String) End If If (Original_curtstage Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = CType(Original_curtstage,String) End If If (Original_starttime.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = CType(Original_starttime.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = Global.System.DBNull.Value End If If (Original_starttimeRef.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = CType(Original_starttimeRef.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(30).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(30).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(31).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(32).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(31).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(32).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal ptno As String, _ ByVal lotno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Global.System.Nullable(Of Integer), _ ByVal holdflag As Global.System.Nullable(Of Integer), _ ByVal packflag As Global.System.Nullable(Of Integer), _ ByVal shipflag As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Global.System.Nullable(Of Date), _ ByVal starttimeRef As Global.System.Nullable(Of Date), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("cardno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialno,String) End If If (ptno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(ptno,String) End If If (lotno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lotno,String) End If If (partno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(partno,String) End If If (revision Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(revision,String) End If If (linecode.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(linecode.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (holdflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(holdflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (packflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(packflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (shipflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(shipflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(status,String) End If If (lottype Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(lottype,String) End If If (curtstage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(curtstage,String) End If If (starttime.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(13).Value = CType(starttime.Value,Date) Else Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (starttimeRef.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(14).Value = CType(starttimeRef.Value,Date) Else Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal ptno As String, _ ByVal lotno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Global.System.Nullable(Of Integer), _ ByVal holdflag As Global.System.Nullable(Of Integer), _ ByVal packflag As Global.System.Nullable(Of Integer), _ ByVal shipflag As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Global.System.Nullable(Of Date), _ ByVal starttimeRef As Global.System.Nullable(Of Date), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_ptno As String, _ ByVal Original_lotno As String, _ ByVal Original_partno As String, _ ByVal Original_revision As String, _ ByVal Original_linecode As Global.System.Nullable(Of Integer), _ ByVal Original_holdflag As Global.System.Nullable(Of Integer), _ ByVal Original_packflag As Global.System.Nullable(Of Integer), _ ByVal Original_shipflag As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lottype As String, _ ByVal Original_curtstage As String, _ ByVal Original_starttime As Global.System.Nullable(Of Date), _ ByVal Original_starttimeRef As Global.System.Nullable(Of Date), _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer If (cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("cardno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(serialno,String) End If If (ptno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(ptno,String) End If If (lotno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lotno,String) End If If (partno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(partno,String) End If If (revision Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(revision,String) End If If (linecode.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(linecode.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (holdflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(holdflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (packflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(packflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (shipflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(shipflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(status,String) End If If (lottype Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(lottype,String) End If If (curtstage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(curtstage,String) End If If (starttime.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(starttime.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (starttimeRef.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(starttimeRef.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(lastupdatedby,String) End If If (Original_cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_cardno") Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_serialno,String) End If If (Original_ptno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_ptno,String) End If If (Original_lotno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_lotno,String) End If If (Original_partno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(24).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(24).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = CType(Original_partno,String) End If If (Original_revision Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(26).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(26).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = CType(Original_revision,String) End If If (Original_linecode.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(28).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = CType(Original_linecode.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(28).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = Global.System.DBNull.Value End If If (Original_holdflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(30).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = CType(Original_holdflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(30).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = Global.System.DBNull.Value End If If (Original_packflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(32).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(33).Value = CType(Original_packflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(32).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(33).Value = Global.System.DBNull.Value End If If (Original_shipflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(34).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(35).Value = CType(Original_shipflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(34).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(35).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(36).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(37).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(36).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(37).Value = CType(Original_status,String) End If If (Original_lottype Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(38).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(39).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(38).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(39).Value = CType(Original_lottype,String) End If If (Original_curtstage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(40).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(41).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(40).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(41).Value = CType(Original_curtstage,String) End If If (Original_starttime.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(42).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(43).Value = CType(Original_starttime.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(42).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(43).Value = Global.System.DBNull.Value End If If (Original_starttimeRef.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(44).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(45).Value = CType(Original_starttimeRef.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(44).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(45).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(46).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(47).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(46).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(47).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(48).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(49).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(48).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(49).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal serialno As String, _ ByVal ptno As String, _ ByVal lotno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Global.System.Nullable(Of Integer), _ ByVal holdflag As Global.System.Nullable(Of Integer), _ ByVal packflag As Global.System.Nullable(Of Integer), _ ByVal shipflag As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Global.System.Nullable(Of Date), _ ByVal starttimeRef As Global.System.Nullable(Of Date), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_ptno As String, _ ByVal Original_lotno As String, _ ByVal Original_partno As String, _ ByVal Original_revision As String, _ ByVal Original_linecode As Global.System.Nullable(Of Integer), _ ByVal Original_holdflag As Global.System.Nullable(Of Integer), _ ByVal Original_packflag As Global.System.Nullable(Of Integer), _ ByVal Original_shipflag As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lottype As String, _ ByVal Original_curtstage As String, _ ByVal Original_starttime As Global.System.Nullable(Of Date), _ ByVal Original_starttimeRef As Global.System.Nullable(Of Date), _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_cardno, serialno, ptno, lotno, partno, revision, linecode, holdflag, packflag, shipflag, status, lottype, curtstage, starttime, starttimeRef, lastupdate, lastupdatedby, Original_cardno, Original_serialno, Original_ptno, Original_lotno, Original_partno, Original_revision, Original_linecode, Original_holdflag, Original_packflag, Original_shipflag, Original_status, Original_lottype, Original_curtstage, Original_starttime, Original_starttimeRef, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class card_backupTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "card_backup" tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("ptno", "ptno") tableMapping.ColumnMappings.Add("lotno", "lotno") tableMapping.ColumnMappings.Add("partno", "partno") tableMapping.ColumnMappings.Add("revision", "revision") tableMapping.ColumnMappings.Add("linecode", "linecode") tableMapping.ColumnMappings.Add("holdflag", "holdflag") tableMapping.ColumnMappings.Add("packflag", "packflag") tableMapping.ColumnMappings.Add("shipflag", "shipflag") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lottype", "lottype") tableMapping.ColumnMappings.Add("curtstage", "curtstage") tableMapping.ColumnMappings.Add("starttime", "starttime") tableMapping.ColumnMappings.Add("starttimeRef", "starttimeRef") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[card_backup] ([cardno], [serialno], [ptno], [lotno], [partno],"& _ " [revision], [linecode], [holdflag], [packflag], [shipflag], [status], [lottype]"& _ ", [curtstage], [starttime], [starttimeRef], [lastupdate], [lastupdatedby]) VALUE"& _ "S (@cardno, @serialno, @ptno, @lotno, @partno, @revision, @linecode, @holdflag, "& _ "@packflag, @shipflag, @status, @lottype, @curtstage, @starttime, @starttimeRef, "& _ "@lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lotno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cardno, serialno, ptno, lotno, partno, revision, linecode, holdflag, packf"& _ "lag, shipflag, status, lottype, curtstage, starttime, starttimeRef, lastupdate, "& _ "lastupdatedby FROM dbo.card_backup" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.card_backupDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.card_backupDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.card_backupDataTable = New EpsonDataSet1.card_backupDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.card_backupDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "card_backup") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal ptno As String, _ ByVal lotno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Global.System.Nullable(Of Integer), _ ByVal holdflag As Global.System.Nullable(Of Integer), _ ByVal packflag As Global.System.Nullable(Of Integer), _ ByVal shipflag As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Global.System.Nullable(Of Date), _ ByVal starttimeRef As Global.System.Nullable(Of Date), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("cardno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialno,String) End If If (ptno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(ptno,String) End If If (lotno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lotno,String) End If If (partno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(partno,String) End If If (revision Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(revision,String) End If If (linecode.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(linecode.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (holdflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(holdflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (packflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(packflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (shipflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(shipflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(status,String) End If If (lottype Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(lottype,String) End If If (curtstage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(curtstage,String) End If If (starttime.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(13).Value = CType(starttime.Value,Date) Else Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (starttimeRef.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(14).Value = CType(starttimeRef.Value,Date) Else Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class card_HistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "card_Hist" tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("ptno", "ptno") tableMapping.ColumnMappings.Add("lotno", "lotno") tableMapping.ColumnMappings.Add("partno", "partno") tableMapping.ColumnMappings.Add("revision", "revision") tableMapping.ColumnMappings.Add("linecode", "linecode") tableMapping.ColumnMappings.Add("holdflag", "holdflag") tableMapping.ColumnMappings.Add("packflag", "packflag") tableMapping.ColumnMappings.Add("shipflag", "shipflag") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lottype", "lottype") tableMapping.ColumnMappings.Add("curtstage", "curtstage") tableMapping.ColumnMappings.Add("starttime", "starttime") tableMapping.ColumnMappings.Add("starttimeRef", "starttimeRef") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[card_Hist] ([cardno], [serialno], [ptno], [lotno], [partno], ["& _ "revision], [linecode], [holdflag], [packflag], [shipflag], [status], [lottype], "& _ "[curtstage], [starttime], [starttimeRef], [lastupdate], [lastupdatedby]) VALUES "& _ "(@cardno, @serialno, @ptno, @lotno, @partno, @revision, @linecode, @holdflag, @p"& _ "ackflag, @shipflag, @status, @lottype, @curtstage, @starttime, @starttimeRef, @l"& _ "astupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lotno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cardno, serialno, ptno, lotno, partno, revision, linecode, holdflag, packf"& _ "lag, shipflag, status, lottype, curtstage, starttime, starttimeRef, lastupdate, "& _ "lastupdatedby FROM dbo.card_Hist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.card_HistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.card_HistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.card_HistDataTable = New EpsonDataSet1.card_HistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.card_HistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "card_Hist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal ptno As String, _ ByVal lotno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Global.System.Nullable(Of Integer), _ ByVal holdflag As Global.System.Nullable(Of Integer), _ ByVal packflag As Global.System.Nullable(Of Integer), _ ByVal shipflag As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Global.System.Nullable(Of Date), _ ByVal starttimeRef As Global.System.Nullable(Of Date), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialno,String) End If If (ptno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(ptno,String) End If If (lotno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lotno,String) End If If (partno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(partno,String) End If If (revision Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(revision,String) End If If (linecode.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(linecode.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (holdflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(holdflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (packflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(packflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (shipflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(shipflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(status,String) End If If (lottype Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(lottype,String) End If If (curtstage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(curtstage,String) End If If (starttime.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(13).Value = CType(starttime.Value,Date) Else Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (starttimeRef.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(14).Value = CType(starttimeRef.Value,Date) Else Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class cardHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "cardHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("partno", "partno") tableMapping.ColumnMappings.Add("revision", "revision") tableMapping.ColumnMappings.Add("linecode", "linecode") tableMapping.ColumnMappings.Add("holdflag", "holdflag") tableMapping.ColumnMappings.Add("packflag", "packflag") tableMapping.ColumnMappings.Add("shipflag", "shipflag") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lottype", "lottype") tableMapping.ColumnMappings.Add("curtstage", "curtstage") tableMapping.ColumnMappings.Add("starttime", "starttime") tableMapping.ColumnMappings.Add("starttimeRef", "starttimeRef") tableMapping.ColumnMappings.Add("action", "action") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[cardHist] WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull"& _ "_cardno = 1 AND [cardno] IS NULL) OR ([cardno] = @Original_cardno)) AND ((@IsNul"& _ "l_serialno = 1 AND [serialno] IS NULL) OR ([serialno] = @Original_serialno)) AND"& _ " ((@IsNull_partno = 1 AND [partno] IS NULL) OR ([partno] = @Original_partno)) AN"& _ "D ((@IsNull_revision = 1 AND [revision] IS NULL) OR ([revision] = @Original_revi"& _ "sion)) AND ((@IsNull_linecode = 1 AND [linecode] IS NULL) OR ([linecode] = @Orig"& _ "inal_linecode)) AND ((@IsNull_holdflag = 1 AND [holdflag] IS NULL) OR ([holdflag"& _ "] = @Original_holdflag)) AND ((@IsNull_packflag = 1 AND [packflag] IS NULL) OR ("& _ "[packflag] = @Original_packflag)) AND ((@IsNull_shipflag = 1 AND [shipflag] IS N"& _ "ULL) OR ([shipflag] = @Original_shipflag)) AND ((@IsNull_status = 1 AND [status]"& _ " IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lottype = 1 AND [lotty"& _ "pe] IS NULL) OR ([lottype] = @Original_lottype)) AND ((@IsNull_curtstage = 1 AND"& _ " [curtstage] IS NULL) OR ([curtstage] = @Original_curtstage)) AND ((@IsNull_star"& _ "ttime = 1 AND [starttime] IS NULL) OR ([starttime] = @Original_starttime)) AND ("& _ "(@IsNull_starttimeRef = 1 AND [starttimeRef] IS NULL) OR ([starttimeRef] = @Orig"& _ "inal_starttimeRef)) AND ((@IsNull_action = 1 AND [action] IS NULL) OR ([action] "& _ "= @Original_action)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ("& _ "[lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastu"& _ "pdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_partno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_revision", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lottype", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_curtstage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_starttime", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_starttimeRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_action", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "action", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_action", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "action", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[cardHist] ([cardno], [serialno], [partno], [revision], [lineco"& _ "de], [holdflag], [packflag], [shipflag], [status], [lottype], [curtstage], [star"& _ "ttime], [starttimeRef], [action], [lastupdate], [lastupdatedby]) VALUES (@cardno"& _ ", @serialno, @partno, @revision, @linecode, @holdflag, @packflag, @shipflag, @st"& _ "atus, @lottype, @curtstage, @starttime, @starttimeRef, @action, @lastupdate, @la"& _ "stupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, cardno, serialno, partno, revision, linecode, hol"& _ "dflag, packflag, shipflag, status, lottype, curtstage, starttime, starttimeRef, "& _ "action, lastupdate, lastupdatedby FROM cardHist WHERE (lineNum = SCOPE_IDENTITY("& _ "))" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@action", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "action", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[cardHist] SET [cardno] = @cardno, [serialno] = @serialno, [partno] "& _ "= @partno, [revision] = @revision, [linecode] = @linecode, [holdflag] = @holdfla"& _ "g, [packflag] = @packflag, [shipflag] = @shipflag, [status] = @status, [lottype]"& _ " = @lottype, [curtstage] = @curtstage, [starttime] = @starttime, [starttimeRef] "& _ "= @starttimeRef, [action] = @action, [lastupdate] = @lastupdate, [lastupdatedby]"& _ " = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull_cardno = "& _ "1 AND [cardno] IS NULL) OR ([cardno] = @Original_cardno)) AND ((@IsNull_serialno"& _ " = 1 AND [serialno] IS NULL) OR ([serialno] = @Original_serialno)) AND ((@IsNull"& _ "_partno = 1 AND [partno] IS NULL) OR ([partno] = @Original_partno)) AND ((@IsNul"& _ "l_revision = 1 AND [revision] IS NULL) OR ([revision] = @Original_revision)) AND"& _ " ((@IsNull_linecode = 1 AND [linecode] IS NULL) OR ([linecode] = @Original_linec"& _ "ode)) AND ((@IsNull_holdflag = 1 AND [holdflag] IS NULL) OR ([holdflag] = @Origi"& _ "nal_holdflag)) AND ((@IsNull_packflag = 1 AND [packflag] IS NULL) OR ([packflag]"& _ " = @Original_packflag)) AND ((@IsNull_shipflag = 1 AND [shipflag] IS NULL) OR (["& _ "shipflag] = @Original_shipflag)) AND ((@IsNull_status = 1 AND [status] IS NULL) "& _ "OR ([status] = @Original_status)) AND ((@IsNull_lottype = 1 AND [lottype] IS NUL"& _ "L) OR ([lottype] = @Original_lottype)) AND ((@IsNull_curtstage = 1 AND [curtstag"& _ "e] IS NULL) OR ([curtstage] = @Original_curtstage)) AND ((@IsNull_starttime = 1 "& _ "AND [starttime] IS NULL) OR ([starttime] = @Original_starttime)) AND ((@IsNull_s"& _ "tarttimeRef = 1 AND [starttimeRef] IS NULL) OR ([starttimeRef] = @Original_start"& _ "timeRef)) AND ((@IsNull_action = 1 AND [action] IS NULL) OR ([action] = @Origina"& _ "l_action)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdat"& _ "e] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] "& _ "IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, card"& _ "no, serialno, partno, revision, linecode, holdflag, packflag, shipflag, status, "& _ "lottype, curtstage, starttime, starttimeRef, action, lastupdate, lastupdatedby F"& _ "ROM cardHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@action", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "action", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_partno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_revision", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_linecode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "linecode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_holdflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "holdflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_packflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipflag", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipflag", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lottype", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lottype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lottype", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_curtstage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_curtstage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_starttime", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_starttimeRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_starttimeRef", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttimeRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_action", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "action", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_action", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "action", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, cardno, serialno, partno, revision, linecode, holdflag, packflag,"& _ " shipflag, status, lottype, curtstage, starttime, starttimeRef, action, lastupda"& _ "te, lastupdatedby FROM dbo.cardHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.cardHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.cardHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.cardHistDataTable = New EpsonDataSet1.cardHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.cardHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "cardHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete( _ ByVal Original_lineNum As Long, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_partno As String, _ ByVal Original_revision As String, _ ByVal Original_linecode As Global.System.Nullable(Of Integer), _ ByVal Original_holdflag As Global.System.Nullable(Of Integer), _ ByVal Original_packflag As Global.System.Nullable(Of Integer), _ ByVal Original_shipflag As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lottype As String, _ ByVal Original_curtstage As String, _ ByVal Original_starttime As Global.System.Nullable(Of Date), _ ByVal Original_starttimeRef As Global.System.Nullable(Of Date), _ ByVal Original_action As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_cardno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_serialno,String) End If If (Original_partno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_partno,String) End If If (Original_revision Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_revision,String) End If If (Original_linecode.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_linecode.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_holdflag.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_holdflag.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_packflag.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_packflag.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_shipflag.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_shipflag.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_status,String) End If If (Original_lottype Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_lottype,String) End If If (Original_curtstage Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_curtstage,String) End If If (Original_starttime.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = CType(Original_starttime.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = Global.System.DBNull.Value End If If (Original_starttimeRef.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = CType(Original_starttimeRef.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = Global.System.DBNull.Value End If If (Original_action Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = CType(Original_action,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(30).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(30).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(31).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(32).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(31).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(32).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Global.System.Nullable(Of Integer), _ ByVal holdflag As Global.System.Nullable(Of Integer), _ ByVal packflag As Global.System.Nullable(Of Integer), _ ByVal shipflag As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Global.System.Nullable(Of Date), _ ByVal starttimeRef As Global.System.Nullable(Of Date), _ ByVal action As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialno,String) End If If (partno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(partno,String) End If If (revision Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(revision,String) End If If (linecode.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(linecode.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (holdflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(holdflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (packflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(packflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (shipflag.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(shipflag.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(status,String) End If If (lottype Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(lottype,String) End If If (curtstage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(curtstage,String) End If If (starttime.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(11).Value = CType(starttime.Value,Date) Else Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (starttimeRef.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(12).Value = CType(starttimeRef.Value,Date) Else Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (action Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(action,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(14).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(15).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Global.System.Nullable(Of Integer), _ ByVal holdflag As Global.System.Nullable(Of Integer), _ ByVal packflag As Global.System.Nullable(Of Integer), _ ByVal shipflag As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Global.System.Nullable(Of Date), _ ByVal starttimeRef As Global.System.Nullable(Of Date), _ ByVal action As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_partno As String, _ ByVal Original_revision As String, _ ByVal Original_linecode As Global.System.Nullable(Of Integer), _ ByVal Original_holdflag As Global.System.Nullable(Of Integer), _ ByVal Original_packflag As Global.System.Nullable(Of Integer), _ ByVal Original_shipflag As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lottype As String, _ ByVal Original_curtstage As String, _ ByVal Original_starttime As Global.System.Nullable(Of Date), _ ByVal Original_starttimeRef As Global.System.Nullable(Of Date), _ ByVal Original_action As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (cardno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(serialno,String) End If If (partno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(partno,String) End If If (revision Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(revision,String) End If If (linecode.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(linecode.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (holdflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(holdflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (packflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(packflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (shipflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(shipflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(status,String) End If If (lottype Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(lottype,String) End If If (curtstage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(curtstage,String) End If If (starttime.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(starttime.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (starttimeRef.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(starttimeRef.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (action Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(action,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lineNum,Long) If (Original_cardno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_serialno,String) End If If (Original_partno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_partno,String) End If If (Original_revision Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_revision,String) End If If (Original_linecode.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = CType(Original_linecode.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = Global.System.DBNull.Value End If If (Original_holdflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = CType(Original_holdflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = Global.System.DBNull.Value End If If (Original_packflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = CType(Original_packflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = Global.System.DBNull.Value End If If (Original_shipflag.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(31).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(32).Value = CType(Original_shipflag.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(31).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(32).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(33).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(34).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(33).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(34).Value = CType(Original_status,String) End If If (Original_lottype Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(35).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(36).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(35).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(36).Value = CType(Original_lottype,String) End If If (Original_curtstage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(37).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(38).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(37).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(38).Value = CType(Original_curtstage,String) End If If (Original_starttime.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(39).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(40).Value = CType(Original_starttime.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(39).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(40).Value = Global.System.DBNull.Value End If If (Original_starttimeRef.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(41).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(42).Value = CType(Original_starttimeRef.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(41).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(42).Value = Global.System.DBNull.Value End If If (Original_action Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(43).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(44).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(43).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(44).Value = CType(Original_action,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(45).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(46).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(45).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(46).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(47).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(48).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(47).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(48).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(49).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal partno As String, _ ByVal revision As String, _ ByVal linecode As Global.System.Nullable(Of Integer), _ ByVal holdflag As Global.System.Nullable(Of Integer), _ ByVal packflag As Global.System.Nullable(Of Integer), _ ByVal shipflag As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lottype As String, _ ByVal curtstage As String, _ ByVal starttime As Global.System.Nullable(Of Date), _ ByVal starttimeRef As Global.System.Nullable(Of Date), _ ByVal action As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_partno As String, _ ByVal Original_revision As String, _ ByVal Original_linecode As Global.System.Nullable(Of Integer), _ ByVal Original_holdflag As Global.System.Nullable(Of Integer), _ ByVal Original_packflag As Global.System.Nullable(Of Integer), _ ByVal Original_shipflag As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lottype As String, _ ByVal Original_curtstage As String, _ ByVal Original_starttime As Global.System.Nullable(Of Date), _ ByVal Original_starttimeRef As Global.System.Nullable(Of Date), _ ByVal Original_action As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(cardno, serialno, partno, revision, linecode, holdflag, packflag, shipflag, status, lottype, curtstage, starttime, starttimeRef, action, lastupdate, lastupdatedby, Original_lineNum, Original_cardno, Original_serialno, Original_partno, Original_revision, Original_linecode, Original_holdflag, Original_packflag, Original_shipflag, Original_status, Original_lottype, Original_curtstage, Original_starttime, Original_starttimeRef, Original_action, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class component_partsTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "component_parts" tableMapping.ColumnMappings.Add("parent", "parent") tableMapping.ColumnMappings.Add("component", "component") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[component_parts] ([parent], [component]) VALUES (@parent, @com"& _ "ponent)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@parent", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "parent", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@component", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT parent, component FROM dbo.component_parts" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.component_partsDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.component_partsDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.component_partsDataTable = New EpsonDataSet1.component_partsDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.component_partsDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "component_parts") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal parent As String, ByVal component As String) As Integer If (parent Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(parent,String) End If If (component Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(component,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class CTSTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "CTS" tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("location", "location") tableMapping.ColumnMappings.Add("partno", "partno") tableMapping.ColumnMappings.Add("lotnumber", "lotnumber") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CTS] ([serialno], [location], [partno], [lotnumber], [lastupda"& _ "te], [lastupdatedby]) VALUES (@serialno, @location, @partno, @lotnumber, @lastup"& _ "date, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@location", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lotnumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotnumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT serialno, location, partno, lotnumber, lastupdate, lastupdatedby FROM dbo."& _ "CTS" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.CTSDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.CTSDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.CTSDataTable = New EpsonDataSet1.CTSDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.CTSDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "CTS") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal serialno As String, ByVal location As String, ByVal partno As String, ByVal lotnumber As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(serialno,String) End If If (location Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(location,String) End If If (partno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(partno,String) End If If (lotnumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lotnumber,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class defectCatProdTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "defectCatProd" tableMapping.ColumnMappings.Add("defectCatCode", "defectCatCode") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[defectCatProd] WHERE (([defectCatCode] = @Original_defectCatCo"& _ "de) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] ="& _ " @Original_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([act"& _ "ive] = @Original_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL)"& _ " OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND ["& _ "lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[defectCatProd] ([defectCatCode], [description], [active], [las"& _ "tupdate], [lastupdatedby]) VALUES (@defectCatCode, @description, @active, @lastu"& _ "pdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT defectCatCode, description, active, lastupdate, "& _ "lastupdatedby FROM defectCatProd WHERE (defectCatCode = @defectCatCode)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[defectCatProd] SET [defectCatCode] = @defectCatCode, [description] "& _ "= @description, [active] = @active, [lastupdate] = @lastupdate, [lastupdatedby] "& _ "= @lastupdatedby WHERE (([defectCatCode] = @Original_defectCatCode) AND ((@IsNul"& _ "l_description = 1 AND [description] IS NULL) OR ([description] = @Original_descr"& _ "iption)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original"& _ "_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate"& _ "] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] I"& _ "S NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT defectCatCode,"& _ " description, active, lastupdate, lastupdatedby FROM defectCatProd WHERE (defect"& _ "CatCode = @defectCatCode)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT defectCatCode, description, active, lastupdate, lastupdatedby FROM dbo.def"& _ "ectCatProd" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.defectCatProdDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.defectCatProdDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.defectCatProdDataTable = New EpsonDataSet1.defectCatProdDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.defectCatProdDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "defectCatProd") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_defectCatCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_defectCatCode") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_defectCatCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (defectCatCode Is Nothing) Then Throw New Global.System.ArgumentNullException("defectCatCode") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(defectCatCode,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (defectCatCode Is Nothing) Then Throw New Global.System.ArgumentNullException("defectCatCode") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(defectCatCode,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If If (Original_defectCatCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_defectCatCode") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_defectCatCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_defectCatCode, description, active, lastupdate, lastupdatedby, Original_defectCatCode, Original_description, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class defectCatProdHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "defectCatProdHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("defectCatCode", "defectCatCode") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[defectCatProdHist] WHERE (([lineNum] = @Original_lineNum) AND "& _ "((@IsNull_defectCatCode = 1 AND [defectCatCode] IS NULL) OR ([defectCatCode] = @"& _ "Original_defectCatCode)) AND ((@IsNull_description = 1 AND [description] IS NULL"& _ ") OR ([description] = @Original_description)) AND ((@IsNull_active = 1 AND [acti"& _ "ve] IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_status = 1 AND [sta"& _ "tus] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND"& _ " [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_l"& _ "astupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_la"& _ "stupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defectCatCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[defectCatProdHist] ([defectCatCode], [description], [active], "& _ "[status], [lastupdate], [lastupdatedby]) VALUES (@defectCatCode, @description, @"& _ "active, @status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, defectCatCode, d"& _ "escription, active, status, lastupdate, lastupdatedby FROM defectCatProdHist WHE"& _ "RE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[defectCatProdHist] SET [defectCatCode] = @defectCatCode, [descripti"& _ "on] = @description, [active] = @active, [status] = @status, [lastupdate] = @last"& _ "update, [lastupdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) "& _ "AND ((@IsNull_defectCatCode = 1 AND [defectCatCode] IS NULL) OR ([defectCatCode]"& _ " = @Original_defectCatCode)) AND ((@IsNull_description = 1 AND [description] IS "& _ "NULL) OR ([description] = @Original_description)) AND ((@IsNull_active = 1 AND ["& _ "active] IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_status = 1 AND "& _ "[status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1"& _ " AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNu"& _ "ll_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Origina"& _ "l_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, defectCatCode, description, active, status,"& _ " lastupdate, lastupdatedby FROM defectCatProdHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defectCatCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, defectCatCode, description, active, status, lastupdate, lastupdat"& _ "edby FROM dbo.defectCatProdHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.defectCatProdHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.defectCatProdHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.defectCatProdHistDataTable = New EpsonDataSet1.defectCatProdHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.defectCatProdHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "defectCatProdHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_defectCatCode Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_defectCatCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (defectCatCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(defectCatCode,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (defectCatCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(defectCatCode,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_defectCatCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_defectCatCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(defectCatCode, description, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_defectCatCode, Original_description, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class defectCatQCTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "defectCatQC" tableMapping.ColumnMappings.Add("defectCatCode", "defectCatCode") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[defectCatQC] WHERE (([defectCatCode] = @Original_defectCatCode"& _ ") AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @"& _ "Original_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([activ"& _ "e] = @Original_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) O"& _ "R ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [la"& _ "stupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[defectCatQC] ([defectCatCode], [description], [active], [lastu"& _ "pdate], [lastupdatedby]) VALUES (@defectCatCode, @description, @active, @lastupd"& _ "ate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT defectCatCode, description, active, lastupdate, la"& _ "stupdatedby FROM defectCatQC WHERE (defectCatCode = @defectCatCode)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[defectCatQC] SET [defectCatCode] = @defectCatCode, [description] = "& _ "@description, [active] = @active, [lastupdate] = @lastupdate, [lastupdatedby] = "& _ "@lastupdatedby WHERE (([defectCatCode] = @Original_defectCatCode) AND ((@IsNull_"& _ "description = 1 AND [description] IS NULL) OR ([description] = @Original_descrip"& _ "tion)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_a"& _ "ctive)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] "& _ "= @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS "& _ "NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT defectCatCode, d"& _ "escription, active, lastupdate, lastupdatedby FROM defectCatQC WHERE (defectCatC"& _ "ode = @defectCatCode)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT defectCatCode, description, active, lastupdate, lastupdatedby FROM dbo.def"& _ "ectCatQC" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.defectCatQCDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.defectCatQCDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.defectCatQCDataTable = New EpsonDataSet1.defectCatQCDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.defectCatQCDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "defectCatQC") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_defectCatCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_defectCatCode") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_defectCatCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (defectCatCode Is Nothing) Then Throw New Global.System.ArgumentNullException("defectCatCode") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(defectCatCode,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (defectCatCode Is Nothing) Then Throw New Global.System.ArgumentNullException("defectCatCode") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(defectCatCode,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If If (Original_defectCatCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_defectCatCode") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_defectCatCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_defectCatCode, description, active, lastupdate, lastupdatedby, Original_defectCatCode, Original_description, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class defectCatQCHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "defectCatQCHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("defectCatCode", "defectCatCode") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[defectCatQCHist] WHERE (([lineNum] = @Original_lineNum) AND (("& _ "@IsNull_defectCatCode = 1 AND [defectCatCode] IS NULL) OR ([defectCatCode] = @Or"& _ "iginal_defectCatCode)) AND ((@IsNull_description = 1 AND [description] IS NULL) "& _ "OR ([description] = @Original_description)) AND ((@IsNull_active = 1 AND [active"& _ "] IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_status = 1 AND [statu"& _ "s] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND ["& _ "lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_las"& _ "tupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_last"& _ "updatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defectCatCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[defectCatQCHist] ([defectCatCode], [description], [active], [s"& _ "tatus], [lastupdate], [lastupdatedby]) VALUES (@defectCatCode, @description, @ac"& _ "tive, @status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, defectCatCode, des"& _ "cription, active, status, lastupdate, lastupdatedby FROM defectCatQCHist WHERE ("& _ "lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[defectCatQCHist] SET [defectCatCode] = @defectCatCode, [description"& _ "] = @description, [active] = @active, [status] = @status, [lastupdate] = @lastup"& _ "date, [lastupdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AN"& _ "D ((@IsNull_defectCatCode = 1 AND [defectCatCode] IS NULL) OR ([defectCatCode] ="& _ " @Original_defectCatCode)) AND ((@IsNull_description = 1 AND [description] IS NU"& _ "LL) OR ([description] = @Original_description)) AND ((@IsNull_active = 1 AND [ac"& _ "tive] IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_status = 1 AND [s"& _ "tatus] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 A"& _ "ND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull"& _ "_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_"& _ "lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, defectCatCode, description, active, status, l"& _ "astupdate, lastupdatedby FROM defectCatQCHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defectCatCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCatCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCatCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, defectCatCode, description, active, status, lastupdate, lastupdat"& _ "edby FROM dbo.defectCatQCHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.defectCatQCHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.defectCatQCHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.defectCatQCHistDataTable = New EpsonDataSet1.defectCatQCHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.defectCatQCHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "defectCatQCHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_defectCatCode Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_defectCatCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (defectCatCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(defectCatCode,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (defectCatCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(defectCatCode,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_defectCatCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_defectCatCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCatCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_defectCatCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(defectCatCode, description, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_defectCatCode, Original_description, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class defectProdTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "defectProd" tableMapping.ColumnMappings.Add("defectCode", "defectCode") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[defectProd] WHERE (([defectCode] = @Original_defectCode) AND ("& _ "(@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Origina"& _ "l_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @O"& _ "riginal_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([las"& _ "tupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdat"& _ "edby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[defectProd] ([defectCode], [description], [active], [lastupdat"& _ "e], [lastupdatedby]) VALUES (@defectCode, @description, @active, @lastupdate, @l"& _ "astupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT defectCode, description, active, lastupdate, lastupdatedb"& _ "y FROM defectProd WHERE (defectCode = @defectCode)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[defectProd] SET [defectCode] = @defectCode, [description] = @descri"& _ "ption, [active] = @active, [lastupdate] = @lastupdate, [lastupdatedby] = @lastup"& _ "datedby WHERE (([defectCode] = @Original_defectCode) AND ((@IsNull_description ="& _ " 1 AND [description] IS NULL) OR ([description] = @Original_description)) AND (("& _ "@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)) AND ("& _ "(@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_l"& _ "astupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([la"& _ "stupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT defectCode, description, acti"& _ "ve, lastupdate, lastupdatedby FROM defectProd WHERE (defectCode = @defectCode)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT defectCode, description, active, lastupdate, lastupdatedby FROM dbo.defect"& _ "Prod" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.defectProdDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.defectProdDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.defectProdDataTable = New EpsonDataSet1.defectProdDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.defectProdDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "defectProd") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_defectCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_defectCode") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_defectCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (defectCode Is Nothing) Then Throw New Global.System.ArgumentNullException("defectCode") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(defectCode,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (defectCode Is Nothing) Then Throw New Global.System.ArgumentNullException("defectCode") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(defectCode,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If If (Original_defectCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_defectCode") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_defectCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_defectCode, description, active, lastupdate, lastupdatedby, Original_defectCode, Original_description, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class defectProdHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "defectProdHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("defectCode", "defectCode") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[defectProdHist] WHERE (([lineNum] = @Original_lineNum) AND ((@"& _ "IsNull_defectCode = 1 AND [defectCode] IS NULL) OR ([defectCode] = @Original_def"& _ "ectCode)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([descript"& _ "ion] = @Original_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR"& _ " ([active] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NULL) O"& _ "R ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] I"& _ "S NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = "& _ "1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defectCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[defectProdHist] ([defectCode], [description], [active], [statu"& _ "s], [lastupdate], [lastupdatedby]) VALUES (@defectCode, @description, @active, @"& _ "status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, defectCode, description, "& _ "active, status, lastupdate, lastupdatedby FROM defectProdHist WHERE (lineNum = S"& _ "COPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[defectProdHist] SET [defectCode] = @defectCode, [description] = @de"& _ "scription, [active] = @active, [status] = @status, [lastupdate] = @lastupdate, ["& _ "lastupdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@Is"& _ "Null_defectCode = 1 AND [defectCode] IS NULL) OR ([defectCode] = @Original_defec"& _ "tCode)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([descriptio"& _ "n] = @Original_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ("& _ "[active] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR "& _ "([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS "& _ "NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 "& _ "AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)& _ "SELECT lineNum, defectCode, description, active, status, lastupdate, lastupdated"& _ "by FROM defectProdHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defectCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, defectCode, description, active, status, lastupdate, lastupdatedb"& _ "y FROM dbo.defectProdHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.defectProdHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.defectProdHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.defectProdHistDataTable = New EpsonDataSet1.defectProdHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.defectProdHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "defectProdHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_defectCode Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_defectCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (defectCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(defectCode,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (defectCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(defectCode,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_defectCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_defectCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(defectCode, description, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_defectCode, Original_description, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class defectQCTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "defectQC" tableMapping.ColumnMappings.Add("defectCode", "defectCode") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[defectQC] WHERE (([defectCode] = @Original_defectCode) AND ((@"& _ "IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Original_"& _ "description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Ori"& _ "ginal_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastu"& _ "pdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdated"& _ "by] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[defectQC] ([defectCode], [description], [active], [lastupdate]"& _ ", [lastupdatedby]) VALUES (@defectCode, @description, @active, @lastupdate, @las"& _ "tupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT defectCode, description, active, lastupdate, lastupdatedby "& _ "FROM defectQC WHERE (defectCode = @defectCode)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[defectQC] SET [defectCode] = @defectCode, [description] = @descript"& _ "ion, [active] = @active, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupda"& _ "tedby WHERE (([defectCode] = @Original_defectCode) AND ((@IsNull_description = 1"& _ " AND [description] IS NULL) OR ([description] = @Original_description)) AND ((@I"& _ "sNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)) AND ((@"& _ "IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_las"& _ "tupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([last"& _ "updatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT defectCode, description, active"& _ ", lastupdate, lastupdatedby FROM defectQC WHERE (defectCode = @defectCode)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT defectCode, description, active, lastupdate, lastupdatedby FROM dbo.defect"& _ "QC" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.defectQCDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.defectQCDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.defectQCDataTable = New EpsonDataSet1.defectQCDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.defectQCDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "defectQC") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_defectCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_defectCode") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_defectCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (defectCode Is Nothing) Then Throw New Global.System.ArgumentNullException("defectCode") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(defectCode,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (defectCode Is Nothing) Then Throw New Global.System.ArgumentNullException("defectCode") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(defectCode,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If If (Original_defectCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_defectCode") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_defectCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_defectCode, description, active, lastupdate, lastupdatedby, Original_defectCode, Original_description, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class defectQCHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "defectQCHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("defectCode", "defectCode") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[defectQCHist] WHERE (([lineNum] = @Original_lineNum) AND ((@Is"& _ "Null_defectCode = 1 AND [defectCode] IS NULL) OR ([defectCode] = @Original_defec"& _ "tCode)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([descriptio"& _ "n] = @Original_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ("& _ "[active] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR "& _ "([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS "& _ "NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 "& _ "AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defectCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[defectQCHist] ([defectCode], [description], [active], [status]"& _ ", [lastupdate], [lastupdatedby]) VALUES (@defectCode, @description, @active, @st"& _ "atus, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, defectCode, description, ac"& _ "tive, status, lastupdate, lastupdatedby FROM defectQCHist WHERE (lineNum = SCOPE"& _ "_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[defectQCHist] SET [defectCode] = @defectCode, [description] = @desc"& _ "ription, [active] = @active, [status] = @status, [lastupdate] = @lastupdate, [la"& _ "stupdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNu"& _ "ll_defectCode = 1 AND [defectCode] IS NULL) OR ([defectCode] = @Original_defectC"& _ "ode)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description]"& _ " = @Original_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([a"& _ "ctive] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR (["& _ "status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NU"& _ "LL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AN"& _ "D [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SE"& _ "LECT lineNum, defectCode, description, active, status, lastupdate, lastupdatedby"& _ " FROM defectQCHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defectCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defectCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defectCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, defectCode, description, active, status, lastupdate, lastupdatedb"& _ "y FROM dbo.defectQCHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.defectQCHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.defectQCHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.defectQCHistDataTable = New EpsonDataSet1.defectQCHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.defectQCHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "defectQCHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_defectCode Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_defectCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (defectCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(defectCode,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (defectCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(defectCode,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_defectCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_defectCode,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal defectCode As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_defectCode As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(defectCode, description, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_defectCode, Original_description, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class FA_NewPTTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "FA_NewPT" tableMapping.ColumnMappings.Add("PTno", "PTno") tableMapping.ColumnMappings.Add("FAno", "FAno") tableMapping.ColumnMappings.Add("Quantity", "Quantity") tableMapping.ColumnMappings.Add("RegisteredBy", "RegisteredBy") tableMapping.ColumnMappings.Add("RegisteredDate", "RegisteredDate") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[FA_NewPT] ([PTno], [FAno], [Quantity], [RegisteredBy], [Regist"& _ "eredDate]) VALUES (@PTno, @FAno, @Quantity, @RegisteredBy, @RegisteredDate)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PTno", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PTno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FAno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FAno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RegisteredBy", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "RegisteredBy", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RegisteredDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "RegisteredDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT PTno, FAno, Quantity, RegisteredBy, RegisteredDate FROM dbo.FA_NewPT" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.FA_NewPTDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.FA_NewPTDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.FA_NewPTDataTable = New EpsonDataSet1.FA_NewPTDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.FA_NewPTDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "FA_NewPT") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal PTno As String, ByVal FAno As String, ByVal Quantity As Integer, ByVal RegisteredBy As String, ByVal RegisteredDate As Date) As Integer If (PTno Is Nothing) Then Throw New Global.System.ArgumentNullException("PTno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(PTno,String) End If If (FAno Is Nothing) Then Throw New Global.System.ArgumentNullException("FAno") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(FAno,String) End If Me.Adapter.InsertCommand.Parameters(2).Value = CType(Quantity,Integer) If (RegisteredBy Is Nothing) Then Throw New Global.System.ArgumentNullException("RegisteredBy") Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(RegisteredBy,String) End If Me.Adapter.InsertCommand.Parameters(4).Value = CType(RegisteredDate,Date) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class faNoTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "faNo" tableMapping.ColumnMappings.Add("faId", "faId") tableMapping.ColumnMappings.Add("faNo", "faNo") tableMapping.ColumnMappings.Add("ptNo", "ptNo") tableMapping.ColumnMappings.Add("suffix", "suffix") tableMapping.ColumnMappings.Add("stage", "stage") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") tableMapping.ColumnMappings.Add("Quantity", "Quantity") tableMapping.ColumnMappings.Add("status", "status") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[faNo] WHERE (([faId] = @Original_faId) AND ((@IsNull_faNo = 1 "& _ "AND [faNo] IS NULL) OR ([faNo] = @Original_faNo)) AND ((@IsNull_ptNo = 1 AND [pt"& _ "No] IS NULL) OR ([ptNo] = @Original_ptNo)) AND ((@IsNull_suffix = 1 AND [suffix]"& _ " IS NULL) OR ([suffix] = @Original_suffix)) AND ((@IsNull_stage = 1 AND [stage] "& _ "IS NULL) OR ([stage] = @Original_stage)) AND ((@IsNull_lastupdate = 1 AND [lastu"& _ "pdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupda"& _ "tedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdat"& _ "edby)) AND ((@IsNull_Quantity = 1 AND [Quantity] IS NULL) OR ([Quantity] = @Orig"& _ "inal_Quantity)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @O"& _ "riginal_status)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_faId", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "faId", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_faNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "faNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_faNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "faNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_suffix", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_stage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[faNo] ([faNo], [ptNo], [suffix], [stage], [lastupdate], [lastu"& _ "pdatedby], [Quantity], [status]) VALUES (@faNo, @ptNo, @suffix, @stage, @lastupd"& _ "ate, @lastupdatedby, @Quantity, @status);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT faId, faNo, ptNo, suffix, stag"& _ "e, lastupdate, lastupdatedby, Quantity, status FROM faNo WHERE (faId = SCOPE_IDE"& _ "NTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@faNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "faNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@suffix", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[faNo] SET [faNo] = @faNo, [ptNo] = @ptNo, [suffix] = @suffix, [stag"& _ "e] = @stage, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby, [Quan"& _ "tity] = @Quantity, [status] = @status WHERE (([faId] = @Original_faId) AND ((@Is"& _ "Null_faNo = 1 AND [faNo] IS NULL) OR ([faNo] = @Original_faNo)) AND ((@IsNull_pt"& _ "No = 1 AND [ptNo] IS NULL) OR ([ptNo] = @Original_ptNo)) AND ((@IsNull_suffix = "& _ "1 AND [suffix] IS NULL) OR ([suffix] = @Original_suffix)) AND ((@IsNull_stage = "& _ "1 AND [stage] IS NULL) OR ([stage] = @Original_stage)) AND ((@IsNull_lastupdate "& _ "= 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@I"& _ "sNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Orig"& _ "inal_lastupdatedby)) AND ((@IsNull_Quantity = 1 AND [Quantity] IS NULL) OR ([Qua"& _ "ntity] = @Original_Quantity)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR "& _ "([status] = @Original_status)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT faId, faNo, ptNo, suffix, stage, lastup"& _ "date, lastupdatedby, Quantity, status FROM faNo WHERE (faId = @faId)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@faNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "faNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@suffix", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_faId", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "faId", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_faNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "faNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_faNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "faNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_suffix", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_stage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@faId", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "faId", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT faId, faNo, ptNo, suffix, stage, lastupdate, lastupdatedby, Quantity, stat"& _ "us FROM dbo.faNo" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.faNoDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.faNoDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.faNoDataTable = New EpsonDataSet1.faNoDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.faNoDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "faNo") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_faId As Integer, ByVal Original_faNo As String, ByVal Original_ptNo As String, ByVal Original_suffix As String, ByVal Original_stage As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal Original_Quantity As Global.System.Nullable(Of Integer), ByVal Original_status As Global.System.Nullable(Of Integer)) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_faId,Integer) If (Original_faNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_faNo,String) End If If (Original_ptNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_ptNo,String) End If If (Original_suffix Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_suffix,String) End If If (Original_stage Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_stage,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If If (Original_Quantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_Quantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_status.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_status.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal faNo As String, ByVal ptNo As String, ByVal suffix As String, ByVal stage As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Quantity As Global.System.Nullable(Of Integer), ByVal status As Global.System.Nullable(Of Integer)) As Integer If (faNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(faNo,String) End If If (ptNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(ptNo,String) End If If (suffix Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(suffix,String) End If If (stage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(stage,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If If (Quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(Quantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (status.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(status.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal faNo As String, _ ByVal ptNo As String, _ ByVal suffix As String, _ ByVal stage As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Quantity As Global.System.Nullable(Of Integer), _ ByVal status As Global.System.Nullable(Of Integer), _ ByVal Original_faId As Integer, _ ByVal Original_faNo As String, _ ByVal Original_ptNo As String, _ ByVal Original_suffix As String, _ ByVal Original_stage As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal Original_Quantity As Global.System.Nullable(Of Integer), _ ByVal Original_status As Global.System.Nullable(Of Integer), _ ByVal faId As Integer) As Integer If (faNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(faNo,String) End If If (ptNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(ptNo,String) End If If (suffix Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(suffix,String) End If If (stage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(stage,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If If (Quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (status.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(status.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_faId,Integer) If (Original_faNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_faNo,String) End If If (Original_ptNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_ptNo,String) End If If (Original_suffix Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_suffix,String) End If If (Original_stage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_stage,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_lastupdatedby,String) End If If (Original_Quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_Quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value End If If (Original_status.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_status.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(25).Value = CType(faId,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal faNo As String, _ ByVal ptNo As String, _ ByVal suffix As String, _ ByVal stage As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Quantity As Global.System.Nullable(Of Integer), _ ByVal status As Global.System.Nullable(Of Integer), _ ByVal Original_faId As Integer, _ ByVal Original_faNo As String, _ ByVal Original_ptNo As String, _ ByVal Original_suffix As String, _ ByVal Original_stage As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal Original_Quantity As Global.System.Nullable(Of Integer), _ ByVal Original_status As Global.System.Nullable(Of Integer)) As Integer Return Me.Update(faNo, ptNo, suffix, stage, lastupdate, lastupdatedby, Quantity, status, Original_faId, Original_faNo, Original_ptNo, Original_suffix, Original_stage, Original_lastupdate, Original_lastupdatedby, Original_Quantity, Original_status, Original_faId) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class KITTINGTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "KITTING" tableMapping.ColumnMappings.Add("REV", "REV") tableMapping.ColumnMappings.Add("PARTNO", "PARTNO") tableMapping.ColumnMappings.Add("DESC1", "DESC1") tableMapping.ColumnMappings.Add("USAGE", "USAGE") tableMapping.ColumnMappings.Add("SPQ", "SPQ") tableMapping.ColumnMappings.Add("OPERATOR", "OPERATOR") tableMapping.ColumnMappings.Add("KITTINGDATE", "KITTINGDATE") tableMapping.ColumnMappings.Add("QTY", "QTY") tableMapping.ColumnMappings.Add("FEEDER", "FEEDER") tableMapping.ColumnMappings.Add("ACCOUNT", "ACCOUNT") tableMapping.ColumnMappings.Add("MACHINE", "MACHINE") tableMapping.ColumnMappings.Add("MODEL", "MODEL") tableMapping.ColumnMappings.Add("TYPE", "TYPE") tableMapping.ColumnMappings.Add("LINE", "LINE") tableMapping.ColumnMappings.Add("EOH", "EOH") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[KITTING] ([REV], [PARTNO], [DESC1], [USAGE], [SPQ], [OPERATOR]"& _ ", [KITTINGDATE], [QTY], [FEEDER], [ACCOUNT], [MACHINE], [MODEL], [TYPE], [LINE],"& _ " [EOH]) VALUES (@REV, @PARTNO, @DESC1, @USAGE, @SPQ, @OPERATOR, @KITTINGDATE, @Q"& _ "TY, @FEEDER, @ACCOUNT, @MACHINE, @MODEL, @TYPE, @LINE, @EOH)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@REV", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "REV", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PARTNO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PARTNO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DESC1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DESC1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@USAGE", Global.System.Data.SqlDbType.Float, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "USAGE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SPQ", Global.System.Data.SqlDbType.Float, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SPQ", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OPERATOR", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OPERATOR", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KITTINGDATE", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KITTINGDATE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@QTY", Global.System.Data.SqlDbType.Float, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "QTY", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FEEDER", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FEEDER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ACCOUNT", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ACCOUNT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@MACHINE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "MACHINE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@MODEL", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "MODEL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TYPE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TYPE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LINE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LINE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EOH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EOH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT REV, PARTNO, DESC1, USAGE, SPQ, OPERATOR, KITTINGDATE, QTY, FEEDER, ACCOUN"& _ "T, MACHINE, MODEL, TYPE, LINE, EOH FROM dbo.KITTING" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.KITTINGDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.KITTINGDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.KITTINGDataTable = New EpsonDataSet1.KITTINGDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.KITTINGDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "KITTING") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal REV As String, ByVal PARTNO As String, ByVal DESC1 As String, ByVal USAGE As Global.System.Nullable(Of Double), ByVal SPQ As Global.System.Nullable(Of Double), ByVal _OPERATOR As String, ByVal KITTINGDATE As Date, ByVal QTY As Global.System.Nullable(Of Double), ByVal FEEDER As String, ByVal ACCOUNT As String, ByVal MACHINE As String, ByVal MODEL As String, ByVal TYPE As String, ByVal LINE As String, ByVal EOH As String) As Integer If (REV Is Nothing) Then Throw New Global.System.ArgumentNullException("REV") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(REV,String) End If If (PARTNO Is Nothing) Then Throw New Global.System.ArgumentNullException("PARTNO") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(PARTNO,String) End If If (DESC1 Is Nothing) Then Throw New Global.System.ArgumentNullException("DESC1") Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(DESC1,String) End If If (USAGE.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(USAGE.Value,Double) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (SPQ.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(SPQ.Value,Double) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (_OPERATOR Is Nothing) Then Throw New Global.System.ArgumentNullException("_OPERATOR") Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(_OPERATOR,String) End If Me.Adapter.InsertCommand.Parameters(6).Value = CType(KITTINGDATE,Date) If (QTY.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(QTY.Value,Double) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (FEEDER Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(FEEDER,String) End If If (ACCOUNT Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(ACCOUNT,String) End If If (MACHINE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(MACHINE,String) End If If (MODEL Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(MODEL,String) End If If (TYPE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(TYPE,String) End If If (LINE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(LINE,String) End If If (EOH Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(EOH,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class KMOUNTINGTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "KMOUNTING" tableMapping.ColumnMappings.Add("KMTDATE", "KMTDATE") tableMapping.ColumnMappings.Add("KMTMACHINE", "KMTMACHINE") tableMapping.ColumnMappings.Add("KMTREVISION", "KMTREVISION") tableMapping.ColumnMappings.Add("KMTFEEDER", "KMTFEEDER") tableMapping.ColumnMappings.Add("KMTPARTNO", "KMTPARTNO") tableMapping.ColumnMappings.Add("KMTQTY", "KMTQTY") tableMapping.ColumnMappings.Add("KMTLOT", "KMTLOT") tableMapping.ColumnMappings.Add("KMTOPERATOR", "KMTOPERATOR") tableMapping.ColumnMappings.Add("KMTVERIFY", "KMTVERIFY") tableMapping.ColumnMappings.Add("KMT3PL", "KMT3PL") tableMapping.ColumnMappings.Add("KSEQUENCENO", "KSEQUENCENO") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[KMOUNTING] ([KMTDATE], [KMTMACHINE], [KMTREVISION], [KMTFEEDER"& _ "], [KMTPARTNO], [KMTQTY], [KMTLOT], [KMTOPERATOR], [KMTVERIFY], [KMT3PL], [KSEQU"& _ "ENCENO]) VALUES (@KMTDATE, @KMTMACHINE, @KMTREVISION, @KMTFEEDER, @KMTPARTNO, @K"& _ "MTQTY, @KMTLOT, @KMTOPERATOR, @KMTVERIFY, @KMT3PL, @KSEQUENCENO)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTDATE", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTDATE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTMACHINE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTMACHINE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTREVISION", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTREVISION", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTFEEDER", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTFEEDER", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTPARTNO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTPARTNO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTQTY", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTQTY", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTLOT", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTLOT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTOPERATOR", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTOPERATOR", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMTVERIFY", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMTVERIFY", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KMT3PL", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KMT3PL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSEQUENCENO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSEQUENCENO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT KMTDATE, KMTMACHINE, KMTREVISION, KMTFEEDER, KMTPARTNO, KMTQTY, KMTLOT, KM"& _ "TOPERATOR, KMTVERIFY, KMT3PL, KSEQUENCENO FROM dbo.KMOUNTING" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.KMOUNTINGDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.KMOUNTINGDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.KMOUNTINGDataTable = New EpsonDataSet1.KMOUNTINGDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.KMOUNTINGDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "KMOUNTING") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal KMTDATE As Global.System.Nullable(Of Date), ByVal KMTMACHINE As String, ByVal KMTREVISION As String, ByVal KMTFEEDER As String, ByVal KMTPARTNO As String, ByVal KMTQTY As Global.System.Nullable(Of Integer), ByVal KMTLOT As String, ByVal KMTOPERATOR As String, ByVal KMTVERIFY As Global.System.Nullable(Of Integer), ByVal KMT3PL As String, ByVal KSEQUENCENO As String) As Integer If (KMTDATE.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(0).Value = CType(KMTDATE.Value,Date) Else Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value End If If (KMTMACHINE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(KMTMACHINE,String) End If If (KMTREVISION Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(KMTREVISION,String) End If If (KMTFEEDER Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(KMTFEEDER,String) End If If (KMTPARTNO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(KMTPARTNO,String) End If If (KMTQTY.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(KMTQTY.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (KMTLOT Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(KMTLOT,String) End If If (KMTOPERATOR Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(KMTOPERATOR,String) End If If (KMTVERIFY.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(KMTVERIFY.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (KMT3PL Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(KMT3PL,String) End If If (KSEQUENCENO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(KSEQUENCENO,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class KSEQUENCE_DETAILTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "KSEQUENCE_DETAIL" tableMapping.ColumnMappings.Add("KSQMODULE", "KSQMODULE") tableMapping.ColumnMappings.Add("KSQFEEDERNO", "KSQFEEDERNO") tableMapping.ColumnMappings.Add("KSQFEEDERTYP", "KSQFEEDERTYP") tableMapping.ColumnMappings.Add("KSQPARTNO", "KSQPARTNO") tableMapping.ColumnMappings.Add("KSQTOPSDLOC", "KSQTOPSDLOC") tableMapping.ColumnMappings.Add("KSQFSBSQTY", "KSQFSBSQTY") tableMapping.ColumnMappings.Add("KSQDESC1", "KSQDESC1") tableMapping.ColumnMappings.Add("KSQDESC2", "KSQDESC2") tableMapping.ColumnMappings.Add("KSQTOPMARK", "KSQTOPMARK") tableMapping.ColumnMappings.Add("KSQREMARKS", "KSQREMARKS") tableMapping.ColumnMappings.Add("KSEQUENCENO", "KSEQUENCENO") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[KSEQUENCE_DETAIL] ([KSQMODULE], [KSQFEEDERNO], [KSQFEEDERTYP],"& _ " [KSQPARTNO], [KSQTOPSDLOC], [KSQFSBSQTY], [KSQDESC1], [KSQDESC2], [KSQTOPMARK],"& _ " [KSQREMARKS], [KSEQUENCENO]) VALUES (@KSQMODULE, @KSQFEEDERNO, @KSQFEEDERTYP, @"& _ "KSQPARTNO, @KSQTOPSDLOC, @KSQFSBSQTY, @KSQDESC1, @KSQDESC2, @KSQTOPMARK, @KSQREM"& _ "ARKS, @KSEQUENCENO)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQMODULE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQMODULE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQFEEDERNO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQFEEDERNO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQFEEDERTYP", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQFEEDERTYP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQPARTNO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQPARTNO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQTOPSDLOC", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQTOPSDLOC", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQFSBSQTY", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQFSBSQTY", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQDESC1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQDESC1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQDESC2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQDESC2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQTOPMARK", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQTOPMARK", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQREMARKS", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQREMARKS", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSEQUENCENO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSEQUENCENO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT KSQMODULE, KSQFEEDERNO, KSQFEEDERTYP, KSQPARTNO, KSQTOPSDLOC, KSQFSBSQTY, "& _ "KSQDESC1, KSQDESC2, KSQTOPMARK, KSQREMARKS, KSEQUENCENO FROM dbo.KSEQUENCE_DETAI"& _ "L" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.KSEQUENCE_DETAILDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.KSEQUENCE_DETAILDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.KSEQUENCE_DETAILDataTable = New EpsonDataSet1.KSEQUENCE_DETAILDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.KSEQUENCE_DETAILDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "KSEQUENCE_DETAIL") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal KSQMODULE As String, ByVal KSQFEEDERNO As String, ByVal KSQFEEDERTYP As String, ByVal KSQPARTNO As String, ByVal KSQTOPSDLOC As String, ByVal KSQFSBSQTY As Global.System.Nullable(Of Integer), ByVal KSQDESC1 As String, ByVal KSQDESC2 As String, ByVal KSQTOPMARK As String, ByVal KSQREMARKS As String, ByVal KSEQUENCENO As String) As Integer If (KSQMODULE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(KSQMODULE,String) End If If (KSQFEEDERNO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(KSQFEEDERNO,String) End If If (KSQFEEDERTYP Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(KSQFEEDERTYP,String) End If If (KSQPARTNO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(KSQPARTNO,String) End If If (KSQTOPSDLOC Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(KSQTOPSDLOC,String) End If If (KSQFSBSQTY.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(KSQFSBSQTY.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (KSQDESC1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(KSQDESC1,String) End If If (KSQDESC2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(KSQDESC2,String) End If If (KSQTOPMARK Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(KSQTOPMARK,String) End If If (KSQREMARKS Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(KSQREMARKS,String) End If If (KSEQUENCENO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(KSEQUENCENO,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class KSEQUENCE_HEADERTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "KSEQUENCE_HEADER" tableMapping.ColumnMappings.Add("KSACCOUNT", "KSACCOUNT") tableMapping.ColumnMappings.Add("KSQREVISION", "KSQREVISION") tableMapping.ColumnMappings.Add("KSQMACHINE", "KSQMACHINE") tableMapping.ColumnMappings.Add("KSQPCBSIDE", "KSQPCBSIDE") tableMapping.ColumnMappings.Add("KSQPREPBY", "KSQPREPBY") tableMapping.ColumnMappings.Add("KSQCHECKBY", "KSQCHECKBY") tableMapping.ColumnMappings.Add("KSQCHKDATE", "KSQCHKDATE") tableMapping.ColumnMappings.Add("KSQMODEL", "KSQMODEL") tableMapping.ColumnMappings.Add("KUPDTTIME", "KUPDTTIME") tableMapping.ColumnMappings.Add("KSQSTATUS", "KSQSTATUS") tableMapping.ColumnMappings.Add("KSQLINE", "KSQLINE") tableMapping.ColumnMappings.Add("KSEQUENCENO", "KSEQUENCENO") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[KSEQUENCE_HEADER] ([KSACCOUNT], [KSQREVISION], [KSQMACHINE], ["& _ "KSQPCBSIDE], [KSQPREPBY], [KSQCHECKBY], [KSQCHKDATE], [KSQMODEL], [KUPDTTIME], ["& _ "KSQSTATUS], [KSQLINE], [KSEQUENCENO]) VALUES (@KSACCOUNT, @KSQREVISION, @KSQMACH"& _ "INE, @KSQPCBSIDE, @KSQPREPBY, @KSQCHECKBY, @KSQCHKDATE, @KSQMODEL, @KUPDTTIME, @"& _ "KSQSTATUS, @KSQLINE, @KSEQUENCENO)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSACCOUNT", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSACCOUNT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQREVISION", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQREVISION", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQMACHINE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQMACHINE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQPCBSIDE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQPCBSIDE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQPREPBY", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQPREPBY", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQCHECKBY", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQCHECKBY", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQCHKDATE", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQCHKDATE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQMODEL", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQMODEL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KUPDTTIME", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KUPDTTIME", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQSTATUS", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQSTATUS", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSQLINE", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSQLINE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSEQUENCENO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "KSEQUENCENO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT KSACCOUNT, KSQREVISION, KSQMACHINE, KSQPCBSIDE, KSQPREPBY, KSQCHECKBY, KSQ"& _ "CHKDATE, KSQMODEL, KUPDTTIME, KSQSTATUS, KSQLINE, KSEQUENCENO FROM dbo.KSEQUENCE"& _ "_HEADER" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.KSEQUENCE_HEADERDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.KSEQUENCE_HEADERDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.KSEQUENCE_HEADERDataTable = New EpsonDataSet1.KSEQUENCE_HEADERDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.KSEQUENCE_HEADERDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "KSEQUENCE_HEADER") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal KSACCOUNT As String, ByVal KSQREVISION As String, ByVal KSQMACHINE As String, ByVal KSQPCBSIDE As String, ByVal KSQPREPBY As String, ByVal KSQCHECKBY As String, ByVal KSQCHKDATE As Global.System.Nullable(Of Date), ByVal KSQMODEL As String, ByVal KUPDTTIME As Global.System.Nullable(Of Date), ByVal KSQSTATUS As Global.System.Nullable(Of Integer), ByVal KSQLINE As Global.System.Nullable(Of Integer), ByVal KSEQUENCENO As String) As Integer If (KSACCOUNT Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(KSACCOUNT,String) End If If (KSQREVISION Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(KSQREVISION,String) End If If (KSQMACHINE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(KSQMACHINE,String) End If If (KSQPCBSIDE Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(KSQPCBSIDE,String) End If If (KSQPREPBY Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(KSQPREPBY,String) End If If (KSQCHECKBY Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(KSQCHECKBY,String) End If If (KSQCHKDATE.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(KSQCHKDATE.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (KSQMODEL Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(KSQMODEL,String) End If If (KUPDTTIME.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(KUPDTTIME.Value,Date) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (KSQSTATUS.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(KSQSTATUS.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (KSQLINE.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(KSQLINE.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (KSEQUENCENO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(KSEQUENCENO,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class KSETTINGSTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "KSETTINGS" tableMapping.ColumnMappings.Add("set_id", "set_id") tableMapping.ColumnMappings.Add("line", "line") tableMapping.ColumnMappings.Add("ksequence", "ksequence") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[KSETTINGS] ([line], [ksequence]) VALUES (@line, @ksequence)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ksequence", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ksequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT set_id, line, ksequence FROM dbo.KSETTINGS" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.KSETTINGSDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.KSETTINGSDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.KSETTINGSDataTable = New EpsonDataSet1.KSETTINGSDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.KSETTINGSDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "KSETTINGS") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal line As Integer, ByVal ksequence As String) As Integer Me.Adapter.InsertCommand.Parameters(0).Value = CType(line,Integer) If (ksequence Is Nothing) Then Throw New Global.System.ArgumentNullException("ksequence") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(ksequence,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class LabelDefTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "LabelDef" tableMapping.ColumnMappings.Add("labelFormat1", "labelFormat1") tableMapping.ColumnMappings.Add("labelFormat2", "labelFormat2") tableMapping.ColumnMappings.Add("bartenderFile", "bartenderFile") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[LabelDef] WHERE (([labelFormat1] = @Original_labelFormat1) AND"& _ " ([labelFormat2] = @Original_labelFormat2) AND ((@IsNull_bartenderFile = 1 AND ["& _ "bartenderFile] IS NULL) OR ([bartenderFile] = @Original_bartenderFile)) AND ((@I"& _ "sNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_last"& _ "update)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastu"& _ "pdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_labelFormat1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_labelFormat2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_bartenderFile", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_bartenderFile", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[LabelDef] ([labelFormat1], [labelFormat2], [bartenderFile], [l"& _ "astupdate], [lastupdatedby]) VALUES (@labelFormat1, @labelFormat2, @bartenderFil"& _ "e, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT labelFormat1, labelFormat2, bartenderFi"& _ "le, lastupdate, lastupdatedby FROM LabelDef WHERE (labelFormat1 = @labelFormat1)"& _ " AND (labelFormat2 = @labelFormat2)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@labelFormat1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@labelFormat2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@bartenderFile", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[LabelDef] SET [labelFormat1] = @labelFormat1, [labelFormat2] = @lab"& _ "elFormat2, [bartenderFile] = @bartenderFile, [lastupdate] = @lastupdate, [lastup"& _ "datedby] = @lastupdatedby WHERE (([labelFormat1] = @Original_labelFormat1) AND ("& _ "[labelFormat2] = @Original_labelFormat2) AND ((@IsNull_bartenderFile = 1 AND [ba"& _ "rtenderFile] IS NULL) OR ([bartenderFile] = @Original_bartenderFile)) AND ((@IsN"& _ "ull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastup"& _ "date)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupd"& _ "atedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT labelFormat1, labelFormat2, barten"& _ "derFile, lastupdate, lastupdatedby FROM LabelDef WHERE (labelFormat1 = @labelFor"& _ "mat1) AND (labelFormat2 = @labelFormat2)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@labelFormat1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@labelFormat2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@bartenderFile", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_labelFormat1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_labelFormat2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_bartenderFile", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_bartenderFile", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT labelFormat1, labelFormat2, bartenderFile, lastupdate, lastupdatedby FROM "& _ "dbo.LabelDef" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.LabelDefDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.LabelDefDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.LabelDefDataTable = New EpsonDataSet1.LabelDefDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.LabelDefDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "LabelDef") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_labelFormat1 As String, ByVal Original_labelFormat2 As String, ByVal Original_bartenderFile As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_labelFormat1 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_labelFormat1") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_labelFormat1,String) End If If (Original_labelFormat2 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_labelFormat2") Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_labelFormat2,String) End If If (Original_bartenderFile Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(2).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(2).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_bartenderFile,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal labelFormat1 As String, ByVal labelFormat2 As String, ByVal bartenderFile As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (labelFormat1 Is Nothing) Then Throw New Global.System.ArgumentNullException("labelFormat1") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(labelFormat1,String) End If If (labelFormat2 Is Nothing) Then Throw New Global.System.ArgumentNullException("labelFormat2") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(labelFormat2,String) End If If (bartenderFile Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(bartenderFile,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal labelFormat1 As String, ByVal labelFormat2 As String, ByVal bartenderFile As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_labelFormat1 As String, ByVal Original_labelFormat2 As String, ByVal Original_bartenderFile As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (labelFormat1 Is Nothing) Then Throw New Global.System.ArgumentNullException("labelFormat1") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(labelFormat1,String) End If If (labelFormat2 Is Nothing) Then Throw New Global.System.ArgumentNullException("labelFormat2") Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(labelFormat2,String) End If If (bartenderFile Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(bartenderFile,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If If (Original_labelFormat1 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_labelFormat1") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_labelFormat1,String) End If If (Original_labelFormat2 Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_labelFormat2") Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_labelFormat2,String) End If If (Original_bartenderFile Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_bartenderFile,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal bartenderFile As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_labelFormat1 As String, ByVal Original_labelFormat2 As String, ByVal Original_bartenderFile As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_labelFormat1, Original_labelFormat2, bartenderFile, lastupdate, lastupdatedby, Original_labelFormat1, Original_labelFormat2, Original_bartenderFile, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class LabelDefHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "LabelDefHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("labelFormat1", "labelFormat1") tableMapping.ColumnMappings.Add("labelFormat2", "labelFormat2") tableMapping.ColumnMappings.Add("bartenderFile", "bartenderFile") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[LabelDefHist] WHERE (([lineNum] = @Original_lineNum) AND ((@Is"& _ "Null_labelFormat1 = 1 AND [labelFormat1] IS NULL) OR ([labelFormat1] = @Original"& _ "_labelFormat1)) AND ((@IsNull_labelFormat2 = 1 AND [labelFormat2] IS NULL) OR (["& _ "labelFormat2] = @Original_labelFormat2)) AND ((@IsNull_bartenderFile = 1 AND [ba"& _ "rtenderFile] IS NULL) OR ([bartenderFile] = @Original_bartenderFile)) AND ((@IsN"& _ "ull_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@Is"& _ "Null_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastu"& _ "pdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastup"& _ "datedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_labelFormat1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_labelFormat1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_labelFormat2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_labelFormat2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_bartenderFile", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_bartenderFile", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[LabelDefHist] ([labelFormat1], [labelFormat2], [bartenderFile]"& _ ", [status], [lastupdate], [lastupdatedby]) VALUES (@labelFormat1, @labelFormat2,"& _ " @bartenderFile, @status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, labelFo"& _ "rmat1, labelFormat2, bartenderFile, status, lastupdate, lastupdatedby FROM Label"& _ "DefHist WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@labelFormat1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@labelFormat2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@bartenderFile", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[LabelDefHist] SET [labelFormat1] = @labelFormat1, [labelFormat2] = "& _ "@labelFormat2, [bartenderFile] = @bartenderFile, [status] = @status, [lastupdate"& _ "] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_"& _ "lineNum) AND ((@IsNull_labelFormat1 = 1 AND [labelFormat1] IS NULL) OR ([labelFo"& _ "rmat1] = @Original_labelFormat1)) AND ((@IsNull_labelFormat2 = 1 AND [labelForma"& _ "t2] IS NULL) OR ([labelFormat2] = @Original_labelFormat2)) AND ((@IsNull_bartend"& _ "erFile = 1 AND [bartenderFile] IS NULL) OR ([bartenderFile] = @Original_bartende"& _ "rFile)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_"& _ "status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate]"& _ " = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS"& _ " NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, labelF"& _ "ormat1, labelFormat2, bartenderFile, status, lastupdate, lastupdatedby FROM Labe"& _ "lDefHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@labelFormat1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@labelFormat2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@bartenderFile", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_labelFormat1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_labelFormat1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_labelFormat2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_labelFormat2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "labelFormat2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_bartenderFile", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_bartenderFile", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "bartenderFile", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, labelFormat1, labelFormat2, bartenderFile, status, lastupdate, la"& _ "stupdatedby FROM dbo.LabelDefHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.LabelDefHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.LabelDefHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.LabelDefHistDataTable = New EpsonDataSet1.LabelDefHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.LabelDefHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "LabelDefHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_labelFormat1 As String, ByVal Original_labelFormat2 As String, ByVal Original_bartenderFile As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_labelFormat1 Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_labelFormat1,String) End If If (Original_labelFormat2 Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_labelFormat2,String) End If If (Original_bartenderFile Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_bartenderFile,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal labelFormat1 As String, ByVal labelFormat2 As String, ByVal bartenderFile As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (labelFormat1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(labelFormat1,String) End If If (labelFormat2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(labelFormat2,String) End If If (bartenderFile Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(bartenderFile,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal labelFormat1 As String, ByVal labelFormat2 As String, ByVal bartenderFile As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_labelFormat1 As String, ByVal Original_labelFormat2 As String, ByVal Original_bartenderFile As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (labelFormat1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(labelFormat1,String) End If If (labelFormat2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(labelFormat2,String) End If If (bartenderFile Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(bartenderFile,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_labelFormat1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_labelFormat1,String) End If If (Original_labelFormat2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_labelFormat2,String) End If If (Original_bartenderFile Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_bartenderFile,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal labelFormat1 As String, ByVal labelFormat2 As String, ByVal bartenderFile As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_labelFormat1 As String, ByVal Original_labelFormat2 As String, ByVal Original_bartenderFile As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(labelFormat1, labelFormat2, bartenderFile, status, lastupdate, lastupdatedby, Original_lineNum, Original_labelFormat1, Original_labelFormat2, Original_bartenderFile, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_actionTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_action" tableMapping.ColumnMappings.Add("trackingno", "trackingno") tableMapping.ColumnMappings.Add("reference", "reference") tableMapping.ColumnMappings.Add("refType", "refType") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("reason", "reason") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_action] ([trackingno], [reference], [refType], [serialno],"& _ " [reason], [lastupdate], [lastupdatedby]) VALUES (@trackingno, @reference, @refT"& _ "ype, @serialno, @reason, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@reference", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "reference", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@refType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "refType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@reason", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "reason", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT trackingno, reference, refType, serialno, reason, lastupdate, lastupdatedb"& _ "y FROM dbo.log_action" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_actionDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_actionDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_actionDataTable = New EpsonDataSet1.log_actionDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_actionDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_action") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal trackingno As String, ByVal reference As String, ByVal refType As String, ByVal serialno As String, ByVal reason As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(trackingno,String) End If If (reference Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(reference,String) End If If (refType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(refType,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(serialno,String) End If If (reason Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(reason,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_alvarion_serialTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_alvarion_serial" tableMapping.ColumnMappings.Add("batchno", "batchno") tableMapping.ColumnMappings.Add("serialStart", "serialStart") tableMapping.ColumnMappings.Add("serialEnd", "serialEnd") tableMapping.ColumnMappings.Add("serialStartHex", "serialStartHex") tableMapping.ColumnMappings.Add("serialEndHex", "serialEndHex") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("revision", "revision") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("generated", "generated") tableMapping.ColumnMappings.Add("generatedby", "generatedby") tableMapping.ColumnMappings.Add("family", "family") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_alvarion_serial] WHERE (([batchno] = @Original_batchno) AN"& _ "D ((@IsNull_serialStart = 1 AND [serialStart] IS NULL) OR ([serialStart] = @Orig"& _ "inal_serialStart)) AND ((@IsNull_serialEnd = 1 AND [serialEnd] IS NULL) OR ([ser"& _ "ialEnd] = @Original_serialEnd)) AND ((@IsNull_serialStartHex = 1 AND [serialStar"& _ "tHex] IS NULL) OR ([serialStartHex] = @Original_serialStartHex)) AND ((@IsNull_s"& _ "erialEndHex = 1 AND [serialEndHex] IS NULL) OR ([serialEndHex] = @Original_seria"& _ "lEndHex)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_m"& _ "odel)) AND ((@IsNull_revision = 1 AND [revision] IS NULL) OR ([revision] = @Orig"& _ "inal_revision)) AND ((@IsNull_quantity = 1 AND [quantity] IS NULL) OR ([quantity"& _ "] = @Original_quantity)) AND ((@IsNull_generated = 1 AND [generated] IS NULL) OR"& _ " ([generated] = @Original_generated)) AND ((@IsNull_generatedby = 1 AND [generat"& _ "edby] IS NULL) OR ([generatedby] = @Original_generatedby)) AND ((@IsNull_family "& _ "= 1 AND [family] IS NULL) OR ([family] = @Original_family)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialStart", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialStart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialEnd", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialEnd", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialStartHex", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialStartHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialEndHex", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialEndHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_revision", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_generated", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_generated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_generatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_generatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_family", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "family", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_family", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "family", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_alvarion_serial] ([batchno], [serialStart], [serialEnd], ["& _ "serialStartHex], [serialEndHex], [model], [revision], [quantity], [generated], ["& _ "generatedby], [family]) VALUES (@batchno, @serialStart, @serialEnd, @serialStart"& _ "Hex, @serialEndHex, @model, @revision, @quantity, @generated, @generatedby, @fam"& _ "ily);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT batchno, serialStart, serialEnd, serialStartHex, serialEndHex, mod"& _ "el, revision, quantity, generated, generatedby, family FROM log_alvarion_serial "& _ "WHERE (batchno = @batchno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialEnd", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStartHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialEndHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@generated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@generatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@family", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "family", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_alvarion_serial] SET [batchno] = @batchno, [serialStart] = @ser"& _ "ialStart, [serialEnd] = @serialEnd, [serialStartHex] = @serialStartHex, [serialE"& _ "ndHex] = @serialEndHex, [model] = @model, [revision] = @revision, [quantity] = @"& _ "quantity, [generated] = @generated, [generatedby] = @generatedby, [family] = @fa"& _ "mily WHERE (([batchno] = @Original_batchno) AND ((@IsNull_serialStart = 1 AND [s"& _ "erialStart] IS NULL) OR ([serialStart] = @Original_serialStart)) AND ((@IsNull_s"& _ "erialEnd = 1 AND [serialEnd] IS NULL) OR ([serialEnd] = @Original_serialEnd)) AN"& _ "D ((@IsNull_serialStartHex = 1 AND [serialStartHex] IS NULL) OR ([serialStartHex"& _ "] = @Original_serialStartHex)) AND ((@IsNull_serialEndHex = 1 AND [serialEndHex]"& _ " IS NULL) OR ([serialEndHex] = @Original_serialEndHex)) AND ((@IsNull_model = 1 "& _ "AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_revision = 1 "& _ "AND [revision] IS NULL) OR ([revision] = @Original_revision)) AND ((@IsNull_quan"& _ "tity = 1 AND [quantity] IS NULL) OR ([quantity] = @Original_quantity)) AND ((@Is"& _ "Null_generated = 1 AND [generated] IS NULL) OR ([generated] = @Original_generate"& _ "d)) AND ((@IsNull_generatedby = 1 AND [generatedby] IS NULL) OR ([generatedby] ="& _ " @Original_generatedby)) AND ((@IsNull_family = 1 AND [family] IS NULL) OR ([fam"& _ "ily] = @Original_family)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT batchno, serialStart, serialEnd, serialStart"& _ "Hex, serialEndHex, model, revision, quantity, generated, generatedby, family FRO"& _ "M log_alvarion_serial WHERE (batchno = @batchno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialEnd", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStartHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialEndHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@generated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@generatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@family", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "family", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialStart", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialStart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialEnd", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialEnd", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialStartHex", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialStartHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialEndHex", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialEndHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_revision", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_generated", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_generated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_generatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_generatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_family", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "family", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_family", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "family", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT batchno, serialStart, serialEnd, serialStartHex, serialEndHex, model, revi"& _ "sion, quantity, generated, generatedby, family FROM dbo.log_alvarion_serial" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_alvarion_serialDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_alvarion_serialDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_alvarion_serialDataTable = New EpsonDataSet1.log_alvarion_serialDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_alvarion_serialDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_alvarion_serial") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_batchno As String, ByVal Original_serialStart As String, ByVal Original_serialEnd As String, ByVal Original_serialStartHex As String, ByVal Original_serialEndHex As String, ByVal Original_model As String, ByVal Original_revision As String, ByVal Original_quantity As Global.System.Nullable(Of Integer), ByVal Original_generated As Global.System.Nullable(Of Date), ByVal Original_generatedby As String, ByVal Original_family As String) As Integer If (Original_batchno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_batchno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_batchno,String) End If If (Original_serialStart Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_serialStart,String) End If If (Original_serialEnd Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_serialEnd,String) End If If (Original_serialStartHex Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_serialStartHex,String) End If If (Original_serialEndHex Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_serialEndHex,String) End If If (Original_model Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_model,String) End If If (Original_revision Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_revision,String) End If If (Original_quantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_quantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_generated.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_generated.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_generatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_generatedby,String) End If If (Original_family Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_family,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal batchno As String, ByVal serialStart As String, ByVal serialEnd As String, ByVal serialStartHex As String, ByVal serialEndHex As String, ByVal model As String, ByVal revision As String, ByVal quantity As Global.System.Nullable(Of Integer), ByVal generated As Global.System.Nullable(Of Date), ByVal generatedby As String, ByVal family As String) As Integer If (batchno Is Nothing) Then Throw New Global.System.ArgumentNullException("batchno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(batchno,String) End If If (serialStart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialStart,String) End If If (serialEnd Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(serialEnd,String) End If If (serialStartHex Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(serialStartHex,String) End If If (serialEndHex Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(serialEndHex,String) End If If (model Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(model,String) End If If (revision Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(revision,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(quantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (generated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(generated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (generatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(generatedby,String) End If If (family Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(family,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal batchno As String, _ ByVal serialStart As String, _ ByVal serialEnd As String, _ ByVal serialStartHex As String, _ ByVal serialEndHex As String, _ ByVal model As String, _ ByVal revision As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal generated As Global.System.Nullable(Of Date), _ ByVal generatedby As String, _ ByVal family As String, _ ByVal Original_batchno As String, _ ByVal Original_serialStart As String, _ ByVal Original_serialEnd As String, _ ByVal Original_serialStartHex As String, _ ByVal Original_serialEndHex As String, _ ByVal Original_model As String, _ ByVal Original_revision As String, _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_generated As Global.System.Nullable(Of Date), _ ByVal Original_generatedby As String, _ ByVal Original_family As String) As Integer If (batchno Is Nothing) Then Throw New Global.System.ArgumentNullException("batchno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(batchno,String) End If If (serialStart Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(serialStart,String) End If If (serialEnd Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(serialEnd,String) End If If (serialStartHex Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(serialStartHex,String) End If If (serialEndHex Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(serialEndHex,String) End If If (model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(model,String) End If If (revision Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(revision,String) End If If (quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (generated.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(generated.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (generatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(generatedby,String) End If If (family Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(family,String) End If If (Original_batchno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_batchno") Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_batchno,String) End If If (Original_serialStart Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_serialStart,String) End If If (Original_serialEnd Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_serialEnd,String) End If If (Original_serialStartHex Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_serialStartHex,String) End If If (Original_serialEndHex Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_serialEndHex,String) End If If (Original_model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_model,String) End If If (Original_revision Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_revision,String) End If If (Original_quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(24).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = CType(Original_quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(24).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = Global.System.DBNull.Value End If If (Original_generated.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(26).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = CType(Original_generated.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(26).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = Global.System.DBNull.Value End If If (Original_generatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(28).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(28).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = CType(Original_generatedby,String) End If If (Original_family Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(30).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(30).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = CType(Original_family,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal serialStart As String, _ ByVal serialEnd As String, _ ByVal serialStartHex As String, _ ByVal serialEndHex As String, _ ByVal model As String, _ ByVal revision As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal generated As Global.System.Nullable(Of Date), _ ByVal generatedby As String, _ ByVal family As String, _ ByVal Original_batchno As String, _ ByVal Original_serialStart As String, _ ByVal Original_serialEnd As String, _ ByVal Original_serialStartHex As String, _ ByVal Original_serialEndHex As String, _ ByVal Original_model As String, _ ByVal Original_revision As String, _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_generated As Global.System.Nullable(Of Date), _ ByVal Original_generatedby As String, _ ByVal Original_family As String) As Integer Return Me.Update(Original_batchno, serialStart, serialEnd, serialStartHex, serialEndHex, model, revision, quantity, generated, generatedby, family, Original_batchno, Original_serialStart, Original_serialEnd, Original_serialStartHex, Original_serialEndHex, Original_model, Original_revision, Original_quantity, Original_generated, Original_generatedby, Original_family) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_ATE_errorTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_ATE_error" tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("result", "result") tableMapping.ColumnMappings.Add("station", "station") tableMapping.ColumnMappings.Add("pc_name", "pc_name") tableMapping.ColumnMappings.Add("errormsg", "errormsg") tableMapping.ColumnMappings.Add("checked_pn", "checked_pn") tableMapping.ColumnMappings.Add("mac", "mac") tableMapping.ColumnMappings.Add("timestamp", "timestamp") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_ATE_error] ([serialno], [result], [station], [pc_name], [e"& _ "rrormsg], [checked_pn], [mac], [timestamp]) VALUES (@serialno, @result, @station"& _ ", @pc_name, @errormsg, @checked_pn, @mac, @timestamp)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@result", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "result", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@pc_name", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pc_name", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@errormsg", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "errormsg", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@checked_pn", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "checked_pn", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@mac", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mac", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@timestamp", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "timestamp", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT serialno, result, station, pc_name, errormsg, checked_pn, mac, timestamp F"& _ "ROM dbo.log_ATE_error" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_ATE_errorDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_ATE_errorDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_ATE_errorDataTable = New EpsonDataSet1.log_ATE_errorDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_ATE_errorDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_ATE_error") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal serialno As String, ByVal result As String, ByVal station As String, ByVal pc_name As String, ByVal errormsg As String, ByVal checked_pn As String, ByVal mac As String, ByVal timestamp As Global.System.Nullable(Of Date)) As Integer If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(serialno,String) End If If (result Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(result,String) End If If (station Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(station,String) End If If (pc_name Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(pc_name,String) End If If (errormsg Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(errormsg,String) End If If (checked_pn Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(checked_pn,String) End If If (mac Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(mac,String) End If If (timestamp.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(timestamp.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_BL_DetailTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_BL_Detail" tableMapping.ColumnMappings.Add("boxno", "boxno") tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("qty", "qty") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("modelWt", "modelWt") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_BL_Detail] ([boxno], [cardno], [serialno], [qty], [model],"& _ " [modelWt], [lastupdate], [lastupdatedby]) VALUES (@boxno, @cardno, @serialno, @"& _ "qty, @model, @modelWt, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "qty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelWt", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT boxno, cardno, serialno, qty, model, modelWt, lastupdate, lastupdatedby FR"& _ "OM dbo.log_BL_Detail" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_BL_DetailDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_BL_DetailDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_BL_DetailDataTable = New EpsonDataSet1.log_BL_DetailDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_BL_DetailDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_BL_Detail") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal boxno As String, ByVal cardno As String, ByVal serialno As String, ByVal qty As Global.System.Nullable(Of Integer), ByVal model As String, ByVal modelWt As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (boxno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(boxno,String) End If If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(serialno,String) End If If (qty.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(qty.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (model Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(model,String) End If If (modelWt Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(modelWt,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_BL_Detail_HistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_BL_Detail_Hist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("boxno", "boxno") tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("qty", "qty") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("modelWt", "modelWt") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_BL_Detail_Hist] WHERE (([lineNum] = @Original_lineNum) AND"& _ " ((@IsNull_boxno = 1 AND [boxno] IS NULL) OR ([boxno] = @Original_boxno)) AND (("& _ "@IsNull_cardno = 1 AND [cardno] IS NULL) OR ([cardno] = @Original_cardno)) AND ("& _ "(@IsNull_serialno = 1 AND [serialno] IS NULL) OR ([serialno] = @Original_serialn"& _ "o)) AND ((@IsNull_qty = 1 AND [qty] IS NULL) OR ([qty] = @Original_qty)) AND ((@"& _ "IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsN"& _ "ull_modelWt = 1 AND [modelWt] IS NULL) OR ([modelWt] = @Original_modelWt)) AND ("& _ "(@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND "& _ "((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_"& _ "lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([l"& _ "astupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "qty", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "qty", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_BL_Detail_Hist] ([boxno], [cardno], [serialno], [qty], [mo"& _ "del], [modelWt], [status], [lastupdate], [lastupdatedby]) VALUES (@boxno, @cardn"& _ "o, @serialno, @qty, @model, @modelWt, @status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SE"& _ "LECT lineNum, boxno, cardno, serialno, qty, model, modelWt, status, lastupdate, "& _ "lastupdatedby FROM log_BL_Detail_Hist WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "qty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_BL_Detail_Hist] SET [boxno] = @boxno, [cardno] = @cardno, [seri"& _ "alno] = @serialno, [qty] = @qty, [model] = @model, [modelWt] = @modelWt, [status"& _ "] = @status, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE "& _ "(([lineNum] = @Original_lineNum) AND ((@IsNull_boxno = 1 AND [boxno] IS NULL) OR"& _ " ([boxno] = @Original_boxno)) AND ((@IsNull_cardno = 1 AND [cardno] IS NULL) OR "& _ "([cardno] = @Original_cardno)) AND ((@IsNull_serialno = 1 AND [serialno] IS NULL"& _ ") OR ([serialno] = @Original_serialno)) AND ((@IsNull_qty = 1 AND [qty] IS NULL)"& _ " OR ([qty] = @Original_qty)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([m"& _ "odel] = @Original_model)) AND ((@IsNull_modelWt = 1 AND [modelWt] IS NULL) OR (["& _ "modelWt] = @Original_modelWt)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR"& _ " ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS"& _ " NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1"& _ " AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, boxno, cardno, serialno, qty, model, modelWt, status, lastupdat"& _ "e, lastupdatedby FROM log_BL_Detail_Hist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "qty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "qty", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "qty", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, boxno, cardno, serialno, qty, model, modelWt, status, lastupdate,"& _ " lastupdatedby FROM dbo.log_BL_Detail_Hist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_BL_Detail_HistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_BL_Detail_HistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_BL_Detail_HistDataTable = New EpsonDataSet1.log_BL_Detail_HistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_BL_Detail_HistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_BL_Detail_Hist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_boxno As String, ByVal Original_cardno As String, ByVal Original_serialno As String, ByVal Original_qty As Global.System.Nullable(Of Integer), ByVal Original_model As String, ByVal Original_modelWt As Global.System.Nullable(Of Single), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_boxno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_boxno,String) End If If (Original_cardno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_serialno,String) End If If (Original_qty.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_qty.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_model Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_model,String) End If If (Original_modelWt.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_modelWt.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal boxno As String, ByVal cardno As String, ByVal serialno As String, ByVal qty As Global.System.Nullable(Of Integer), ByVal model As String, ByVal modelWt As Global.System.Nullable(Of Single), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (boxno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(boxno,String) End If If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(serialno,String) End If If (qty.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(qty.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (model Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(model,String) End If If (modelWt.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(modelWt.Value,Single) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal boxno As String, _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal qty As Global.System.Nullable(Of Integer), _ ByVal model As String, _ ByVal modelWt As Global.System.Nullable(Of Single), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_boxno As String, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_qty As Global.System.Nullable(Of Integer), _ ByVal Original_model As String, _ ByVal Original_modelWt As Global.System.Nullable(Of Single), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (boxno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(boxno,String) End If If (cardno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(serialno,String) End If If (qty.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(qty.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(model,String) End If If (modelWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(modelWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_lineNum,Long) If (Original_boxno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_boxno,String) End If If (Original_cardno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_serialno,String) End If If (Original_qty.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_qty.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (Original_model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_model,String) End If If (Original_modelWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_modelWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(24).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(24).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(26).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(26).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(28).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal boxno As String, _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal qty As Global.System.Nullable(Of Integer), _ ByVal model As String, _ ByVal modelWt As Global.System.Nullable(Of Single), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_boxno As String, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_qty As Global.System.Nullable(Of Integer), _ ByVal Original_model As String, _ ByVal Original_modelWt As Global.System.Nullable(Of Single), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(boxno, cardno, serialno, qty, model, modelWt, status, lastupdate, lastupdatedby, Original_lineNum, Original_boxno, Original_cardno, Original_serialno, Original_qty, Original_model, Original_modelWt, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_BL_HeaderTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_BL_Header" tableMapping.ColumnMappings.Add("boxno", "boxno") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("po", "po") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("pkType", "pkType") tableMapping.ColumnMappings.Add("maxQty", "maxQty") tableMapping.ColumnMappings.Add("boxWt", "boxWt") tableMapping.ColumnMappings.Add("boxDim", "boxDim") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_BL_Header] WHERE (([boxno] = @Original_boxno) AND ((@IsNul"& _ "l_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_p"& _ "o = 1 AND [po] IS NULL) OR ([po] = @Original_po)) AND ((@IsNull_poLine = 1 AND ["& _ "poLine] IS NULL) OR ([poLine] = @Original_poLine)) AND ((@IsNull_pkType = 1 AND "& _ "[pkType] IS NULL) OR ([pkType] = @Original_pkType)) AND ((@IsNull_maxQty = 1 AND"& _ " [maxQty] IS NULL) OR ([maxQty] = @Original_maxQty)) AND ((@IsNull_boxWt = 1 AND"& _ " [boxWt] IS NULL) OR ([boxWt] = @Original_boxWt)) AND ((@IsNull_boxDim = 1 AND ["& _ "boxDim] IS NULL) OR ([boxDim] = @Original_boxDim)) AND ((@IsNull_lastupdate = 1 "& _ "AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNul"& _ "l_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original"& _ "_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_po", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_po", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_poLine", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_pkType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_pkType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxDim", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxDim", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_BL_Header] ([boxno], [model], [po], [poLine], [pkType], [m"& _ "axQty], [boxWt], [boxDim], [lastupdate], [lastupdatedby]) VALUES (@boxno, @model"& _ ", @po, @poLine, @pkType, @maxQty, @boxWt, @boxDim, @lastupdate, @lastupdatedby);"& _ ""&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT boxno, model, po, poLine, pkType, maxQty, boxWt, boxDim, lastupdate, la"& _ "stupdatedby FROM log_BL_Header WHERE (boxno = @boxno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@po", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@pkType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxDim", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_BL_Header] SET [boxno] = @boxno, [model] = @model, [po] = @po, "& _ "[poLine] = @poLine, [pkType] = @pkType, [maxQty] = @maxQty, [boxWt] = @boxWt, [b"& _ "oxDim] = @boxDim, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby W"& _ "HERE (([boxno] = @Original_boxno) AND ((@IsNull_model = 1 AND [model] IS NULL) O"& _ "R ([model] = @Original_model)) AND ((@IsNull_po = 1 AND [po] IS NULL) OR ([po] ="& _ " @Original_po)) AND ((@IsNull_poLine = 1 AND [poLine] IS NULL) OR ([poLine] = @O"& _ "riginal_poLine)) AND ((@IsNull_pkType = 1 AND [pkType] IS NULL) OR ([pkType] = @"& _ "Original_pkType)) AND ((@IsNull_maxQty = 1 AND [maxQty] IS NULL) OR ([maxQty] = "& _ "@Original_maxQty)) AND ((@IsNull_boxWt = 1 AND [boxWt] IS NULL) OR ([boxWt] = @O"& _ "riginal_boxWt)) AND ((@IsNull_boxDim = 1 AND [boxDim] IS NULL) OR ([boxDim] = @O"& _ "riginal_boxDim)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([las"& _ "tupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdat"& _ "edby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT boxno, "& _ "model, po, poLine, pkType, maxQty, boxWt, boxDim, lastupdate, lastupdatedby FROM"& _ " log_BL_Header WHERE (boxno = @boxno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@po", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@pkType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxDim", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_po", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_po", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_poLine", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_pkType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_pkType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxDim", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxDim", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT boxno, model, po, poLine, pkType, maxQty, boxWt, boxDim, lastupdate, lastu"& _ "pdatedby FROM dbo.log_BL_Header" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_BL_HeaderDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_BL_HeaderDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_BL_HeaderDataTable = New EpsonDataSet1.log_BL_HeaderDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_BL_HeaderDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_BL_Header") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_boxno As String, ByVal Original_model As String, ByVal Original_po As String, ByVal Original_poLine As String, ByVal Original_pkType As String, ByVal Original_maxQty As Global.System.Nullable(Of Integer), ByVal Original_boxWt As Global.System.Nullable(Of Single), ByVal Original_boxDim As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_boxno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_boxno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_boxno,String) End If If (Original_model Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_model,String) End If If (Original_po Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_po,String) End If If (Original_poLine Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_poLine,String) End If If (Original_pkType Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_pkType,String) End If If (Original_maxQty.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_maxQty.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_boxWt.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_boxWt.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_boxDim Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_boxDim,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal boxno As String, ByVal model As String, ByVal po As String, ByVal poLine As String, ByVal pkType As String, ByVal maxQty As Global.System.Nullable(Of Integer), ByVal boxWt As Global.System.Nullable(Of Single), ByVal boxDim As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (boxno Is Nothing) Then Throw New Global.System.ArgumentNullException("boxno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(boxno,String) End If If (model Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(model,String) End If If (po Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(po,String) End If If (poLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(poLine,String) End If If (pkType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(pkType,String) End If If (maxQty.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(maxQty.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (boxWt.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(boxWt.Value,Single) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (boxDim Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(boxDim,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal boxno As String, _ ByVal model As String, _ ByVal po As String, _ ByVal poLine As String, _ ByVal pkType As String, _ ByVal maxQty As Global.System.Nullable(Of Integer), _ ByVal boxWt As Global.System.Nullable(Of Single), _ ByVal boxDim As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_boxno As String, _ ByVal Original_model As String, _ ByVal Original_po As String, _ ByVal Original_poLine As String, _ ByVal Original_pkType As String, _ ByVal Original_maxQty As Global.System.Nullable(Of Integer), _ ByVal Original_boxWt As Global.System.Nullable(Of Single), _ ByVal Original_boxDim As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer If (boxno Is Nothing) Then Throw New Global.System.ArgumentNullException("boxno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(boxno,String) End If If (model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(model,String) End If If (po Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(po,String) End If If (poLine Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(poLine,String) End If If (pkType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(pkType,String) End If If (maxQty.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(maxQty.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (boxWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(boxWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (boxDim Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(boxDim,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(lastupdatedby,String) End If If (Original_boxno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_boxno") Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_boxno,String) End If If (Original_model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_model,String) End If If (Original_po Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_po,String) End If If (Original_poLine Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_poLine,String) End If If (Original_pkType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_pkType,String) End If If (Original_maxQty.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_maxQty.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_boxWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_boxWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value End If If (Original_boxDim Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_boxDim,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal model As String, _ ByVal po As String, _ ByVal poLine As String, _ ByVal pkType As String, _ ByVal maxQty As Global.System.Nullable(Of Integer), _ ByVal boxWt As Global.System.Nullable(Of Single), _ ByVal boxDim As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_boxno As String, _ ByVal Original_model As String, _ ByVal Original_po As String, _ ByVal Original_poLine As String, _ ByVal Original_pkType As String, _ ByVal Original_maxQty As Global.System.Nullable(Of Integer), _ ByVal Original_boxWt As Global.System.Nullable(Of Single), _ ByVal Original_boxDim As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_boxno, model, po, poLine, pkType, maxQty, boxWt, boxDim, lastupdate, lastupdatedby, Original_boxno, Original_model, Original_po, Original_poLine, Original_pkType, Original_maxQty, Original_boxWt, Original_boxDim, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_BL_Header_HistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_BL_Header_Hist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("boxno", "boxno") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("po", "po") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("pkType", "pkType") tableMapping.ColumnMappings.Add("maxQty", "maxQty") tableMapping.ColumnMappings.Add("boxWt", "boxWt") tableMapping.ColumnMappings.Add("boxDim", "boxDim") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_BL_Header_Hist] WHERE (([lineNum] = @Original_lineNum) AND"& _ " ((@IsNull_boxno = 1 AND [boxno] IS NULL) OR ([boxno] = @Original_boxno)) AND (("& _ "@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@Is"& _ "Null_po = 1 AND [po] IS NULL) OR ([po] = @Original_po)) AND ((@IsNull_poLine = 1"& _ " AND [poLine] IS NULL) OR ([poLine] = @Original_poLine)) AND ((@IsNull_pkType = "& _ "1 AND [pkType] IS NULL) OR ([pkType] = @Original_pkType)) AND ((@IsNull_maxQty ="& _ " 1 AND [maxQty] IS NULL) OR ([maxQty] = @Original_maxQty)) AND ((@IsNull_boxWt ="& _ " 1 AND [boxWt] IS NULL) OR ([boxWt] = @Original_boxWt)) AND ((@IsNull_boxDim = 1"& _ " AND [boxDim] IS NULL) OR ([boxDim] = @Original_boxDim)) AND ((@IsNull_status = "& _ "1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupda"& _ "te = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ("& _ "(@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @O"& _ "riginal_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_po", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_po", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_poLine", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_pkType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_pkType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxDim", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxDim", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_BL_Header_Hist] ([boxno], [model], [po], [poLine], [pkType"& _ "], [maxQty], [boxWt], [boxDim], [status], [lastupdate], [lastupdatedby]) VALUES "& _ "(@boxno, @model, @po, @poLine, @pkType, @maxQty, @boxWt, @boxDim, @status, @last"& _ "update, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, boxno, model, po, poLine, pkType, maxQ"& _ "ty, boxWt, boxDim, status, lastupdate, lastupdatedby FROM log_BL_Header_Hist WHE"& _ "RE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@po", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@pkType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxDim", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_BL_Header_Hist] SET [boxno] = @boxno, [model] = @model, [po] = "& _ "@po, [poLine] = @poLine, [pkType] = @pkType, [maxQty] = @maxQty, [boxWt] = @boxW"& _ "t, [boxDim] = @boxDim, [status] = @status, [lastupdate] = @lastupdate, [lastupda"& _ "tedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull_box"& _ "no = 1 AND [boxno] IS NULL) OR ([boxno] = @Original_boxno)) AND ((@IsNull_model "& _ "= 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_po = 1 AN"& _ "D [po] IS NULL) OR ([po] = @Original_po)) AND ((@IsNull_poLine = 1 AND [poLine] "& _ "IS NULL) OR ([poLine] = @Original_poLine)) AND ((@IsNull_pkType = 1 AND [pkType]"& _ " IS NULL) OR ([pkType] = @Original_pkType)) AND ((@IsNull_maxQty = 1 AND [maxQty"& _ "] IS NULL) OR ([maxQty] = @Original_maxQty)) AND ((@IsNull_boxWt = 1 AND [boxWt]"& _ " IS NULL) OR ([boxWt] = @Original_boxWt)) AND ((@IsNull_boxDim = 1 AND [boxDim] "& _ "IS NULL) OR ([boxDim] = @Original_boxDim)) AND ((@IsNull_status = 1 AND [status]"& _ " IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [la"& _ "stupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastu"& _ "pdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastup"& _ "datedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, boxno, model, po, poLine, pkType, maxQty, boxWt, bo"& _ "xDim, status, lastupdate, lastupdatedby FROM log_BL_Header_Hist WHERE (lineNum ="& _ " @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@po", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@pkType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxDim", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_po", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_po", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "po", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_poLine", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_pkType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_pkType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "pkType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_maxQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "maxQty", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxDim", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxDim", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxDim", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, boxno, model, po, poLine, pkType, maxQty, boxWt, boxDim, status, "& _ "lastupdate, lastupdatedby FROM dbo.log_BL_Header_Hist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_BL_Header_HistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_BL_Header_HistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_BL_Header_HistDataTable = New EpsonDataSet1.log_BL_Header_HistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_BL_Header_HistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_BL_Header_Hist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_boxno As String, ByVal Original_model As String, ByVal Original_po As String, ByVal Original_poLine As String, ByVal Original_pkType As String, ByVal Original_maxQty As Global.System.Nullable(Of Integer), ByVal Original_boxWt As Global.System.Nullable(Of Single), ByVal Original_boxDim As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_boxno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_boxno,String) End If If (Original_model Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_model,String) End If If (Original_po Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_po,String) End If If (Original_poLine Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_poLine,String) End If If (Original_pkType Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_pkType,String) End If If (Original_maxQty.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_maxQty.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_boxWt.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_boxWt.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_boxDim Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_boxDim,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal boxno As String, ByVal model As String, ByVal po As String, ByVal poLine As String, ByVal pkType As String, ByVal maxQty As Global.System.Nullable(Of Integer), ByVal boxWt As Global.System.Nullable(Of Single), ByVal boxDim As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (boxno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(boxno,String) End If If (model Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(model,String) End If If (po Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(po,String) End If If (poLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(poLine,String) End If If (pkType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(pkType,String) End If If (maxQty.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(maxQty.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (boxWt.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(boxWt.Value,Single) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (boxDim Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(boxDim,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal boxno As String, _ ByVal model As String, _ ByVal po As String, _ ByVal poLine As String, _ ByVal pkType As String, _ ByVal maxQty As Global.System.Nullable(Of Integer), _ ByVal boxWt As Global.System.Nullable(Of Single), _ ByVal boxDim As String, _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_boxno As String, _ ByVal Original_model As String, _ ByVal Original_po As String, _ ByVal Original_poLine As String, _ ByVal Original_pkType As String, _ ByVal Original_maxQty As Global.System.Nullable(Of Integer), _ ByVal Original_boxWt As Global.System.Nullable(Of Single), _ ByVal Original_boxDim As String, _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (boxno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(boxno,String) End If If (model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(model,String) End If If (po Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(po,String) End If If (poLine Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(poLine,String) End If If (pkType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(pkType,String) End If If (maxQty.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(maxQty.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (boxWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(boxWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (boxDim Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(boxDim,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lineNum,Long) If (Original_boxno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_boxno,String) End If If (Original_model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_model,String) End If If (Original_po Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_po,String) End If If (Original_poLine Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_poLine,String) End If If (Original_pkType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_pkType,String) End If If (Original_maxQty.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_maxQty.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value End If If (Original_boxWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(24).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = CType(Original_boxWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(24).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = Global.System.DBNull.Value End If If (Original_boxDim Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(26).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(26).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = CType(Original_boxDim,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(28).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(28).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(30).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(30).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(32).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(33).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(32).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(33).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(34).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal boxno As String, _ ByVal model As String, _ ByVal po As String, _ ByVal poLine As String, _ ByVal pkType As String, _ ByVal maxQty As Global.System.Nullable(Of Integer), _ ByVal boxWt As Global.System.Nullable(Of Single), _ ByVal boxDim As String, _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_boxno As String, _ ByVal Original_model As String, _ ByVal Original_po As String, _ ByVal Original_poLine As String, _ ByVal Original_pkType As String, _ ByVal Original_maxQty As Global.System.Nullable(Of Integer), _ ByVal Original_boxWt As Global.System.Nullable(Of Single), _ ByVal Original_boxDim As String, _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(boxno, model, po, poLine, pkType, maxQty, boxWt, boxDim, status, lastupdate, lastupdatedby, Original_lineNum, Original_boxno, Original_model, Original_po, Original_poLine, Original_pkType, Original_maxQty, Original_boxWt, Original_boxDim, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_CAPATableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_CAPA" tableMapping.ColumnMappings.Add("poNumber", "poNumber") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("cause", "cause") tableMapping.ColumnMappings.Add("correctiveAction", "correctiveAction") tableMapping.ColumnMappings.Add("category", "category") tableMapping.ColumnMappings.Add("rejectdate", "rejectdate") tableMapping.ColumnMappings.Add("rejectLocation", "rejectLocation") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_CAPA] ([poNumber], [poLine], [cause], [correctiveAction], "& _ "[category], [rejectdate], [rejectLocation], [lastupdate], [lastupdatedby]) VALUE"& _ "S (@poNumber, @poLine, @cause, @correctiveAction, @category, @rejectdate, @rejec"& _ "tLocation, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cause", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cause", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@correctiveAction", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "correctiveAction", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@category", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectLocation", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectLocation", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT poNumber, poLine, cause, correctiveAction, category, rejectdate, rejectLoc"& _ "ation, lastupdate, lastupdatedby FROM dbo.log_CAPA" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_CAPADataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_CAPADataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_CAPADataTable = New EpsonDataSet1.log_CAPADataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_CAPADataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_CAPA") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal poNumber As String, ByVal poLine As String, ByVal cause As String, ByVal correctiveAction As String, ByVal category As String, ByVal rejectdate As Global.System.Nullable(Of Date), ByVal rejectLocation As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (poNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(poNumber,String) End If If (poLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(poLine,String) End If If (cause Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(cause,String) End If If (correctiveAction Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(correctiveAction,String) End If If (category Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(category,String) End If If (rejectdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(rejectdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (rejectLocation Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(rejectLocation,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_cardTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_card" tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_card] ([cardno], [serialno], [status], [lastupdate], [last"& _ "updatedby]) VALUES (@cardno, @serialno, @status, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cardno, serialno, status, lastupdate, lastupdatedby FROM dbo.log_card" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_cardDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_cardDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_cardDataTable = New EpsonDataSet1.log_cardDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_cardDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_card") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal cardno As String, ByVal serialno As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialno,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_CT_DetailTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_CT_Detail" tableMapping.ColumnMappings.Add("CNno", "CNno") tableMapping.ColumnMappings.Add("boxno", "boxno") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_CT_Detail] ([CNno], [boxno], [lastupdate], [lastupdatedby]"& _ ") VALUES (@CNno, @boxno, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT CNno, boxno, lastupdate, lastupdatedby FROM dbo.log_CT_Detail" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_CT_DetailDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_CT_DetailDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_CT_DetailDataTable = New EpsonDataSet1.log_CT_DetailDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_CT_DetailDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_CT_Detail") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal CNno As String, ByVal boxno As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (CNno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(CNno,String) End If If (boxno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(boxno,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_CT_Detail_HistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_CT_Detail_Hist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("CNno", "CNno") tableMapping.ColumnMappings.Add("boxno", "boxno") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_CT_Detail_Hist] WHERE (([lineNum] = @Original_lineNum) AND"& _ " ((@IsNull_CNno = 1 AND [CNno] IS NULL) OR ([CNno] = @Original_CNno)) AND ((@IsN"& _ "ull_boxno = 1 AND [boxno] IS NULL) OR ([boxno] = @Original_boxno)) AND ((@IsNull"& _ "_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNul"& _ "l_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupda"& _ "te)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdat"& _ "edby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CNno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_CT_Detail_Hist] ([CNno], [boxno], [status], [lastupdate], "& _ "[lastupdatedby]) VALUES (@CNno, @boxno, @status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)& _ "SELECT lineNum, CNno, boxno, status, lastupdate, lastupdatedby FROM log_CT_Detai"& _ "l_Hist WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_CT_Detail_Hist] SET [CNno] = @CNno, [boxno] = @boxno, [status] "& _ "= @status, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE (("& _ "[lineNum] = @Original_lineNum) AND ((@IsNull_CNno = 1 AND [CNno] IS NULL) OR ([C"& _ "Nno] = @Original_CNno)) AND ((@IsNull_boxno = 1 AND [boxno] IS NULL) OR ([boxno]"& _ " = @Original_boxno)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status]"& _ " = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR "& _ "([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [last"& _ "updatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT li"& _ "neNum, CNno, boxno, status, lastupdate, lastupdatedby FROM log_CT_Detail_Hist WH"& _ "ERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CNno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_boxno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_boxno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, CNno, boxno, status, lastupdate, lastupdatedby FROM dbo.log_CT_De"& _ "tail_Hist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_CT_Detail_HistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_CT_Detail_HistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_CT_Detail_HistDataTable = New EpsonDataSet1.log_CT_Detail_HistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_CT_Detail_HistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_CT_Detail_Hist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_CNno As String, ByVal Original_boxno As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_CNno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_CNno,String) End If If (Original_boxno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_boxno,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal CNno As String, ByVal boxno As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (CNno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(CNno,String) End If If (boxno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(boxno,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal CNno As String, ByVal boxno As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_CNno As String, ByVal Original_boxno As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (CNno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CNno,String) End If If (boxno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(boxno,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_lineNum,Long) If (Original_CNno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_CNno,String) End If If (Original_boxno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_boxno,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(16).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal CNno As String, ByVal boxno As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_CNno As String, ByVal Original_boxno As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(CNno, boxno, status, lastupdate, lastupdatedby, Original_lineNum, Original_CNno, Original_boxno, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_CT_HeaderTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_CT_Header" tableMapping.ColumnMappings.Add("CNno", "CNno") tableMapping.ColumnMappings.Add("layer", "layer") tableMapping.ColumnMappings.Add("dimension", "dimension") tableMapping.ColumnMappings.Add("type", "type") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_CT_Header] WHERE (([CNno] = @Original_CNno) AND ((@IsNull_"& _ "layer = 1 AND [layer] IS NULL) OR ([layer] = @Original_layer)) AND ((@IsNull_dim"& _ "ension = 1 AND [dimension] IS NULL) OR ([dimension] = @Original_dimension)) AND "& _ "((@IsNull_type = 1 AND [type] IS NULL) OR ([type] = @Original_type)) AND ((@IsNu"& _ "ll_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupd"& _ "ate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupda"& _ "tedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_layer", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dimension", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_type", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_CT_Header] ([CNno], [layer], [dimension], [type], [lastupd"& _ "ate], [lastupdatedby]) VALUES (@CNno, @layer, @dimension, @type, @lastupdate, @l"& _ "astupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CNno, layer, dimension, type, lastupdate, lastupdatedby F"& _ "ROM log_CT_Header WHERE (CNno = @CNno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layer", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_CT_Header] SET [CNno] = @CNno, [layer] = @layer, [dimension] = "& _ "@dimension, [type] = @type, [lastupdate] = @lastupdate, [lastupdatedby] = @lastu"& _ "pdatedby WHERE (([CNno] = @Original_CNno) AND ((@IsNull_layer = 1 AND [layer] IS"& _ " NULL) OR ([layer] = @Original_layer)) AND ((@IsNull_dimension = 1 AND [dimensio"& _ "n] IS NULL) OR ([dimension] = @Original_dimension)) AND ((@IsNull_type = 1 AND ["& _ "type] IS NULL) OR ([type] = @Original_type)) AND ((@IsNull_lastupdate = 1 AND [l"& _ "astupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_last"& _ "updatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastu"& _ "pdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CNno, layer, dimension, type, lastupdate, lastupdatedby FRO"& _ "M log_CT_Header WHERE (CNno = @CNno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layer", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_layer", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dimension", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_type", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT CNno, layer, dimension, type, lastupdate, lastupdatedby FROM dbo.log_CT_He"& _ "ader" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_CT_HeaderDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_CT_HeaderDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_CT_HeaderDataTable = New EpsonDataSet1.log_CT_HeaderDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_CT_HeaderDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_CT_Header") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_CNno As String, ByVal Original_layer As Global.System.Nullable(Of Single), ByVal Original_dimension As String, ByVal Original_type As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_CNno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_CNno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CNno,String) End If If (Original_layer.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_layer.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (Original_dimension Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_dimension,String) End If If (Original_type Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_type,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal CNno As String, ByVal layer As Global.System.Nullable(Of Single), ByVal dimension As String, ByVal type As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (CNno Is Nothing) Then Throw New Global.System.ArgumentNullException("CNno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(CNno,String) End If If (layer.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(layer.Value,Single) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (dimension Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(dimension,String) End If If (type Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(type,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal CNno As String, ByVal layer As Global.System.Nullable(Of Single), ByVal dimension As String, ByVal type As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_CNno As String, ByVal Original_layer As Global.System.Nullable(Of Single), ByVal Original_dimension As String, ByVal Original_type As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (CNno Is Nothing) Then Throw New Global.System.ArgumentNullException("CNno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CNno,String) End If If (layer.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(layer.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (dimension Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(dimension,String) End If If (type Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(type,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If If (Original_CNno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_CNno") Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_CNno,String) End If If (Original_layer.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_layer.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_dimension Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_dimension,String) End If If (Original_type Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_type,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal layer As Global.System.Nullable(Of Single), ByVal dimension As String, ByVal type As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_CNno As String, ByVal Original_layer As Global.System.Nullable(Of Single), ByVal Original_dimension As String, ByVal Original_type As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_CNno, layer, dimension, type, lastupdate, lastupdatedby, Original_CNno, Original_layer, Original_dimension, Original_type, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_CT_Header_HistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_CT_Header_Hist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("CNno", "CNno") tableMapping.ColumnMappings.Add("layer", "layer") tableMapping.ColumnMappings.Add("dimension", "dimension") tableMapping.ColumnMappings.Add("type", "type") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_CT_Header_Hist] WHERE (([lineNum] = @Original_lineNum) AND"& _ " ((@IsNull_CNno = 1 AND [CNno] IS NULL) OR ([CNno] = @Original_CNno)) AND ((@IsN"& _ "ull_layer = 1 AND [layer] IS NULL) OR ([layer] = @Original_layer)) AND ((@IsNull"& _ "_dimension = 1 AND [dimension] IS NULL) OR ([dimension] = @Original_dimension)) "& _ "AND ((@IsNull_type = 1 AND [type] IS NULL) OR ([type] = @Original_type)) AND ((@"& _ "IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND (("& _ "@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_la"& _ "stupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([las"& _ "tupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CNno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dimension", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_type", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_CT_Header_Hist] ([CNno], [layer], [dimension], [type], [st"& _ "atus], [lastupdate], [lastupdatedby]) VALUES (@CNno, @layer, @dimension, @type, "& _ "@status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, CNno, layer, dimension, "& _ "type, status, lastupdate, lastupdatedby FROM log_CT_Header_Hist WHERE (lineNum ="& _ " SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_CT_Header_Hist] SET [CNno] = @CNno, [layer] = @layer, [dimensio"& _ "n] = @dimension, [type] = @type, [status] = @status, [lastupdate] = @lastupdate,"& _ " [lastupdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@"& _ "IsNull_CNno = 1 AND [CNno] IS NULL) OR ([CNno] = @Original_CNno)) AND ((@IsNull_"& _ "layer = 1 AND [layer] IS NULL) OR ([layer] = @Original_layer)) AND ((@IsNull_dim"& _ "ension = 1 AND [dimension] IS NULL) OR ([dimension] = @Original_dimension)) AND "& _ "((@IsNull_type = 1 AND [type] IS NULL) OR ([type] = @Original_type)) AND ((@IsNu"& _ "ll_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsN"& _ "ull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastup"& _ "date)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupd"& _ "atedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, CNno, layer, dimension, t"& _ "ype, status, lastupdate, lastupdatedby FROM log_CT_Header_Hist WHERE (lineNum = "& _ "@lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CNno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dimension", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_type", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, CNno, layer, dimension, type, status, lastupdate, lastupdatedby F"& _ "ROM dbo.log_CT_Header_Hist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_CT_Header_HistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_CT_Header_HistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_CT_Header_HistDataTable = New EpsonDataSet1.log_CT_Header_HistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_CT_Header_HistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_CT_Header_Hist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_CNno As String, ByVal Original_layer As Global.System.Nullable(Of Integer), ByVal Original_dimension As String, ByVal Original_type As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_CNno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_CNno,String) End If If (Original_layer.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_layer.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_dimension Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_dimension,String) End If If (Original_type Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_type,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal CNno As String, ByVal layer As Global.System.Nullable(Of Integer), ByVal dimension As String, ByVal type As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (CNno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(CNno,String) End If If (layer.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(layer.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (dimension Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(dimension,String) End If If (type Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(type,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal CNno As String, _ ByVal layer As Global.System.Nullable(Of Integer), _ ByVal dimension As String, _ ByVal type As String, _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_CNno As String, _ ByVal Original_layer As Global.System.Nullable(Of Integer), _ ByVal Original_dimension As String, _ ByVal Original_type As String, _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (CNno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CNno,String) End If If (layer.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(layer.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (dimension Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(dimension,String) End If If (type Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(type,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_lineNum,Long) If (Original_CNno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_CNno,String) End If If (Original_layer.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_layer.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_dimension Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_dimension,String) End If If (Original_type Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_type,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(22).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal CNno As String, ByVal layer As Global.System.Nullable(Of Integer), ByVal dimension As String, ByVal type As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_CNno As String, ByVal Original_layer As Global.System.Nullable(Of Integer), ByVal Original_dimension As String, ByVal Original_type As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(CNno, layer, dimension, type, status, lastupdate, lastupdatedby, Original_lineNum, Original_CNno, Original_layer, Original_dimension, Original_type, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_ct_header_tempTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_ct_header_temp" tableMapping.ColumnMappings.Add("CNno", "CNno") tableMapping.ColumnMappings.Add("layer", "layer") tableMapping.ColumnMappings.Add("dimension", "dimension") tableMapping.ColumnMappings.Add("type", "type") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_ct_header_temp] ([CNno], [layer], [dimension], [type], [la"& _ "stupdate], [lastupdatedby]) VALUES (@CNno, @layer, @dimension, @type, @lastupdat"& _ "e, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CNno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CNno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layer", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "type", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT CNno, layer, dimension, type, lastupdate, lastupdatedby FROM dbo.log_ct_he"& _ "ader_temp" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_ct_header_tempDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_ct_header_tempDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_ct_header_tempDataTable = New EpsonDataSet1.log_ct_header_tempDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_ct_header_tempDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_ct_header_temp") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal CNno As String, ByVal layer As Global.System.Nullable(Of Integer), ByVal dimension As String, ByVal type As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (CNno Is Nothing) Then Throw New Global.System.ArgumentNullException("CNno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(CNno,String) End If If (layer.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(layer.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (dimension Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(dimension,String) End If If (type Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(type,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_DATableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_DA" tableMapping.ColumnMappings.Add("trackingno", "trackingno") tableMapping.ColumnMappings.Add("inputType", "inputType") tableMapping.ColumnMappings.Add("serial", "serial") tableMapping.ColumnMappings.Add("serialFrom", "serialFrom") tableMapping.ColumnMappings.Add("serialTo", "serialTo") tableMapping.ColumnMappings.Add("batchNo", "batchNo") tableMapping.ColumnMappings.Add("daNumber", "daNumber") tableMapping.ColumnMappings.Add("daDesc", "daDesc") tableMapping.ColumnMappings.Add("daRemarks", "daRemarks") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_DA] ([trackingno], [inputType], [serial], [serialFrom], [s"& _ "erialTo], [batchNo], [daNumber], [daDesc], [daRemarks], [lastupdate], [lastupdat"& _ "edby]) VALUES (@trackingno, @inputType, @serial, @serialFrom, @serialTo, @batchN"& _ "o, @daNumber, @daDesc, @daRemarks, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@inputType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "inputType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serial", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serial", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialFrom", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialFrom", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialTo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialTo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@daNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "daNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@daDesc", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "daDesc", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@daRemarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "daRemarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT trackingno, inputType, serial, serialFrom, serialTo, batchNo, daNumber, da"& _ "Desc, daRemarks, lastupdate, lastupdatedby FROM dbo.log_DA" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_DADataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_DADataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_DADataTable = New EpsonDataSet1.log_DADataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_DADataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_DA") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal trackingno As String, ByVal inputType As String, ByVal serial As String, ByVal serialFrom As String, ByVal serialTo As String, ByVal batchNo As String, ByVal daNumber As String, ByVal daDesc As String, ByVal daRemarks As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(trackingno,String) End If If (inputType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(inputType,String) End If If (serial Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(serial,String) End If If (serialFrom Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(serialFrom,String) End If If (serialTo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(serialTo,String) End If If (batchNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(batchNo,String) End If If (daNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(daNumber,String) End If If (daDesc Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(daDesc,String) End If If (daRemarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(daRemarks,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_labelTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_label" tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("so", "so") tableMapping.ColumnMappings.Add("line", "line") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_label] ([cardno], [serialno], [so], [line], [lastupdate], "& _ "[lastupdatedby]) VALUES (@cardno, @serialno, @so, @line, @lastupdate, @lastupdat"& _ "edby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@so", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "so", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@line", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cardno, serialno, so, line, lastupdate, lastupdatedby FROM dbo.log_label" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_labelDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_labelDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_labelDataTable = New EpsonDataSet1.log_labelDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_labelDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_label") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal cardno As String, ByVal serialno As String, ByVal so As String, ByVal line As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialno,String) End If If (so Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(so,String) End If If (line Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(line,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_labelHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_labelHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("so", "so") tableMapping.ColumnMappings.Add("line", "line") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_labelHist] WHERE (([lineNum] = @Original_lineNum) AND ((@I"& _ "sNull_cardno = 1 AND [cardno] IS NULL) OR ([cardno] = @Original_cardno)) AND ((@"& _ "IsNull_serialno = 1 AND [serialno] IS NULL) OR ([serialno] = @Original_serialno)"& _ ") AND ((@IsNull_so = 1 AND [so] IS NULL) OR ([so] = @Original_so)) AND ((@IsNull"& _ "_line = 1 AND [line] IS NULL) OR ([line] = @Original_line)) AND ((@IsNull_status"& _ " = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastu"& _ "pdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AN"& _ "D ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] ="& _ " @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_so", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "so", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_so", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "so", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_line", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_labelHist] ([cardno], [serialno], [so], [line], [status], "& _ "[lastupdate], [lastupdatedby]) VALUES (@cardno, @serialno, @so, @line, @status, "& _ "@lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, cardno, serialno, so, line, statu"& _ "s, lastupdate, lastupdatedby FROM log_labelHist WHERE (lineNum = SCOPE_IDENTITY("& _ "))" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@so", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "so", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@line", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_labelHist] SET [cardno] = @cardno, [serialno] = @serialno, [so]"& _ " = @so, [line] = @line, [status] = @status, [lastupdate] = @lastupdate, [lastupd"& _ "atedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull_ca"& _ "rdno = 1 AND [cardno] IS NULL) OR ([cardno] = @Original_cardno)) AND ((@IsNull_s"& _ "erialno = 1 AND [serialno] IS NULL) OR ([serialno] = @Original_serialno)) AND (("& _ "@IsNull_so = 1 AND [so] IS NULL) OR ([so] = @Original_so)) AND ((@IsNull_line = "& _ "1 AND [line] IS NULL) OR ([line] = @Original_line)) AND ((@IsNull_status = 1 AND"& _ " [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = "& _ "1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsN"& _ "ull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Origin"& _ "al_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, cardno, serialno, so, line, status, lastup"& _ "date, lastupdatedby FROM log_labelHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@so", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "so", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@line", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_so", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "so", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_so", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "so", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_line", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_line", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "line", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, cardno, serialno, so, line, status, lastupdate, lastupdatedby FRO"& _ "M dbo.log_labelHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_labelHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_labelHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_labelHistDataTable = New EpsonDataSet1.log_labelHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_labelHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_labelHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_cardno As String, ByVal Original_serialno As String, ByVal Original_so As String, ByVal Original_line As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_cardno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_serialno,String) End If If (Original_so Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_so,String) End If If (Original_line Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_line,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal cardno As String, ByVal serialno As String, ByVal so As String, ByVal line As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialno,String) End If If (so Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(so,String) End If If (line Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(line,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal so As String, _ ByVal line As String, _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_so As String, _ ByVal Original_line As String, _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (cardno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(serialno,String) End If If (so Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(so,String) End If If (line Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(line,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_lineNum,Long) If (Original_cardno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_serialno,String) End If If (Original_so Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_so,String) End If If (Original_line Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_line,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(22).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal cardno As String, ByVal serialno As String, ByVal so As String, ByVal line As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_cardno As String, ByVal Original_serialno As String, ByVal Original_so As String, ByVal Original_line As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(cardno, serialno, so, line, status, lastupdate, lastupdatedby, Original_lineNum, Original_cardno, Original_serialno, Original_so, Original_line, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_linkTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_link" tableMapping.ColumnMappings.Add("trackingno", "trackingno") tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("cardnoLink", "cardnoLink") tableMapping.ColumnMappings.Add("serialnoLink", "serialnoLink") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_link] ([trackingno], [cardno], [serialno], [cardnoLink], ["& _ "serialnoLink], [lastupdate], [lastupdatedby]) VALUES (@trackingno, @cardno, @ser"& _ "ialno, @cardnoLink, @serialnoLink, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardnoLink", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialnoLink", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT trackingno, cardno, serialno, cardnoLink, serialnoLink, lastupdate, lastup"& _ "datedby FROM dbo.log_link" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_linkDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_linkDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_linkDataTable = New EpsonDataSet1.log_linkDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_linkDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_link") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal trackingno As String, ByVal cardno As String, ByVal serialno As String, ByVal cardnoLink As String, ByVal serialnoLink As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(trackingno,String) End If If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(serialno,String) End If If (cardnoLink Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(cardnoLink,String) End If If (serialnoLink Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(serialnoLink,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_linkHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_linkHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("cardnoLink", "cardnoLink") tableMapping.ColumnMappings.Add("serialnoLink", "serialnoLink") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_linkHist] WHERE (([lineNum] = @Original_lineNum) AND ((@Is"& _ "Null_cardno = 1 AND [cardno] IS NULL) OR ([cardno] = @Original_cardno)) AND ((@I"& _ "sNull_serialno = 1 AND [serialno] IS NULL) OR ([serialno] = @Original_serialno))"& _ " AND ((@IsNull_cardnoLink = 1 AND [cardnoLink] IS NULL) OR ([cardnoLink] = @Orig"& _ "inal_cardnoLink)) AND ((@IsNull_serialnoLink = 1 AND [serialnoLink] IS NULL) OR "& _ "([serialnoLink] = @Original_serialnoLink)) AND ((@IsNull_status = 1 AND [status]"& _ " IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [la"& _ "stupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastu"& _ "pdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastup"& _ "datedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardnoLink", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardnoLink", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardnoLink", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialnoLink", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialnoLink", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialnoLink", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_linkHist] ([cardno], [serialno], [cardnoLink], [serialnoLi"& _ "nk], [status], [lastupdate], [lastupdatedby]) VALUES (@cardno, @serialno, @cardn"& _ "oLink, @serialnoLink, @status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, ca"& _ "rdno, serialno, cardnoLink, serialnoLink, status, lastupdate, lastupdatedby FROM"& _ " log_linkHist WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardnoLink", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialnoLink", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_linkHist] SET [cardno] = @cardno, [serialno] = @serialno, [card"& _ "noLink] = @cardnoLink, [serialnoLink] = @serialnoLink, [status] = @status, [last"& _ "update] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE (([lineNum] = @Ori"& _ "ginal_lineNum) AND ((@IsNull_cardno = 1 AND [cardno] IS NULL) OR ([cardno] = @Or"& _ "iginal_cardno)) AND ((@IsNull_serialno = 1 AND [serialno] IS NULL) OR ([serialno"& _ "] = @Original_serialno)) AND ((@IsNull_cardnoLink = 1 AND [cardnoLink] IS NULL) "& _ "OR ([cardnoLink] = @Original_cardnoLink)) AND ((@IsNull_serialnoLink = 1 AND [se"& _ "rialnoLink] IS NULL) OR ([serialnoLink] = @Original_serialnoLink)) AND ((@IsNull"& _ "_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNul"& _ "l_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupda"& _ "te)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdat"& _ "edby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, cardno, serialno, cardnoLin"& _ "k, serialnoLink, status, lastupdate, lastupdatedby FROM log_linkHist WHERE (line"& _ "Num = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardnoLink", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialnoLink", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cardnoLink", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardnoLink", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardnoLink", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialnoLink", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialnoLink", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialnoLink", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialnoLink", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, cardno, serialno, cardnoLink, serialnoLink, status, lastupdate, l"& _ "astupdatedby FROM dbo.log_linkHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_linkHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_linkHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_linkHistDataTable = New EpsonDataSet1.log_linkHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_linkHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_linkHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_cardno As String, ByVal Original_serialno As String, ByVal Original_cardnoLink As String, ByVal Original_serialnoLink As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_cardno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_serialno,String) End If If (Original_cardnoLink Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_cardnoLink,String) End If If (Original_serialnoLink Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_serialnoLink,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal cardno As String, ByVal serialno As String, ByVal cardnoLink As String, ByVal serialnoLink As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialno,String) End If If (cardnoLink Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(cardnoLink,String) End If If (serialnoLink Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(serialnoLink,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal cardno As String, _ ByVal serialno As String, _ ByVal cardnoLink As String, _ ByVal serialnoLink As String, _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_cardno As String, _ ByVal Original_serialno As String, _ ByVal Original_cardnoLink As String, _ ByVal Original_serialnoLink As String, _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (cardno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(cardno,String) End If If (serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(serialno,String) End If If (cardnoLink Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(cardnoLink,String) End If If (serialnoLink Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(serialnoLink,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_lineNum,Long) If (Original_cardno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_cardno,String) End If If (Original_serialno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_serialno,String) End If If (Original_cardnoLink Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_cardnoLink,String) End If If (Original_serialnoLink Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_serialnoLink,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(22).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal cardno As String, ByVal serialno As String, ByVal cardnoLink As String, ByVal serialnoLink As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_cardno As String, ByVal Original_serialno As String, ByVal Original_cardnoLink As String, ByVal Original_serialnoLink As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(cardno, serialno, cardnoLink, serialnoLink, status, lastupdate, lastupdatedby, Original_lineNum, Original_cardno, Original_serialno, Original_cardnoLink, Original_serialnoLink, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_lotTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_lot" tableMapping.ColumnMappings.Add("lotNumber", "lotNumber") tableMapping.ColumnMappings.Add("stage", "stage") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("samplingSize", "samplingSize") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_lot] ([lotNumber], [stage], [status], [samplingSize], [las"& _ "tupdate], [lastupdatedby]) VALUES (@lotNumber, @stage, @status, @samplingSize, @"& _ "lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lotNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@samplingSize", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "samplingSize", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lotNumber, stage, status, samplingSize, lastupdate, lastupdatedby FROM dbo"& _ ".log_lot" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_lotDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_lotDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_lotDataTable = New EpsonDataSet1.log_lotDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_lotDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_lot") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal lotNumber As String, ByVal stage As String, ByVal status As String, ByVal samplingSize As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (lotNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(lotNumber,String) End If If (stage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(stage,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(status,String) End If If (samplingSize.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(samplingSize.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_passTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_pass" tableMapping.ColumnMappings.Add("trackingno", "trackingno") tableMapping.ColumnMappings.Add("ptNo", "ptNo") tableMapping.ColumnMappings.Add("stage", "stage") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("machine", "machine") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_pass] ([trackingno], [ptNo], [stage], [quantity], [machine"& _ "], [status], [lastupdate], [lastupdatedby]) VALUES (@trackingno, @ptNo, @stage, "& _ "@quantity, @machine, @status, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT trackingno, ptNo, stage, quantity, machine, status, lastupdate, lastupdate"& _ "dby FROM dbo.log_pass" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_passDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_passDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_passDataTable = New EpsonDataSet1.log_passDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_passDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_pass") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal trackingno As String, ByVal ptNo As String, ByVal stage As String, ByVal quantity As Global.System.Nullable(Of Integer), ByVal machine As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(trackingno,String) End If If (ptNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(ptNo,String) End If If (stage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(stage,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(quantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (machine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(machine,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_pass_serialTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_pass_serial" tableMapping.ColumnMappings.Add("trackingno", "trackingno") tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("stage", "stage") tableMapping.ColumnMappings.Add("machine", "machine") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_pass_serial] ([trackingno], [cardno], [stage], [machine], "& _ "[status], [lastupdate], [lastupdatedby]) VALUES (@trackingno, @cardno, @stage, @"& _ "machine, @status, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT trackingno, cardno, stage, machine, status, lastupdate, lastupdatedby FROM"& _ " dbo.log_pass_serial" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_pass_serialDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_pass_serialDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_pass_serialDataTable = New EpsonDataSet1.log_pass_serialDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_pass_serialDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_pass_serial") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal trackingno As String, ByVal cardno As String, ByVal stage As String, ByVal machine As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(trackingno,String) End If If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(cardno,String) End If If (stage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(stage,String) End If If (machine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(machine,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_PreTest_DetailTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_PreTest_Detail" tableMapping.ColumnMappings.Add("poNumber", "poNumber") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("serialStatus", "serialStatus") tableMapping.ColumnMappings.Add("boxNo", "boxNo") tableMapping.ColumnMappings.Add("cnNo", "cnNo") tableMapping.ColumnMappings.Add("shipNo", "shipNo") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_PreTest_Detail] ([poNumber], [poLine], [serialno], [serial"& _ "Status], [boxNo], [cnNo], [shipNo], [lastupdate], [lastupdatedby]) VALUES (@poNu"& _ "mber, @poLine, @serialno, @serialStatus, @boxNo, @cnNo, @shipNo, @lastupdate, @l"& _ "astupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStatus", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStatus", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@boxNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "boxNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cnNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT poNumber, poLine, serialno, serialStatus, boxNo, cnNo, shipNo, lastupdate,"& _ " lastupdatedby FROM dbo.log_PreTest_Detail" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_PreTest_DetailDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_PreTest_DetailDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_PreTest_DetailDataTable = New EpsonDataSet1.log_PreTest_DetailDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_PreTest_DetailDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_PreTest_Detail") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal poNumber As String, ByVal poLine As String, ByVal serialno As String, ByVal serialStatus As String, ByVal boxNo As String, ByVal cnNo As String, ByVal shipNo As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (poNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(poNumber,String) End If If (poLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(poLine,String) End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(serialno,String) End If If (serialStatus Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(serialStatus,String) End If If (boxNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(boxNo,String) End If If (cnNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(cnNo,String) End If If (shipNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(shipNo,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_repairTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_repair" tableMapping.ColumnMappings.Add("trackingno", "trackingno") tableMapping.ColumnMappings.Add("ptNo", "ptNo") tableMapping.ColumnMappings.Add("stage", "stage") tableMapping.ColumnMappings.Add("machine", "machine") tableMapping.ColumnMappings.Add("category", "category") tableMapping.ColumnMappings.Add("defect", "defect") tableMapping.ColumnMappings.Add("location", "location") tableMapping.ColumnMappings.Add("details", "details") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("unitQuantity", "unitQuantity") tableMapping.ColumnMappings.Add("addinfo", "addinfo") tableMapping.ColumnMappings.Add("serialAffected", "serialAffected") tableMapping.ColumnMappings.Add("component", "component") tableMapping.ColumnMappings.Add("remarks", "remarks") tableMapping.ColumnMappings.Add("rejectDate", "rejectDate") tableMapping.ColumnMappings.Add("rejectUser", "rejectUser") tableMapping.ColumnMappings.Add("repairDate", "repairDate") tableMapping.ColumnMappings.Add("repairUser", "repairUser") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_repair] WHERE (([trackingno] = @Original_trackingno) AND ("& _ "(@IsNull_ptNo = 1 AND [ptNo] IS NULL) OR ([ptNo] = @Original_ptNo)) AND ((@IsNul"& _ "l_stage = 1 AND [stage] IS NULL) OR ([stage] = @Original_stage)) AND ((@IsNull_m"& _ "achine = 1 AND [machine] IS NULL) OR ([machine] = @Original_machine)) AND ((@IsN"& _ "ull_category = 1 AND [category] IS NULL) OR ([category] = @Original_category)) A"& _ "ND ((@IsNull_defect = 1 AND [defect] IS NULL) OR ([defect] = @Original_defect)) "& _ "AND ((@IsNull_location = 1 AND [location] IS NULL) OR ([location] = @Original_lo"& _ "cation)) AND ((@IsNull_details = 1 AND [details] IS NULL) OR ([details] = @Origi"& _ "nal_details)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Ori"& _ "ginal_status)) AND ((@IsNull_quantity = 1 AND [quantity] IS NULL) OR ([quantity]"& _ " = @Original_quantity)) AND ((@IsNull_unitQuantity = 1 AND [unitQuantity] IS NUL"& _ "L) OR ([unitQuantity] = @Original_unitQuantity)) AND ((@IsNull_addinfo = 1 AND ["& _ "addinfo] IS NULL) OR ([addinfo] = @Original_addinfo)) AND ((@IsNull_serialAffect"& _ "ed = 1 AND [serialAffected] IS NULL) OR ([serialAffected] = @Original_serialAffe"& _ "cted)) AND ((@IsNull_component = 1 AND [component] IS NULL) OR ([component] = @O"& _ "riginal_component)) AND ((@IsNull_remarks = 1 AND [remarks] IS NULL) OR ([remark"& _ "s] = @Original_remarks)) AND ((@IsNull_rejectDate = 1 AND [rejectDate] IS NULL) "& _ "OR ([rejectDate] = @Original_rejectDate)) AND ((@IsNull_rejectUser = 1 AND [reje"& _ "ctUser] IS NULL) OR ([rejectUser] = @Original_rejectUser)) AND ((@IsNull_repairD"& _ "ate = 1 AND [repairDate] IS NULL) OR ([repairDate] = @Original_repairDate)) AND "& _ "((@IsNull_repairUser = 1 AND [repairUser] IS NULL) OR ([repairUser] = @Original_"& _ "repairUser)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupd"& _ "ate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby"& _ "] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_stage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_machine", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_category", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_category", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defect", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defect", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defect", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defect", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_location", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_location", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_details", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "details", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_details", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "details", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_unitQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "unitQuantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_unitQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "unitQuantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_addinfo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "addinfo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_addinfo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "addinfo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialAffected", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialAffected", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialAffected", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialAffected", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_component", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_component", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_remarks", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_rejectDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_rejectDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_rejectUser", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectUser", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_rejectUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectUser", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_repairDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_repairDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_repairUser", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairUser", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_repairUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairUser", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_repair] ([trackingno], [ptNo], [stage], [machine], [catego"& _ "ry], [defect], [location], [details], [status], [quantity], [unitQuantity], [add"& _ "info], [serialAffected], [component], [remarks], [rejectDate], [rejectUser], [re"& _ "pairDate], [repairUser], [lastupdate], [lastupdatedby]) VALUES (@trackingno, @pt"& _ "No, @stage, @machine, @category, @defect, @location, @details, @status, @quantit"& _ "y, @unitQuantity, @addinfo, @serialAffected, @component, @remarks, @rejectDate, "& _ "@rejectUser, @repairDate, @repairUser, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT tra"& _ "ckingno, ptNo, stage, machine, category, defect, location, details, status, quan"& _ "tity, unitQuantity, addinfo, serialAffected, component, remarks, rejectDate, rej"& _ "ectUser, repairDate, repairUser, lastupdate, lastupdatedby FROM log_repair WHERE"& _ " (trackingno = @trackingno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@category", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defect", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defect", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@location", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@details", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "details", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@unitQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "unitQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@addinfo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "addinfo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialAffected", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialAffected", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@component", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectUser", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@repairDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@repairUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairUser", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_repair] SET [trackingno] = @trackingno, [ptNo] = @ptNo, [stage]"& _ " = @stage, [machine] = @machine, [category] = @category, [defect] = @defect, [lo"& _ "cation] = @location, [details] = @details, [status] = @status, [quantity] = @qua"& _ "ntity, [unitQuantity] = @unitQuantity, [addinfo] = @addinfo, [serialAffected] = "& _ "@serialAffected, [component] = @component, [remarks] = @remarks, [rejectDate] = "& _ "@rejectDate, [rejectUser] = @rejectUser, [repairDate] = @repairDate, [repairUser"& _ "] = @repairUser, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WH"& _ "ERE (([trackingno] = @Original_trackingno) AND ((@IsNull_ptNo = 1 AND [ptNo] IS "& _ "NULL) OR ([ptNo] = @Original_ptNo)) AND ((@IsNull_stage = 1 AND [stage] IS NULL)"& _ " OR ([stage] = @Original_stage)) AND ((@IsNull_machine = 1 AND [machine] IS NULL"& _ ") OR ([machine] = @Original_machine)) AND ((@IsNull_category = 1 AND [category] "& _ "IS NULL) OR ([category] = @Original_category)) AND ((@IsNull_defect = 1 AND [def"& _ "ect] IS NULL) OR ([defect] = @Original_defect)) AND ((@IsNull_location = 1 AND ["& _ "location] IS NULL) OR ([location] = @Original_location)) AND ((@IsNull_details ="& _ " 1 AND [details] IS NULL) OR ([details] = @Original_details)) AND ((@IsNull_stat"& _ "us = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_qua"& _ "ntity = 1 AND [quantity] IS NULL) OR ([quantity] = @Original_quantity)) AND ((@I"& _ "sNull_unitQuantity = 1 AND [unitQuantity] IS NULL) OR ([unitQuantity] = @Origina"& _ "l_unitQuantity)) AND ((@IsNull_addinfo = 1 AND [addinfo] IS NULL) OR ([addinfo] "& _ "= @Original_addinfo)) AND ((@IsNull_serialAffected = 1 AND [serialAffected] IS N"& _ "ULL) OR ([serialAffected] = @Original_serialAffected)) AND ((@IsNull_component ="& _ " 1 AND [component] IS NULL) OR ([component] = @Original_component)) AND ((@IsNul"& _ "l_remarks = 1 AND [remarks] IS NULL) OR ([remarks] = @Original_remarks)) AND ((@"& _ "IsNull_rejectDate = 1 AND [rejectDate] IS NULL) OR ([rejectDate] = @Original_rej"& _ "ectDate)) AND ((@IsNull_rejectUser = 1 AND [rejectUser] IS NULL) OR ([rejectUser"& _ "] = @Original_rejectUser)) AND ((@IsNull_repairDate = 1 AND [repairDate] IS NULL"& _ ") OR ([repairDate] = @Original_repairDate)) AND ((@IsNull_repairUser = 1 AND [re"& _ "pairUser] IS NULL) OR ([repairUser] = @Original_repairUser)) AND ((@IsNull_lastu"& _ "pdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AN"& _ "D ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] ="& _ " @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT trackingno, ptNo, stage, machine, category,"& _ " defect, location, details, status, quantity, unitQuantity, addinfo, serialAffec"& _ "ted, component, remarks, rejectDate, rejectUser, repairDate, repairUser, lastupd"& _ "ate, lastupdatedby FROM log_repair WHERE (trackingno = @trackingno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@category", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defect", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defect", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@location", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@details", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "details", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@unitQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "unitQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@addinfo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "addinfo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialAffected", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialAffected", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@component", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectUser", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@repairDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@repairUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairUser", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_stage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_machine", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_category", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_category", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_defect", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defect", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_defect", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defect", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_location", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_location", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_details", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "details", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_details", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "details", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_unitQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "unitQuantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_unitQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "unitQuantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_addinfo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "addinfo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_addinfo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "addinfo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialAffected", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialAffected", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialAffected", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialAffected", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_component", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_component", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_remarks", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_rejectDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_rejectDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_rejectUser", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectUser", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_rejectUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectUser", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_repairDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_repairDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_repairUser", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairUser", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_repairUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairUser", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT trackingno, ptNo, stage, machine, category, defect, location, details, sta"& _ "tus, quantity, unitQuantity, addinfo, serialAffected, component, remarks, reject"& _ "Date, rejectUser, repairDate, repairUser, lastupdate, lastupdatedby FROM dbo.log"& _ "_repair" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_repairDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_repairDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_repairDataTable = New EpsonDataSet1.log_repairDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_repairDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_repair") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete( _ ByVal Original_trackingno As String, _ ByVal Original_ptNo As String, _ ByVal Original_stage As String, _ ByVal Original_machine As String, _ ByVal Original_category As String, _ ByVal Original_defect As String, _ ByVal Original_location As String, _ ByVal Original_details As String, _ ByVal Original_status As String, _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_unitQuantity As Global.System.Nullable(Of Integer), _ ByVal Original_addinfo As String, _ ByVal Original_serialAffected As String, _ ByVal Original_component As String, _ ByVal Original_remarks As String, _ ByVal Original_rejectDate As Global.System.Nullable(Of Date), _ ByVal Original_rejectUser As String, _ ByVal Original_repairDate As Global.System.Nullable(Of Date), _ ByVal Original_repairUser As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer If (Original_trackingno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_trackingno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_trackingno,String) End If If (Original_ptNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_ptNo,String) End If If (Original_stage Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_stage,String) End If If (Original_machine Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_machine,String) End If If (Original_category Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_category,String) End If If (Original_defect Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_defect,String) End If If (Original_location Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_location,String) End If If (Original_details Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_details,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_status,String) End If If (Original_quantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_quantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_unitQuantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_unitQuantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_addinfo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_addinfo,String) End If If (Original_serialAffected Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = CType(Original_serialAffected,String) End If If (Original_component Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = CType(Original_component,String) End If If (Original_remarks Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = CType(Original_remarks,String) End If If (Original_rejectDate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(30).Value = CType(Original_rejectDate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(30).Value = Global.System.DBNull.Value End If If (Original_rejectUser Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(31).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(32).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(31).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(32).Value = CType(Original_rejectUser,String) End If If (Original_repairDate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(33).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(34).Value = CType(Original_repairDate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(33).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(34).Value = Global.System.DBNull.Value End If If (Original_repairUser Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(35).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(36).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(35).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(36).Value = CType(Original_repairUser,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(37).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(38).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(37).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(38).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(39).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(40).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(39).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(40).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert( _ ByVal trackingno As String, _ ByVal ptNo As String, _ ByVal stage As String, _ ByVal machine As String, _ ByVal category As String, _ ByVal defect As String, _ ByVal location As String, _ ByVal details As String, _ ByVal status As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal unitQuantity As Global.System.Nullable(Of Integer), _ ByVal addinfo As String, _ ByVal serialAffected As String, _ ByVal component As String, _ ByVal remarks As String, _ ByVal rejectDate As Global.System.Nullable(Of Date), _ ByVal rejectUser As String, _ ByVal repairDate As Global.System.Nullable(Of Date), _ ByVal repairUser As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Throw New Global.System.ArgumentNullException("trackingno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(trackingno,String) End If If (ptNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(ptNo,String) End If If (stage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(stage,String) End If If (machine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(machine,String) End If If (category Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(category,String) End If If (defect Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(defect,String) End If If (location Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(location,String) End If If (details Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(details,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(status,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(quantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (unitQuantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(unitQuantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (addinfo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(addinfo,String) End If If (serialAffected Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(serialAffected,String) End If If (component Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(component,String) End If If (remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(remarks,String) End If If (rejectDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(rejectDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (rejectUser Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(rejectUser,String) End If If (repairDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(17).Value = CType(repairDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (repairUser Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(repairUser,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(19).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal trackingno As String, _ ByVal ptNo As String, _ ByVal stage As String, _ ByVal machine As String, _ ByVal category As String, _ ByVal defect As String, _ ByVal location As String, _ ByVal details As String, _ ByVal status As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal unitQuantity As Global.System.Nullable(Of Integer), _ ByVal addinfo As String, _ ByVal serialAffected As String, _ ByVal component As String, _ ByVal remarks As String, _ ByVal rejectDate As Global.System.Nullable(Of Date), _ ByVal rejectUser As String, _ ByVal repairDate As Global.System.Nullable(Of Date), _ ByVal repairUser As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_trackingno As String, _ ByVal Original_ptNo As String, _ ByVal Original_stage As String, _ ByVal Original_machine As String, _ ByVal Original_category As String, _ ByVal Original_defect As String, _ ByVal Original_location As String, _ ByVal Original_details As String, _ ByVal Original_status As String, _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_unitQuantity As Global.System.Nullable(Of Integer), _ ByVal Original_addinfo As String, _ ByVal Original_serialAffected As String, _ ByVal Original_component As String, _ ByVal Original_remarks As String, _ ByVal Original_rejectDate As Global.System.Nullable(Of Date), _ ByVal Original_rejectUser As String, _ ByVal Original_repairDate As Global.System.Nullable(Of Date), _ ByVal Original_repairUser As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Throw New Global.System.ArgumentNullException("trackingno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(trackingno,String) End If If (ptNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(ptNo,String) End If If (stage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(stage,String) End If If (machine Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(machine,String) End If If (category Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(category,String) End If If (defect Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(defect,String) End If If (location Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(location,String) End If If (details Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(details,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(status,String) End If If (quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (unitQuantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(unitQuantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (addinfo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(addinfo,String) End If If (serialAffected Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(serialAffected,String) End If If (component Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(component,String) End If If (remarks Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(remarks,String) End If If (rejectDate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(rejectDate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (rejectUser Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(rejectUser,String) End If If (repairDate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(repairDate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (repairUser Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(repairUser,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(lastupdatedby,String) End If If (Original_trackingno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_trackingno") Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_trackingno,String) End If If (Original_ptNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_ptNo,String) End If If (Original_stage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(24).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(24).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = CType(Original_stage,String) End If If (Original_machine Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(26).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(26).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = CType(Original_machine,String) End If If (Original_category Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(28).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(28).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = CType(Original_category,String) End If If (Original_defect Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(30).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(30).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = CType(Original_defect,String) End If If (Original_location Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(32).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(33).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(32).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(33).Value = CType(Original_location,String) End If If (Original_details Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(34).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(35).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(34).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(35).Value = CType(Original_details,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(36).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(37).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(36).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(37).Value = CType(Original_status,String) End If If (Original_quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(38).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(39).Value = CType(Original_quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(38).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(39).Value = Global.System.DBNull.Value End If If (Original_unitQuantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(40).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(41).Value = CType(Original_unitQuantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(40).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(41).Value = Global.System.DBNull.Value End If If (Original_addinfo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(42).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(43).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(42).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(43).Value = CType(Original_addinfo,String) End If If (Original_serialAffected Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(44).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(45).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(44).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(45).Value = CType(Original_serialAffected,String) End If If (Original_component Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(46).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(47).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(46).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(47).Value = CType(Original_component,String) End If If (Original_remarks Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(48).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(49).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(48).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(49).Value = CType(Original_remarks,String) End If If (Original_rejectDate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(50).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(51).Value = CType(Original_rejectDate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(50).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(51).Value = Global.System.DBNull.Value End If If (Original_rejectUser Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(52).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(53).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(52).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(53).Value = CType(Original_rejectUser,String) End If If (Original_repairDate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(54).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(55).Value = CType(Original_repairDate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(54).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(55).Value = Global.System.DBNull.Value End If If (Original_repairUser Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(56).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(57).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(56).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(57).Value = CType(Original_repairUser,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(58).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(59).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(58).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(59).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(60).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(61).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(60).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(61).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal ptNo As String, _ ByVal stage As String, _ ByVal machine As String, _ ByVal category As String, _ ByVal defect As String, _ ByVal location As String, _ ByVal details As String, _ ByVal status As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal unitQuantity As Global.System.Nullable(Of Integer), _ ByVal addinfo As String, _ ByVal serialAffected As String, _ ByVal component As String, _ ByVal remarks As String, _ ByVal rejectDate As Global.System.Nullable(Of Date), _ ByVal rejectUser As String, _ ByVal repairDate As Global.System.Nullable(Of Date), _ ByVal repairUser As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_trackingno As String, _ ByVal Original_ptNo As String, _ ByVal Original_stage As String, _ ByVal Original_machine As String, _ ByVal Original_category As String, _ ByVal Original_defect As String, _ ByVal Original_location As String, _ ByVal Original_details As String, _ ByVal Original_status As String, _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_unitQuantity As Global.System.Nullable(Of Integer), _ ByVal Original_addinfo As String, _ ByVal Original_serialAffected As String, _ ByVal Original_component As String, _ ByVal Original_remarks As String, _ ByVal Original_rejectDate As Global.System.Nullable(Of Date), _ ByVal Original_rejectUser As String, _ ByVal Original_repairDate As Global.System.Nullable(Of Date), _ ByVal Original_repairUser As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_trackingno, ptNo, stage, machine, category, defect, location, details, status, quantity, unitQuantity, addinfo, serialAffected, component, remarks, rejectDate, rejectUser, repairDate, repairUser, lastupdate, lastupdatedby, Original_trackingno, Original_ptNo, Original_stage, Original_machine, Original_category, Original_defect, Original_location, Original_details, Original_status, Original_quantity, Original_unitQuantity, Original_addinfo, Original_serialAffected, Original_component, Original_remarks, Original_rejectDate, Original_rejectUser, Original_repairDate, Original_repairUser, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_repair_faTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_repair_fa" tableMapping.ColumnMappings.Add("trackingno", "trackingno") tableMapping.ColumnMappings.Add("ptNo", "ptNo") tableMapping.ColumnMappings.Add("stage", "stage") tableMapping.ColumnMappings.Add("machine", "machine") tableMapping.ColumnMappings.Add("category", "category") tableMapping.ColumnMappings.Add("defect", "defect") tableMapping.ColumnMappings.Add("location", "location") tableMapping.ColumnMappings.Add("details", "details") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("unitQuantity", "unitQuantity") tableMapping.ColumnMappings.Add("addinfo", "addinfo") tableMapping.ColumnMappings.Add("serialAffected", "serialAffected") tableMapping.ColumnMappings.Add("component", "component") tableMapping.ColumnMappings.Add("remarks", "remarks") tableMapping.ColumnMappings.Add("rejectDate", "rejectDate") tableMapping.ColumnMappings.Add("rejectUser", "rejectUser") tableMapping.ColumnMappings.Add("repairDate", "repairDate") tableMapping.ColumnMappings.Add("repairUser", "repairUser") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_repair_fa] ([trackingno], [ptNo], [stage], [machine], [cat"& _ "egory], [defect], [location], [details], [status], [quantity], [unitQuantity], ["& _ "addinfo], [serialAffected], [component], [remarks], [rejectDate], [rejectUser], "& _ "[repairDate], [repairUser], [lastupdate], [lastupdatedby]) VALUES (@trackingno, "& _ "@ptNo, @stage, @machine, @category, @defect, @location, @details, @status, @quan"& _ "tity, @unitQuantity, @addinfo, @serialAffected, @component, @remarks, @rejectDat"& _ "e, @rejectUser, @repairDate, @repairUser, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@category", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defect", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defect", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@location", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@details", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "details", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@unitQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "unitQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@addinfo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "addinfo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialAffected", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialAffected", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@component", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectUser", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@repairDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@repairUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairUser", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT trackingno, ptNo, stage, machine, category, defect, location, details, sta"& _ "tus, quantity, unitQuantity, addinfo, serialAffected, component, remarks, reject"& _ "Date, rejectUser, repairDate, repairUser, lastupdate, lastupdatedby FROM dbo.log"& _ "_repair_fa" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_repair_faDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_repair_faDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_repair_faDataTable = New EpsonDataSet1.log_repair_faDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_repair_faDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_repair_fa") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal trackingno As String, _ ByVal ptNo As String, _ ByVal stage As String, _ ByVal machine As String, _ ByVal category As String, _ ByVal defect As String, _ ByVal location As String, _ ByVal details As String, _ ByVal status As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal unitQuantity As Global.System.Nullable(Of Integer), _ ByVal addinfo As String, _ ByVal serialAffected As String, _ ByVal component As String, _ ByVal remarks As String, _ ByVal rejectDate As Global.System.Nullable(Of Date), _ ByVal rejectUser As String, _ ByVal repairDate As Global.System.Nullable(Of Date), _ ByVal repairUser As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Throw New Global.System.ArgumentNullException("trackingno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(trackingno,String) End If If (ptNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(ptNo,String) End If If (stage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(stage,String) End If If (machine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(machine,String) End If If (category Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(category,String) End If If (defect Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(defect,String) End If If (location Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(location,String) End If If (details Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(details,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(status,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(quantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (unitQuantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(unitQuantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (addinfo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(addinfo,String) End If If (serialAffected Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(serialAffected,String) End If If (component Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(component,String) End If If (remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(remarks,String) End If If (rejectDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(rejectDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (rejectUser Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(rejectUser,String) End If If (repairDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(17).Value = CType(repairDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (repairUser Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(repairUser,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(19).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_repair_serialTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_repair_serial" tableMapping.ColumnMappings.Add("trackingno", "trackingno") tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("stage", "stage") tableMapping.ColumnMappings.Add("machine", "machine") tableMapping.ColumnMappings.Add("category", "category") tableMapping.ColumnMappings.Add("defect", "defect") tableMapping.ColumnMappings.Add("location", "location") tableMapping.ColumnMappings.Add("details", "details") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("addinfo", "addinfo") tableMapping.ColumnMappings.Add("serialAffected", "serialAffected") tableMapping.ColumnMappings.Add("component", "component") tableMapping.ColumnMappings.Add("remarks", "remarks") tableMapping.ColumnMappings.Add("rejectDate", "rejectDate") tableMapping.ColumnMappings.Add("rejectUser", "rejectUser") tableMapping.ColumnMappings.Add("repairDate", "repairDate") tableMapping.ColumnMappings.Add("repairUser", "repairUser") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_repair_serial] ([trackingno], [cardno], [stage], [machine]"& _ ", [category], [defect], [location], [details], [status], [addinfo], [serialAffec"& _ "ted], [component], [remarks], [rejectDate], [rejectUser], [repairDate], [repairU"& _ "ser], [lastupdate], [lastupdatedby]) VALUES (@trackingno, @cardno, @stage, @mach"& _ "ine, @category, @defect, @location, @details, @status, @addinfo, @serialAffected"& _ ", @component, @remarks, @rejectDate, @rejectUser, @repairDate, @repairUser, @las"& _ "tupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@trackingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "trackingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@category", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "category", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@defect", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "defect", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@location", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@details", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "details", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@addinfo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "addinfo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialAffected", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialAffected", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@component", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "component", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@rejectUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "rejectUser", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@repairDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@repairUser", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "repairUser", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT trackingno, cardno, stage, machine, category, defect, location, details, s"& _ "tatus, addinfo, serialAffected, component, remarks, rejectDate, rejectUser, repa"& _ "irDate, repairUser, lastupdate, lastupdatedby FROM dbo.log_repair_serial" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_repair_serialDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_repair_serialDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_repair_serialDataTable = New EpsonDataSet1.log_repair_serialDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_repair_serialDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_repair_serial") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal trackingno As String, _ ByVal cardno As String, _ ByVal stage As String, _ ByVal machine As String, _ ByVal category As String, _ ByVal defect As String, _ ByVal location As String, _ ByVal details As String, _ ByVal status As String, _ ByVal addinfo As String, _ ByVal serialAffected As String, _ ByVal component As String, _ ByVal remarks As String, _ ByVal rejectDate As Global.System.Nullable(Of Date), _ ByVal rejectUser As String, _ ByVal repairDate As Global.System.Nullable(Of Date), _ ByVal repairUser As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String) As Integer If (trackingno Is Nothing) Then Throw New Global.System.ArgumentNullException("trackingno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(trackingno,String) End If If (cardno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(cardno,String) End If If (stage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(stage,String) End If If (machine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(machine,String) End If If (category Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(category,String) End If If (defect Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(defect,String) End If If (location Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(location,String) End If If (details Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(details,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(status,String) End If If (addinfo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(addinfo,String) End If If (serialAffected Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(serialAffected,String) End If If (component Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(component,String) End If If (remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(remarks,String) End If If (rejectDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(13).Value = CType(rejectDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (rejectUser Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(rejectUser,String) End If If (repairDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(repairDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (repairUser Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(repairUser,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(17).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_serialTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_serial" tableMapping.ColumnMappings.Add("batchno", "batchno") tableMapping.ColumnMappings.Add("serialStart", "serialStart") tableMapping.ColumnMappings.Add("serialEnd", "serialEnd") tableMapping.ColumnMappings.Add("serialStartHex", "serialStartHex") tableMapping.ColumnMappings.Add("serialEndHex", "serialEndHex") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("revision", "revision") tableMapping.ColumnMappings.Add("modelRef", "modelRef") tableMapping.ColumnMappings.Add("modelRefRev", "modelRefRev") tableMapping.ColumnMappings.Add("alvBatchRef", "alvBatchRef") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("remarks", "remarks") tableMapping.ColumnMappings.Add("fileRef", "fileRef") tableMapping.ColumnMappings.Add("fileRef2", "fileRef2") tableMapping.ColumnMappings.Add("generated", "generated") tableMapping.ColumnMappings.Add("generatedby", "generatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_serial] WHERE (([batchno] = @Original_batchno) AND ((@IsNu"& _ "ll_serialStart = 1 AND [serialStart] IS NULL) OR ([serialStart] = @Original_seri"& _ "alStart)) AND ((@IsNull_serialEnd = 1 AND [serialEnd] IS NULL) OR ([serialEnd] ="& _ " @Original_serialEnd)) AND ((@IsNull_serialStartHex = 1 AND [serialStartHex] IS "& _ "NULL) OR ([serialStartHex] = @Original_serialStartHex)) AND ((@IsNull_serialEndH"& _ "ex = 1 AND [serialEndHex] IS NULL) OR ([serialEndHex] = @Original_serialEndHex))"& _ " AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AN"& _ "D ((@IsNull_revision = 1 AND [revision] IS NULL) OR ([revision] = @Original_revi"& _ "sion)) AND ((@IsNull_modelRef = 1 AND [modelRef] IS NULL) OR ([modelRef] = @Orig"& _ "inal_modelRef)) AND ((@IsNull_modelRefRev = 1 AND [modelRefRev] IS NULL) OR ([mo"& _ "delRefRev] = @Original_modelRefRev)) AND ((@IsNull_alvBatchRef = 1 AND [alvBatch"& _ "Ref] IS NULL) OR ([alvBatchRef] = @Original_alvBatchRef)) AND ((@IsNull_quantity"& _ " = 1 AND [quantity] IS NULL) OR ([quantity] = @Original_quantity)) AND ((@IsNull"& _ "_remarks = 1 AND [remarks] IS NULL) OR ([remarks] = @Original_remarks)) AND ((@I"& _ "sNull_fileRef = 1 AND [fileRef] IS NULL) OR ([fileRef] = @Original_fileRef)) AND"& _ " ((@IsNull_fileRef2 = 1 AND [fileRef2] IS NULL) OR ([fileRef2] = @Original_fileR"& _ "ef2)) AND ((@IsNull_generated = 1 AND [generated] IS NULL) OR ([generated] = @Or"& _ "iginal_generated)) AND ((@IsNull_generatedby = 1 AND [generatedby] IS NULL) OR ("& _ "[generatedby] = @Original_generatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialStart", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialStart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialEnd", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialEnd", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialStartHex", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialStartHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialEndHex", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialEndHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_revision", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelRefRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRefRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelRefRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRefRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_alvBatchRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "alvBatchRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_alvBatchRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "alvBatchRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_remarks", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_fileRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_fileRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_fileRef2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_fileRef2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_generated", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_generated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_generatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_generatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_serial] ([batchno], [serialStart], [serialEnd], [serialSta"& _ "rtHex], [serialEndHex], [model], [revision], [modelRef], [modelRefRev], [alvBatc"& _ "hRef], [quantity], [remarks], [fileRef], [fileRef2], [generated], [generatedby])"& _ " VALUES (@batchno, @serialStart, @serialEnd, @serialStartHex, @serialEndHex, @mo"& _ "del, @revision, @modelRef, @modelRefRev, @alvBatchRef, @quantity, @remarks, @fil"& _ "eRef, @fileRef2, @generated, @generatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT batchno, serialStart, serial"& _ "End, serialStartHex, serialEndHex, model, revision, modelRef, modelRefRev, alvBa"& _ "tchRef, quantity, remarks, fileRef, fileRef2, generated, generatedby FROM log_se"& _ "rial WHERE (batchno = @batchno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialEnd", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStartHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialEndHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelRefRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRefRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@alvBatchRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "alvBatchRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@fileRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@fileRef2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@generated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@generatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_serial] SET [batchno] = @batchno, [serialStart] = @serialStart,"& _ " [serialEnd] = @serialEnd, [serialStartHex] = @serialStartHex, [serialEndHex] = "& _ "@serialEndHex, [model] = @model, [revision] = @revision, [modelRef] = @modelRef,"& _ " [modelRefRev] = @modelRefRev, [alvBatchRef] = @alvBatchRef, [quantity] = @quant"& _ "ity, [remarks] = @remarks, [fileRef] = @fileRef, [fileRef2] = @fileRef2, [genera"& _ "ted] = @generated, [generatedby] = @generatedby WHERE (([batchno] = @Original_ba"& _ "tchno) AND ((@IsNull_serialStart = 1 AND [serialStart] IS NULL) OR ([serialStart"& _ "] = @Original_serialStart)) AND ((@IsNull_serialEnd = 1 AND [serialEnd] IS NULL)"& _ " OR ([serialEnd] = @Original_serialEnd)) AND ((@IsNull_serialStartHex = 1 AND [s"& _ "erialStartHex] IS NULL) OR ([serialStartHex] = @Original_serialStartHex)) AND (("& _ "@IsNull_serialEndHex = 1 AND [serialEndHex] IS NULL) OR ([serialEndHex] = @Origi"& _ "nal_serialEndHex)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @O"& _ "riginal_model)) AND ((@IsNull_revision = 1 AND [revision] IS NULL) OR ([revision"& _ "] = @Original_revision)) AND ((@IsNull_modelRef = 1 AND [modelRef] IS NULL) OR ("& _ "[modelRef] = @Original_modelRef)) AND ((@IsNull_modelRefRev = 1 AND [modelRefRev"& _ "] IS NULL) OR ([modelRefRev] = @Original_modelRefRev)) AND ((@IsNull_alvBatchRef"& _ " = 1 AND [alvBatchRef] IS NULL) OR ([alvBatchRef] = @Original_alvBatchRef)) AND "& _ "((@IsNull_quantity = 1 AND [quantity] IS NULL) OR ([quantity] = @Original_quanti"& _ "ty)) AND ((@IsNull_remarks = 1 AND [remarks] IS NULL) OR ([remarks] = @Original_"& _ "remarks)) AND ((@IsNull_fileRef = 1 AND [fileRef] IS NULL) OR ([fileRef] = @Orig"& _ "inal_fileRef)) AND ((@IsNull_fileRef2 = 1 AND [fileRef2] IS NULL) OR ([fileRef2]"& _ " = @Original_fileRef2)) AND ((@IsNull_generated = 1 AND [generated] IS NULL) OR "& _ "([generated] = @Original_generated)) AND ((@IsNull_generatedby = 1 AND [generate"& _ "dby] IS NULL) OR ([generatedby] = @Original_generatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT batchno, ser"& _ "ialStart, serialEnd, serialStartHex, serialEndHex, model, revision, modelRef, mo"& _ "delRefRev, alvBatchRef, quantity, remarks, fileRef, fileRef2, generated, generat"& _ "edby FROM log_serial WHERE (batchno = @batchno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialEnd", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialStartHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialEndHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelRefRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRefRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@alvBatchRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "alvBatchRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@fileRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@fileRef2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@generated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@generatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialStart", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialStart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStart", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialEnd", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialEnd", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEnd", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialStartHex", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialStartHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialStartHex", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_serialEndHex", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_serialEndHex", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialEndHex", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_model", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_revision", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelRefRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRefRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelRefRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelRefRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_alvBatchRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "alvBatchRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_alvBatchRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "alvBatchRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_remarks", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_fileRef", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_fileRef", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_fileRef2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_fileRef2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "fileRef2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_generated", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_generated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generated", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_generatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_generatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "generatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT batchno, serialStart, serialEnd, serialStartHex, serialEndHex, model, revi"& _ "sion, modelRef, modelRefRev, alvBatchRef, quantity, remarks, fileRef, fileRef2, "& _ "generated, generatedby FROM dbo.log_serial" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_serialDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_serialDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_serialDataTable = New EpsonDataSet1.log_serialDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_serialDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_serial") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete( _ ByVal Original_batchno As String, _ ByVal Original_serialStart As String, _ ByVal Original_serialEnd As String, _ ByVal Original_serialStartHex As String, _ ByVal Original_serialEndHex As String, _ ByVal Original_model As String, _ ByVal Original_revision As String, _ ByVal Original_modelRef As String, _ ByVal Original_modelRefRev As String, _ ByVal Original_alvBatchRef As String, _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_remarks As String, _ ByVal Original_fileRef As String, _ ByVal Original_fileRef2 As String, _ ByVal Original_generated As Global.System.Nullable(Of Date), _ ByVal Original_generatedby As String) As Integer If (Original_batchno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_batchno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_batchno,String) End If If (Original_serialStart Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_serialStart,String) End If If (Original_serialEnd Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_serialEnd,String) End If If (Original_serialStartHex Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_serialStartHex,String) End If If (Original_serialEndHex Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_serialEndHex,String) End If If (Original_model Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_model,String) End If If (Original_revision Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_revision,String) End If If (Original_modelRef Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_modelRef,String) End If If (Original_modelRefRev Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_modelRefRev,String) End If If (Original_alvBatchRef Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_alvBatchRef,String) End If If (Original_quantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_quantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_remarks Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_remarks,String) End If If (Original_fileRef Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = CType(Original_fileRef,String) End If If (Original_fileRef2 Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = CType(Original_fileRef2,String) End If If (Original_generated.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = CType(Original_generated.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = Global.System.DBNull.Value End If If (Original_generatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(30).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(30).Value = CType(Original_generatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert( _ ByVal batchno As String, _ ByVal serialStart As String, _ ByVal serialEnd As String, _ ByVal serialStartHex As String, _ ByVal serialEndHex As String, _ ByVal model As String, _ ByVal revision As String, _ ByVal modelRef As String, _ ByVal modelRefRev As String, _ ByVal alvBatchRef As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal remarks As String, _ ByVal fileRef As String, _ ByVal fileRef2 As String, _ ByVal generated As Global.System.Nullable(Of Date), _ ByVal generatedby As String) As Integer If (batchno Is Nothing) Then Throw New Global.System.ArgumentNullException("batchno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(batchno,String) End If If (serialStart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(serialStart,String) End If If (serialEnd Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(serialEnd,String) End If If (serialStartHex Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(serialStartHex,String) End If If (serialEndHex Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(serialEndHex,String) End If If (model Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(model,String) End If If (revision Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(revision,String) End If If (modelRef Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(modelRef,String) End If If (modelRefRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(modelRefRev,String) End If If (alvBatchRef Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(alvBatchRef,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(quantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(remarks,String) End If If (fileRef Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(fileRef,String) End If If (fileRef2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(fileRef2,String) End If If (generated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(14).Value = CType(generated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (generatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(15).Value = CType(generatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal batchno As String, _ ByVal serialStart As String, _ ByVal serialEnd As String, _ ByVal serialStartHex As String, _ ByVal serialEndHex As String, _ ByVal model As String, _ ByVal revision As String, _ ByVal modelRef As String, _ ByVal modelRefRev As String, _ ByVal alvBatchRef As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal remarks As String, _ ByVal fileRef As String, _ ByVal fileRef2 As String, _ ByVal generated As Global.System.Nullable(Of Date), _ ByVal generatedby As String, _ ByVal Original_batchno As String, _ ByVal Original_serialStart As String, _ ByVal Original_serialEnd As String, _ ByVal Original_serialStartHex As String, _ ByVal Original_serialEndHex As String, _ ByVal Original_model As String, _ ByVal Original_revision As String, _ ByVal Original_modelRef As String, _ ByVal Original_modelRefRev As String, _ ByVal Original_alvBatchRef As String, _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_remarks As String, _ ByVal Original_fileRef As String, _ ByVal Original_fileRef2 As String, _ ByVal Original_generated As Global.System.Nullable(Of Date), _ ByVal Original_generatedby As String) As Integer If (batchno Is Nothing) Then Throw New Global.System.ArgumentNullException("batchno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(batchno,String) End If If (serialStart Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(serialStart,String) End If If (serialEnd Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(serialEnd,String) End If If (serialStartHex Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(serialStartHex,String) End If If (serialEndHex Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(serialEndHex,String) End If If (model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(model,String) End If If (revision Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(revision,String) End If If (modelRef Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(modelRef,String) End If If (modelRefRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(modelRefRev,String) End If If (alvBatchRef Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(alvBatchRef,String) End If If (quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (remarks Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(remarks,String) End If If (fileRef Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(fileRef,String) End If If (fileRef2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(fileRef2,String) End If If (generated.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(generated.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (generatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(generatedby,String) End If If (Original_batchno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_batchno") Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_batchno,String) End If If (Original_serialStart Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_serialStart,String) End If If (Original_serialEnd Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_serialEnd,String) End If If (Original_serialStartHex Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_serialStartHex,String) End If If (Original_serialEndHex Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_serialEndHex,String) End If If (Original_model Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = CType(Original_model,String) End If If (Original_revision Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = CType(Original_revision,String) End If If (Original_modelRef Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = CType(Original_modelRef,String) End If If (Original_modelRefRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(31).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(32).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(31).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(32).Value = CType(Original_modelRefRev,String) End If If (Original_alvBatchRef Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(33).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(34).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(33).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(34).Value = CType(Original_alvBatchRef,String) End If If (Original_quantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(35).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(36).Value = CType(Original_quantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(35).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(36).Value = Global.System.DBNull.Value End If If (Original_remarks Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(37).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(38).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(37).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(38).Value = CType(Original_remarks,String) End If If (Original_fileRef Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(39).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(40).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(39).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(40).Value = CType(Original_fileRef,String) End If If (Original_fileRef2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(41).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(42).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(41).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(42).Value = CType(Original_fileRef2,String) End If If (Original_generated.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(43).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(44).Value = CType(Original_generated.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(43).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(44).Value = Global.System.DBNull.Value End If If (Original_generatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(45).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(46).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(45).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(46).Value = CType(Original_generatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal serialStart As String, _ ByVal serialEnd As String, _ ByVal serialStartHex As String, _ ByVal serialEndHex As String, _ ByVal model As String, _ ByVal revision As String, _ ByVal modelRef As String, _ ByVal modelRefRev As String, _ ByVal alvBatchRef As String, _ ByVal quantity As Global.System.Nullable(Of Integer), _ ByVal remarks As String, _ ByVal fileRef As String, _ ByVal fileRef2 As String, _ ByVal generated As Global.System.Nullable(Of Date), _ ByVal generatedby As String, _ ByVal Original_batchno As String, _ ByVal Original_serialStart As String, _ ByVal Original_serialEnd As String, _ ByVal Original_serialStartHex As String, _ ByVal Original_serialEndHex As String, _ ByVal Original_model As String, _ ByVal Original_revision As String, _ ByVal Original_modelRef As String, _ ByVal Original_modelRefRev As String, _ ByVal Original_alvBatchRef As String, _ ByVal Original_quantity As Global.System.Nullable(Of Integer), _ ByVal Original_remarks As String, _ ByVal Original_fileRef As String, _ ByVal Original_fileRef2 As String, _ ByVal Original_generated As Global.System.Nullable(Of Date), _ ByVal Original_generatedby As String) As Integer Return Me.Update(Original_batchno, serialStart, serialEnd, serialStartHex, serialEndHex, model, revision, modelRef, modelRefRev, alvBatchRef, quantity, remarks, fileRef, fileRef2, generated, generatedby, Original_batchno, Original_serialStart, Original_serialEnd, Original_serialStartHex, Original_serialEndHex, Original_model, Original_revision, Original_modelRef, Original_modelRefRev, Original_alvBatchRef, Original_quantity, Original_remarks, Original_fileRef, Original_fileRef2, Original_generated, Original_generatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_SH_DetailTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_SH_Detail" tableMapping.ColumnMappings.Add("shipNo", "shipNo") tableMapping.ColumnMappings.Add("cnNo", "cnNo") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_SH_Detail] ([shipNo], [cnNo], [lastupdate], [lastupdatedby"& _ "]) VALUES (@shipNo, @cnNo, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cnNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT shipNo, cnNo, lastupdate, lastupdatedby FROM dbo.log_SH_Detail" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_SH_DetailDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_SH_DetailDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_SH_DetailDataTable = New EpsonDataSet1.log_SH_DetailDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_SH_DetailDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_SH_Detail") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal shipNo As String, ByVal cnNo As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (shipNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(shipNo,String) End If If (cnNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(cnNo,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_SH_Detail_HistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_SH_Detail_Hist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("shipNo", "shipNo") tableMapping.ColumnMappings.Add("cnNo", "cnNo") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_SH_Detail_Hist] WHERE (([lineNum] = @Original_lineNum) AND"& _ " ((@IsNull_shipNo = 1 AND [shipNo] IS NULL) OR ([shipNo] = @Original_shipNo)) AN"& _ "D ((@IsNull_cnNo = 1 AND [cnNo] IS NULL) OR ([cnNo] = @Original_cnNo)) AND ((@Is"& _ "Null_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@I"& _ "sNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_last"& _ "update)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastu"& _ "pdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cnNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cnNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_SH_Detail_Hist] ([shipNo], [cnNo], [status], [lastupdate],"& _ " [lastupdatedby]) VALUES (@shipNo, @cnNo, @status, @lastupdate, @lastupdatedby);"& _ ""&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, shipNo, cnNo, status, lastupdate, lastupdatedby FROM log_SH_De"& _ "tail_Hist WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cnNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_SH_Detail_Hist] SET [shipNo] = @shipNo, [cnNo] = @cnNo, [status"& _ "] = @status, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE "& _ "(([lineNum] = @Original_lineNum) AND ((@IsNull_shipNo = 1 AND [shipNo] IS NULL) "& _ "OR ([shipNo] = @Original_shipNo)) AND ((@IsNull_cnNo = 1 AND [cnNo] IS NULL) OR "& _ "([cnNo] = @Original_cnNo)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([s"& _ "tatus] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NUL"& _ "L) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND"& _ " [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SEL"& _ "ECT lineNum, shipNo, cnNo, status, lastupdate, lastupdatedby FROM log_SH_Detail_"& _ "Hist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cnNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_cnNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cnNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, shipNo, cnNo, status, lastupdate, lastupdatedby FROM dbo.log_SH_D"& _ "etail_Hist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_SH_Detail_HistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_SH_Detail_HistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_SH_Detail_HistDataTable = New EpsonDataSet1.log_SH_Detail_HistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_SH_Detail_HistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_SH_Detail_Hist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_shipNo As String, ByVal Original_cnNo As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_shipNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_shipNo,String) End If If (Original_cnNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_cnNo,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal shipNo As String, ByVal cnNo As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (shipNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(shipNo,String) End If If (cnNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(cnNo,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal shipNo As String, ByVal cnNo As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_shipNo As String, ByVal Original_cnNo As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (shipNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(shipNo,String) End If If (cnNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(cnNo,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_lineNum,Long) If (Original_shipNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_shipNo,String) End If If (Original_cnNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_cnNo,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(16).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal shipNo As String, ByVal cnNo As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_shipNo As String, ByVal Original_cnNo As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(shipNo, cnNo, status, lastupdate, lastupdatedby, Original_lineNum, Original_shipNo, Original_cnNo, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_SH_HeaderTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_SH_Header" tableMapping.ColumnMappings.Add("shipNo", "shipNo") tableMapping.ColumnMappings.Add("shipdate", "shipdate") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_SH_Header] WHERE (([shipNo] = @Original_shipNo) AND ((@IsN"& _ "ull_shipdate = 1 AND [shipdate] IS NULL) OR ([shipdate] = @Original_shipdate)) A"& _ "ND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Origin"& _ "al_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR "& _ "([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_SH_Header] ([shipNo], [shipdate], [lastupdate], [lastupdat"& _ "edby]) VALUES (@shipNo, @shipdate, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT shipNo,"& _ " shipdate, lastupdate, lastupdatedby FROM log_SH_Header WHERE (shipNo = @shipNo)"& _ "" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_SH_Header] SET [shipNo] = @shipNo, [shipdate] = @shipdate, [las"& _ "tupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE (([shipNo] = @Ori"& _ "ginal_shipNo) AND ((@IsNull_shipdate = 1 AND [shipdate] IS NULL) OR ([shipdate] "& _ "= @Original_shipdate)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR"& _ " ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [las"& _ "tupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT s"& _ "hipNo, shipdate, lastupdate, lastupdatedby FROM log_SH_Header WHERE (shipNo = @s"& _ "hipNo)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT shipNo, shipdate, lastupdate, lastupdatedby FROM dbo.log_SH_Header" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_SH_HeaderDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_SH_HeaderDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_SH_HeaderDataTable = New EpsonDataSet1.log_SH_HeaderDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_SH_HeaderDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_SH_Header") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_shipNo As String, ByVal Original_shipdate As Global.System.Nullable(Of Date), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_shipNo Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_shipNo") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_shipNo,String) End If If (Original_shipdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_shipdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal shipNo As String, ByVal shipdate As Global.System.Nullable(Of Date), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (shipNo Is Nothing) Then Throw New Global.System.ArgumentNullException("shipNo") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(shipNo,String) End If If (shipdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(shipdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal shipNo As String, ByVal shipdate As Global.System.Nullable(Of Date), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_shipNo As String, ByVal Original_shipdate As Global.System.Nullable(Of Date), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (shipNo Is Nothing) Then Throw New Global.System.ArgumentNullException("shipNo") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(shipNo,String) End If If (shipdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(shipdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdatedby,String) End If If (Original_shipNo Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_shipNo") Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_shipNo,String) End If If (Original_shipdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_shipdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal shipdate As Global.System.Nullable(Of Date), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_shipNo As String, ByVal Original_shipdate As Global.System.Nullable(Of Date), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_shipNo, shipdate, lastupdate, lastupdatedby, Original_shipNo, Original_shipdate, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class log_SH_Header_HistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "log_SH_Header_Hist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("shipNo", "shipNo") tableMapping.ColumnMappings.Add("shipdate", "shipdate") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[log_SH_Header_Hist] WHERE (([lineNum] = @Original_lineNum) AND"& _ " ((@IsNull_shipNo = 1 AND [shipNo] IS NULL) OR ([shipNo] = @Original_shipNo)) AN"& _ "D ((@IsNull_shipdate = 1 AND [shipdate] IS NULL) OR ([shipdate] = @Original_ship"& _ "date)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_s"& _ "tatus)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] "& _ "= @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS "& _ "NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[log_SH_Header_Hist] ([shipNo], [shipdate], [status], [lastupda"& _ "te], [lastupdatedby]) VALUES (@shipNo, @shipdate, @status, @lastupdate, @lastupd"& _ "atedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, shipNo, shipdate, status, lastupdate, lastupdatedby FR"& _ "OM log_SH_Header_Hist WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[log_SH_Header_Hist] SET [shipNo] = @shipNo, [shipdate] = @shipdate,"& _ " [status] = @status, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedb"& _ "y WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull_shipNo = 1 AND [shipNo] I"& _ "S NULL) OR ([shipNo] = @Original_shipNo)) AND ((@IsNull_shipdate = 1 AND [shipda"& _ "te] IS NULL) OR ([shipdate] = @Original_shipdate)) AND ((@IsNull_status = 1 AND "& _ "[status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1"& _ " AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNu"& _ "ll_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Origina"& _ "l_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, shipNo, shipdate, status, lastupdate, lastu"& _ "pdatedby FROM log_SH_Header_Hist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_shipdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_shipdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, shipNo, shipdate, status, lastupdate, lastupdatedby FROM dbo.log_"& _ "SH_Header_Hist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.log_SH_Header_HistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.log_SH_Header_HistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.log_SH_Header_HistDataTable = New EpsonDataSet1.log_SH_Header_HistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.log_SH_Header_HistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "log_SH_Header_Hist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_shipNo As String, ByVal Original_shipdate As Global.System.Nullable(Of Date), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_shipNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_shipNo,String) End If If (Original_shipdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_shipdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal shipNo As String, ByVal shipdate As Global.System.Nullable(Of Date), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (shipNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(shipNo,String) End If If (shipdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(shipdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal shipNo As String, ByVal shipdate As Global.System.Nullable(Of Date), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_shipNo As String, ByVal Original_shipdate As Global.System.Nullable(Of Date), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (shipNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(shipNo,String) End If If (shipdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(shipdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_lineNum,Long) If (Original_shipNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_shipNo,String) End If If (Original_shipdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_shipdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(16).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal shipNo As String, ByVal shipdate As Global.System.Nullable(Of Date), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_shipNo As String, ByVal Original_shipdate As Global.System.Nullable(Of Date), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(shipNo, shipdate, status, lastupdate, lastupdatedby, Original_lineNum, Original_shipNo, Original_shipdate, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class lotNoTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "lotNo" tableMapping.ColumnMappings.Add("lotNo", "lotNo") tableMapping.ColumnMappings.Add("referenceNo", "referenceNo") tableMapping.ColumnMappings.Add("partno", "partno") tableMapping.ColumnMappings.Add("stage", "stage") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("samplingSize", "samplingSize") tableMapping.ColumnMappings.Add("starttime", "starttime") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[lotNo] ([lotNo], [referenceNo], [partno], [stage], [status], ["& _ "samplingSize], [starttime], [lastupdate], [lastupdatedby]) VALUES (@lotNo, @refe"& _ "renceNo, @partno, @stage, @status, @samplingSize, @starttime, @lastupdate, @last"& _ "updatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lotNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lotNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@referenceNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "referenceNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stage", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@samplingSize", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "samplingSize", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@starttime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "starttime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lotNo, referenceNo, partno, stage, status, samplingSize, starttime, lastup"& _ "date, lastupdatedby FROM dbo.lotNo" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.lotNoDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.lotNoDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.lotNoDataTable = New EpsonDataSet1.lotNoDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.lotNoDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "lotNo") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal lotNo As String, ByVal referenceNo As String, ByVal partno As String, ByVal stage As String, ByVal status As String, ByVal samplingSize As Global.System.Nullable(Of Integer), ByVal starttime As Global.System.Nullable(Of Date), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (lotNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(lotNo,String) End If If (referenceNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(referenceNo,String) End If If (partno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(partno,String) End If If (stage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(stage,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(status,String) End If If (samplingSize.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(samplingSize.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (starttime.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(starttime.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class LotNumberTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "LotNumber" tableMapping.ColumnMappings.Add("Lotnumber", "Lotnumber") tableMapping.ColumnMappings.Add("LotStatus", "LotStatus") tableMapping.ColumnMappings.Add("CreatedDate", "CreatedDate") tableMapping.ColumnMappings.Add("CreatedBy", "CreatedBy") tableMapping.ColumnMappings.Add("UpdatedDate", "UpdatedDate") tableMapping.ColumnMappings.Add("UpdatedBy", "UpdatedBy") tableMapping.ColumnMappings.Add("SampleQuantity", "SampleQuantity") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[LotNumber] WHERE (([Lotnumber] = @Original_Lotnumber) AND ((@I"& _ "sNull_LotStatus = 1 AND [LotStatus] IS NULL) OR ([LotStatus] = @Original_LotStat"& _ "us)) AND ([CreatedDate] = @Original_CreatedDate) AND ([CreatedBy] = @Original_Cr"& _ "eatedBy) AND ((@IsNull_UpdatedDate = 1 AND [UpdatedDate] IS NULL) OR ([UpdatedDa"& _ "te] = @Original_UpdatedDate)) AND ((@IsNull_UpdatedBy = 1 AND [UpdatedBy] IS NUL"& _ "L) OR ([UpdatedBy] = @Original_UpdatedBy)) AND ((@IsNull_SampleQuantity = 1 AND "& _ "[SampleQuantity] IS NULL) OR ([SampleQuantity] = @Original_SampleQuantity)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Lotnumber", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Lotnumber", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_LotStatus", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LotStatus", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_LotStatus", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LotStatus", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CreatedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CreatedBy", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CreatedBy", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_UpdatedDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_UpdatedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_UpdatedBy", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_UpdatedBy", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_SampleQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SampleQuantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_SampleQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SampleQuantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[LotNumber] ([Lotnumber], [LotStatus], [CreatedDate], [CreatedB"& _ "y], [UpdatedDate], [UpdatedBy], [SampleQuantity]) VALUES (@Lotnumber, @LotStatus"& _ ", @CreatedDate, @CreatedBy, @UpdatedDate, @UpdatedBy, @SampleQuantity);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT "& _ "Lotnumber, LotStatus, CreatedDate, CreatedBy, UpdatedDate, UpdatedBy, SampleQuan"& _ "tity FROM LotNumber WHERE (Lotnumber = @Lotnumber)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Lotnumber", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Lotnumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LotStatus", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LotStatus", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CreatedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CreatedBy", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CreatedBy", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UpdatedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UpdatedBy", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SampleQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SampleQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[LotNumber] SET [Lotnumber] = @Lotnumber, [LotStatus] = @LotStatus, "& _ "[CreatedDate] = @CreatedDate, [CreatedBy] = @CreatedBy, [UpdatedDate] = @Updated"& _ "Date, [UpdatedBy] = @UpdatedBy, [SampleQuantity] = @SampleQuantity WHERE (([Lotn"& _ "umber] = @Original_Lotnumber) AND ((@IsNull_LotStatus = 1 AND [LotStatus] IS NUL"& _ "L) OR ([LotStatus] = @Original_LotStatus)) AND ([CreatedDate] = @Original_Create"& _ "dDate) AND ([CreatedBy] = @Original_CreatedBy) AND ((@IsNull_UpdatedDate = 1 AND"& _ " [UpdatedDate] IS NULL) OR ([UpdatedDate] = @Original_UpdatedDate)) AND ((@IsNul"& _ "l_UpdatedBy = 1 AND [UpdatedBy] IS NULL) OR ([UpdatedBy] = @Original_UpdatedBy))"& _ " AND ((@IsNull_SampleQuantity = 1 AND [SampleQuantity] IS NULL) OR ([SampleQuant"& _ "ity] = @Original_SampleQuantity)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Lotnumber, LotStatus, CreatedDate, C"& _ "reatedBy, UpdatedDate, UpdatedBy, SampleQuantity FROM LotNumber WHERE (Lotnumber"& _ " = @Lotnumber)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Lotnumber", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Lotnumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LotStatus", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LotStatus", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CreatedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CreatedBy", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CreatedBy", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UpdatedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UpdatedBy", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SampleQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SampleQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Lotnumber", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Lotnumber", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_LotStatus", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LotStatus", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_LotStatus", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LotStatus", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CreatedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CreatedBy", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CreatedBy", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_UpdatedDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_UpdatedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_UpdatedBy", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_UpdatedBy", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_SampleQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SampleQuantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_SampleQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SampleQuantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Lotnumber, LotStatus, CreatedDate, CreatedBy, UpdatedDate, UpdatedBy, Samp"& _ "leQuantity FROM dbo.LotNumber" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.LotNumberDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.LotNumberDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.LotNumberDataTable = New EpsonDataSet1.LotNumberDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.LotNumberDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "LotNumber") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_Lotnumber As String, ByVal Original_LotStatus As String, ByVal Original_CreatedDate As Date, ByVal Original_CreatedBy As String, ByVal Original_UpdatedDate As Global.System.Nullable(Of Date), ByVal Original_UpdatedBy As String, ByVal Original_SampleQuantity As Global.System.Nullable(Of Integer)) As Integer If (Original_Lotnumber Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Lotnumber") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_Lotnumber,String) End If If (Original_LotStatus Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_LotStatus,String) End If Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_CreatedDate,Date) If (Original_CreatedBy Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_CreatedBy") Else Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_CreatedBy,String) End If If (Original_UpdatedDate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_UpdatedDate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_UpdatedBy Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_UpdatedBy,String) End If If (Original_SampleQuantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_SampleQuantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal Lotnumber As String, ByVal LotStatus As String, ByVal CreatedDate As Date, ByVal CreatedBy As String, ByVal UpdatedDate As Global.System.Nullable(Of Date), ByVal UpdatedBy As String, ByVal SampleQuantity As Global.System.Nullable(Of Integer)) As Integer If (Lotnumber Is Nothing) Then Throw New Global.System.ArgumentNullException("Lotnumber") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Lotnumber,String) End If If (LotStatus Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(LotStatus,String) End If Me.Adapter.InsertCommand.Parameters(2).Value = CType(CreatedDate,Date) If (CreatedBy Is Nothing) Then Throw New Global.System.ArgumentNullException("CreatedBy") Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(CreatedBy,String) End If If (UpdatedDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(UpdatedDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (UpdatedBy Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(UpdatedBy,String) End If If (SampleQuantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(SampleQuantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal Lotnumber As String, ByVal LotStatus As String, ByVal CreatedDate As Date, ByVal CreatedBy As String, ByVal UpdatedDate As Global.System.Nullable(Of Date), ByVal UpdatedBy As String, ByVal SampleQuantity As Global.System.Nullable(Of Integer), ByVal Original_Lotnumber As String, ByVal Original_LotStatus As String, ByVal Original_CreatedDate As Date, ByVal Original_CreatedBy As String, ByVal Original_UpdatedDate As Global.System.Nullable(Of Date), ByVal Original_UpdatedBy As String, ByVal Original_SampleQuantity As Global.System.Nullable(Of Integer)) As Integer If (Lotnumber Is Nothing) Then Throw New Global.System.ArgumentNullException("Lotnumber") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(Lotnumber,String) End If If (LotStatus Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(LotStatus,String) End If Me.Adapter.UpdateCommand.Parameters(2).Value = CType(CreatedDate,Date) If (CreatedBy Is Nothing) Then Throw New Global.System.ArgumentNullException("CreatedBy") Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(CreatedBy,String) End If If (UpdatedDate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(UpdatedDate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (UpdatedBy Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(UpdatedBy,String) End If If (SampleQuantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(SampleQuantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_Lotnumber Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Lotnumber") Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Lotnumber,String) End If If (Original_LotStatus Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_LotStatus,String) End If Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_CreatedDate,Date) If (Original_CreatedBy Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_CreatedBy") Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_CreatedBy,String) End If If (Original_UpdatedDate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_UpdatedDate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (Original_UpdatedBy Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_UpdatedBy,String) End If If (Original_SampleQuantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_SampleQuantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal LotStatus As String, ByVal CreatedDate As Date, ByVal CreatedBy As String, ByVal UpdatedDate As Global.System.Nullable(Of Date), ByVal UpdatedBy As String, ByVal SampleQuantity As Global.System.Nullable(Of Integer), ByVal Original_Lotnumber As String, ByVal Original_LotStatus As String, ByVal Original_CreatedDate As Date, ByVal Original_CreatedBy As String, ByVal Original_UpdatedDate As Global.System.Nullable(Of Date), ByVal Original_UpdatedBy As String, ByVal Original_SampleQuantity As Global.System.Nullable(Of Integer)) As Integer Return Me.Update(Original_Lotnumber, LotStatus, CreatedDate, CreatedBy, UpdatedDate, UpdatedBy, SampleQuantity, Original_Lotnumber, Original_LotStatus, Original_CreatedDate, Original_CreatedBy, Original_UpdatedDate, Original_UpdatedBy, Original_SampleQuantity) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class machineTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "machine" tableMapping.ColumnMappings.Add("machine", "machine") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[machine] WHERE (([machine] = @Original_machine) AND ((@IsNull_"& _ "description = 1 AND [description] IS NULL) OR ([description] = @Original_descrip"& _ "tion)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_a"& _ "ctive)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] "& _ "= @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS "& _ "NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[machine] ([machine], [description], [active], [lastupdate], [l"& _ "astupdatedby]) VALUES (@machine, @description, @active, @lastupdate, @lastupdate"& _ "dby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT machine, description, active, lastupdate, lastupdatedby FROM machi"& _ "ne WHERE (machine = @machine)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[machine] SET [machine] = @machine, [description] = @description, [a"& _ "ctive] = @active, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby W"& _ "HERE (([machine] = @Original_machine) AND ((@IsNull_description = 1 AND [descrip"& _ "tion] IS NULL) OR ([description] = @Original_description)) AND ((@IsNull_active "& _ "= 1 AND [active] IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_lastup"& _ "date = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND"& _ " ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = "& _ "@Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT machine, description, active, lastupdate, la"& _ "stupdatedby FROM machine WHERE (machine = @machine)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT machine, description, active, lastupdate, lastupdatedby FROM dbo.machine" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.machineDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.machineDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.machineDataTable = New EpsonDataSet1.machineDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.machineDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "machine") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_machine As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_machine Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_machine") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_machine,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal machine As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (machine Is Nothing) Then Throw New Global.System.ArgumentNullException("machine") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(machine,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal machine As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_machine As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (machine Is Nothing) Then Throw New Global.System.ArgumentNullException("machine") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(machine,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If If (Original_machine Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_machine") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_machine,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_machine As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_machine, description, active, lastupdate, lastupdatedby, Original_machine, Original_description, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class machineHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "machineHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("machine", "machine") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[machineHist] WHERE (([lineNum] = @Original_lineNum) AND ((@IsN"& _ "ull_machine = 1 AND [machine] IS NULL) OR ([machine] = @Original_machine)) AND ("& _ "(@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Origina"& _ "l_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @O"& _ "riginal_active)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @"& _ "Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([la"& _ "stupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupda"& _ "tedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_machine", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[machineHist] ([machine], [description], [active], [status], [l"& _ "astupdate], [lastupdatedby]) VALUES (@machine, @description, @active, @status, @"& _ "lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, machine, description, active, stat"& _ "us, lastupdate, lastupdatedby FROM machineHist WHERE (lineNum = SCOPE_IDENTITY()"& _ ")" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[machineHist] SET [machine] = @machine, [description] = @description"& _ ", [active] = @active, [status] = @status, [lastupdate] = @lastupdate, [lastupdat"& _ "edby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull_mach"& _ "ine = 1 AND [machine] IS NULL) OR ([machine] = @Original_machine)) AND ((@IsNull"& _ "_description = 1 AND [description] IS NULL) OR ([description] = @Original_descri"& _ "ption)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_"& _ "active)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original"& _ "_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate"& _ "] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] I"& _ "S NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, machi"& _ "ne, description, active, status, lastupdate, lastupdatedby FROM machineHist WHER"& _ "E (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_machine", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_machine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "machine", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, machine, description, active, status, lastupdate, lastupdatedby F"& _ "ROM dbo.machineHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.machineHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.machineHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.machineHistDataTable = New EpsonDataSet1.machineHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.machineHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "machineHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_machine As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_machine Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_machine,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal machine As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (machine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(machine,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal machine As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_machine As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (machine Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(machine,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_machine Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_machine,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal machine As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_machine As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(machine, description, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_machine, Original_description, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "model" tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("modelDesc1", "modelDesc1") tableMapping.ColumnMappings.Add("modelDesc2", "modelDesc2") tableMapping.ColumnMappings.Add("modelFamily", "modelFamily") tableMapping.ColumnMappings.Add("modelType", "modelType") tableMapping.ColumnMappings.Add("minRev", "minRev") tableMapping.ColumnMappings.Add("latestRev", "latestRev") tableMapping.ColumnMappings.Add("itemWt", "itemWt") tableMapping.ColumnMappings.Add("batch", "batch") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[model] WHERE (([modelno] = @Original_modelno) AND ((@IsNull_mo"& _ "delDesc1 = 1 AND [modelDesc1] IS NULL) OR ([modelDesc1] = @Original_modelDesc1))"& _ " AND ((@IsNull_modelDesc2 = 1 AND [modelDesc2] IS NULL) OR ([modelDesc2] = @Orig"& _ "inal_modelDesc2)) AND ((@IsNull_modelFamily = 1 AND [modelFamily] IS NULL) OR (["& _ "modelFamily] = @Original_modelFamily)) AND ((@IsNull_modelType = 1 AND [modelTyp"& _ "e] IS NULL) OR ([modelType] = @Original_modelType)) AND ((@IsNull_minRev = 1 AND"& _ " [minRev] IS NULL) OR ([minRev] = @Original_minRev)) AND ((@IsNull_latestRev = 1"& _ " AND [latestRev] IS NULL) OR ([latestRev] = @Original_latestRev)) AND ((@IsNull_"& _ "itemWt = 1 AND [itemWt] IS NULL) OR ([itemWt] = @Original_itemWt)) AND ((@IsNull"& _ "_batch = 1 AND [batch] IS NULL) OR ([batch] = @Original_batch)) AND ((@IsNull_ac"& _ "tive = 1 AND [active] IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_l"& _ "astupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)"& _ ") AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedb"& _ "y] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelDesc1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelDesc2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelFamily", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_minRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_latestRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_itemWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_itemWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[model] ([modelno], [modelDesc1], [modelDesc2], [modelFamily], "& _ "[modelType], [minRev], [latestRev], [itemWt], [batch], [active], [lastupdate], ["& _ "lastupdatedby]) VALUES (@modelno, @modelDesc1, @modelDesc2, @modelFamily, @model"& _ "Type, @minRev, @latestRev, @itemWt, @batch, @active, @lastupdate, @lastupdatedby"& _ ");"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, late"& _ "stRev, itemWt, batch, active, lastupdate, lastupdatedby FROM model WHERE (modeln"& _ "o = @modelno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@itemWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[model] SET [modelno] = @modelno, [modelDesc1] = @modelDesc1, [model"& _ "Desc2] = @modelDesc2, [modelFamily] = @modelFamily, [modelType] = @modelType, [m"& _ "inRev] = @minRev, [latestRev] = @latestRev, [itemWt] = @itemWt, [batch] = @batch"& _ ", [active] = @active, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdated"& _ "by WHERE (([modelno] = @Original_modelno) AND ((@IsNull_modelDesc1 = 1 AND [mode"& _ "lDesc1] IS NULL) OR ([modelDesc1] = @Original_modelDesc1)) AND ((@IsNull_modelDe"& _ "sc2 = 1 AND [modelDesc2] IS NULL) OR ([modelDesc2] = @Original_modelDesc2)) AND "& _ "((@IsNull_modelFamily = 1 AND [modelFamily] IS NULL) OR ([modelFamily] = @Origin"& _ "al_modelFamily)) AND ((@IsNull_modelType = 1 AND [modelType] IS NULL) OR ([model"& _ "Type] = @Original_modelType)) AND ((@IsNull_minRev = 1 AND [minRev] IS NULL) OR "& _ "([minRev] = @Original_minRev)) AND ((@IsNull_latestRev = 1 AND [latestRev] IS NU"& _ "LL) OR ([latestRev] = @Original_latestRev)) AND ((@IsNull_itemWt = 1 AND [itemWt"& _ "] IS NULL) OR ([itemWt] = @Original_itemWt)) AND ((@IsNull_batch = 1 AND [batch]"& _ " IS NULL) OR ([batch] = @Original_batch)) AND ((@IsNull_active = 1 AND [active] "& _ "IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_lastupdate = 1 AND [las"& _ "tupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastup"& _ "datedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupd"& _ "atedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT modelno, modelDesc1, modelDesc2, modelFamily, modelType, minR"& _ "ev, latestRev, itemWt, batch, active, lastupdate, lastupdatedby FROM model WHERE"& _ " (modelno = @modelno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@itemWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelDesc1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelDesc2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelFamily", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_minRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_latestRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_itemWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_itemWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev"& _ ", itemWt, batch, active, lastupdate, lastupdatedby FROM dbo.model" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelDataTable = New EpsonDataSet1.modelDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "model") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_modelno As String, ByVal Original_modelDesc1 As String, ByVal Original_modelDesc2 As String, ByVal Original_modelFamily As String, ByVal Original_modelType As String, ByVal Original_minRev As String, ByVal Original_latestRev As String, ByVal Original_itemWt As Global.System.Nullable(Of Single), ByVal Original_batch As Global.System.Nullable(Of Integer), ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_modelno,String) End If If (Original_modelDesc1 Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_modelDesc1,String) End If If (Original_modelDesc2 Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_modelDesc2,String) End If If (Original_modelFamily Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_modelFamily,String) End If If (Original_modelType Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_modelType,String) End If If (Original_minRev Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_minRev,String) End If If (Original_latestRev Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_latestRev,String) End If If (Original_itemWt.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_itemWt.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_batch.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_batch.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal modelDesc1 As String, ByVal modelDesc2 As String, ByVal modelFamily As String, ByVal modelType As String, ByVal minRev As String, ByVal latestRev As String, ByVal itemWt As Global.System.Nullable(Of Single), ByVal batch As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (modelDesc1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(modelDesc1,String) End If If (modelDesc2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(modelDesc2,String) End If If (modelFamily Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(modelFamily,String) End If If (modelType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(modelType,String) End If If (minRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(minRev,String) End If If (latestRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(latestRev,String) End If If (itemWt.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(itemWt.Value,Single) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (batch.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(batch.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal modelDesc1 As String, _ ByVal modelDesc2 As String, _ ByVal modelFamily As String, _ ByVal modelType As String, _ ByVal minRev As String, _ ByVal latestRev As String, _ ByVal itemWt As Global.System.Nullable(Of Single), _ ByVal batch As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_modelno As String, _ ByVal Original_modelDesc1 As String, _ ByVal Original_modelDesc2 As String, _ ByVal Original_modelFamily As String, _ ByVal Original_modelType As String, _ ByVal Original_minRev As String, _ ByVal Original_latestRev As String, _ ByVal Original_itemWt As Global.System.Nullable(Of Single), _ ByVal Original_batch As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelno,String) End If If (modelDesc1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(modelDesc1,String) End If If (modelDesc2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(modelDesc2,String) End If If (modelFamily Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(modelFamily,String) End If If (modelType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(modelType,String) End If If (minRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(minRev,String) End If If (latestRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(latestRev,String) End If If (itemWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(itemWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (batch.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(batch.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(lastupdatedby,String) End If If (Original_modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelno") Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_modelno,String) End If If (Original_modelDesc1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_modelDesc1,String) End If If (Original_modelDesc2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_modelDesc2,String) End If If (Original_modelFamily Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_modelFamily,String) End If If (Original_modelType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_modelType,String) End If If (Original_minRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_minRev,String) End If If (Original_latestRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_latestRev,String) End If If (Original_itemWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = CType(Original_itemWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = Global.System.DBNull.Value End If If (Original_batch.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = CType(Original_batch.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(31).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(32).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(31).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(32).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(33).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(34).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(33).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(34).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelDesc1 As String, _ ByVal modelDesc2 As String, _ ByVal modelFamily As String, _ ByVal modelType As String, _ ByVal minRev As String, _ ByVal latestRev As String, _ ByVal itemWt As Global.System.Nullable(Of Single), _ ByVal batch As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_modelno As String, _ ByVal Original_modelDesc1 As String, _ ByVal Original_modelDesc2 As String, _ ByVal Original_modelFamily As String, _ ByVal Original_modelType As String, _ ByVal Original_minRev As String, _ ByVal Original_latestRev As String, _ ByVal Original_itemWt As Global.System.Nullable(Of Single), _ ByVal Original_batch As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev, itemWt, batch, active, lastupdate, lastupdatedby, Original_modelno, Original_modelDesc1, Original_modelDesc2, Original_modelFamily, Original_modelType, Original_minRev, Original_latestRev, Original_itemWt, Original_batch, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelBackupTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelBackup" tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("modelDesc1", "modelDesc1") tableMapping.ColumnMappings.Add("modelDesc2", "modelDesc2") tableMapping.ColumnMappings.Add("modelFamily", "modelFamily") tableMapping.ColumnMappings.Add("modelType", "modelType") tableMapping.ColumnMappings.Add("minRev", "minRev") tableMapping.ColumnMappings.Add("latestRev", "latestRev") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelBackup] ([modelno], [modelDesc1], [modelDesc2], [modelFam"& _ "ily], [modelType], [minRev], [latestRev], [active], [lastupdate], [lastupdatedby"& _ "]) VALUES (@modelno, @modelDesc1, @modelDesc2, @modelFamily, @modelType, @minRev"& _ ", @latestRev, @active, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev"& _ ", active, lastupdate, lastupdatedby FROM dbo.modelBackup" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelBackupDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelBackupDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelBackupDataTable = New EpsonDataSet1.modelBackupDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelBackupDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelBackup") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal modelDesc1 As String, ByVal modelDesc2 As String, ByVal modelFamily As String, ByVal modelType As String, ByVal minRev As String, ByVal latestRev As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (modelDesc1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(modelDesc1,String) End If If (modelDesc2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(modelDesc2,String) End If If (modelFamily Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(modelFamily,String) End If If (modelType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(modelType,String) End If If (minRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(minRev,String) End If If (latestRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(latestRev,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelDimTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelDim" tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("length", "length") tableMapping.ColumnMappings.Add("width", "width") tableMapping.ColumnMappings.Add("height", "height") tableMapping.ColumnMappings.Add("layerCount", "layerCount") tableMapping.ColumnMappings.Add("dimType", "dimType") tableMapping.ColumnMappings.Add("packingno", "packingno") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelDim] WHERE (([modelno] = @Original_modelno) AND ((@IsNull"& _ "_length = 1 AND [length] IS NULL) OR ([length] = @Original_length)) AND ((@IsNul"& _ "l_width = 1 AND [width] IS NULL) OR ([width] = @Original_width)) AND ((@IsNull_h"& _ "eight = 1 AND [height] IS NULL) OR ([height] = @Original_height)) AND ((@IsNull_"& _ "layerCount = 1 AND [layerCount] IS NULL) OR ([layerCount] = @Original_layerCount"& _ ")) AND ((@IsNull_dimType = 1 AND [dimType] IS NULL) OR ([dimType] = @Original_di"& _ "mType)) AND ((@IsNull_packingno = 1 AND [packingno] IS NULL) OR ([packingno] = @"& _ "Original_packingno)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ("& _ "[lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastu"& _ "pdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_length", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_length", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_width", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_width", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dimType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dimType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_packingno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_packingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelDim] ([modelno], [length], [width], [height], [layerCount"& _ "], [dimType], [packingno], [lastupdate], [lastupdatedby]) VALUES (@modelno, @len"& _ "gth, @width, @height, @layerCount, @dimType, @packingno, @lastupdate, @lastupdat"& _ "edby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT modelno, length, width, height, layerCount, dimType, packingno, l"& _ "astupdate, lastupdatedby FROM modelDim WHERE (modelno = @modelno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@length", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@width", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelDim] SET [modelno] = @modelno, [length] = @length, [width] = @"& _ "width, [height] = @height, [layerCount] = @layerCount, [dimType] = @dimType, [pa"& _ "ckingno] = @packingno, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdate"& _ "dby WHERE (([modelno] = @Original_modelno) AND ((@IsNull_length = 1 AND [length]"& _ " IS NULL) OR ([length] = @Original_length)) AND ((@IsNull_width = 1 AND [width] "& _ "IS NULL) OR ([width] = @Original_width)) AND ((@IsNull_height = 1 AND [height] I"& _ "S NULL) OR ([height] = @Original_height)) AND ((@IsNull_layerCount = 1 AND [laye"& _ "rCount] IS NULL) OR ([layerCount] = @Original_layerCount)) AND ((@IsNull_dimType"& _ " = 1 AND [dimType] IS NULL) OR ([dimType] = @Original_dimType)) AND ((@IsNull_pa"& _ "ckingno = 1 AND [packingno] IS NULL) OR ([packingno] = @Original_packingno)) AND"& _ " ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original"& _ "_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR (["& _ "lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT modelno, length, width, hei"& _ "ght, layerCount, dimType, packingno, lastupdate, lastupdatedby FROM modelDim WHE"& _ "RE (modelno = @modelno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@length", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@width", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_length", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_length", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_width", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_width", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dimType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dimType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_packingno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_packingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelno, length, width, height, layerCount, dimType, packingno, lastupdate"& _ ", lastupdatedby FROM dbo.modelDim" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelDimDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelDimDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelDimDataTable = New EpsonDataSet1.modelDimDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelDimDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelDim") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_modelno As String, ByVal Original_length As Global.System.Nullable(Of Single), ByVal Original_width As Global.System.Nullable(Of Single), ByVal Original_height As Global.System.Nullable(Of Integer), ByVal Original_layerCount As Global.System.Nullable(Of Integer), ByVal Original_dimType As String, ByVal Original_packingno As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_modelno,String) End If If (Original_length.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_length.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (Original_width.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_width.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_height.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_height.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_layerCount.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_layerCount.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_dimType Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_dimType,String) End If If (Original_packingno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_packingno,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal length As Global.System.Nullable(Of Single), ByVal width As Global.System.Nullable(Of Single), ByVal height As Global.System.Nullable(Of Integer), ByVal layerCount As Global.System.Nullable(Of Integer), ByVal dimType As String, ByVal packingno As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (length.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(length.Value,Single) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (width.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(width.Value,Single) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (height.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(height.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (layerCount.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(layerCount.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (dimType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(dimType,String) End If If (packingno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(packingno,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal length As Global.System.Nullable(Of Single), _ ByVal width As Global.System.Nullable(Of Single), _ ByVal height As Global.System.Nullable(Of Integer), _ ByVal layerCount As Global.System.Nullable(Of Integer), _ ByVal dimType As String, _ ByVal packingno As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_modelno As String, _ ByVal Original_length As Global.System.Nullable(Of Single), _ ByVal Original_width As Global.System.Nullable(Of Single), _ ByVal Original_height As Global.System.Nullable(Of Integer), _ ByVal Original_layerCount As Global.System.Nullable(Of Integer), _ ByVal Original_dimType As String, _ ByVal Original_packingno As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelno,String) End If If (length.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(length.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (width.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(width.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (height.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(height.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (layerCount.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(layerCount.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (dimType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(dimType,String) End If If (packingno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(packingno,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(lastupdatedby,String) End If If (Original_modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelno") Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_modelno,String) End If If (Original_length.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_length.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_width.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_width.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (Original_height.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_height.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (Original_layerCount.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_layerCount.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (Original_dimType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_dimType,String) End If If (Original_packingno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_packingno,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(24).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(24).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal length As Global.System.Nullable(Of Single), _ ByVal width As Global.System.Nullable(Of Single), _ ByVal height As Global.System.Nullable(Of Integer), _ ByVal layerCount As Global.System.Nullable(Of Integer), _ ByVal dimType As String, _ ByVal packingno As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_modelno As String, _ ByVal Original_length As Global.System.Nullable(Of Single), _ ByVal Original_width As Global.System.Nullable(Of Single), _ ByVal Original_height As Global.System.Nullable(Of Integer), _ ByVal Original_layerCount As Global.System.Nullable(Of Integer), _ ByVal Original_dimType As String, _ ByVal Original_packingno As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_modelno, length, width, height, layerCount, dimType, packingno, lastupdate, lastupdatedby, Original_modelno, Original_length, Original_width, Original_height, Original_layerCount, Original_dimType, Original_packingno, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelDimHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelDimHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("length", "length") tableMapping.ColumnMappings.Add("width", "width") tableMapping.ColumnMappings.Add("height", "height") tableMapping.ColumnMappings.Add("layerCount", "layerCount") tableMapping.ColumnMappings.Add("dimType", "dimType") tableMapping.ColumnMappings.Add("packingno", "packingno") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelDimHist] WHERE (([lineNum] = @Original_lineNum) AND ((@Is"& _ "Null_modelno = 1 AND [modelno] IS NULL) OR ([modelno] = @Original_modelno)) AND "& _ "((@IsNull_length = 1 AND [length] IS NULL) OR ([length] = @Original_length)) AND"& _ " ((@IsNull_width = 1 AND [width] IS NULL) OR ([width] = @Original_width)) AND (("& _ "@IsNull_height = 1 AND [height] IS NULL) OR ([height] = @Original_height)) AND ("& _ "(@IsNull_layerCount = 1 AND [layerCount] IS NULL) OR ([layerCount] = @Original_l"& _ "ayerCount)) AND ((@IsNull_dimType = 1 AND [dimType] IS NULL) OR ([dimType] = @Or"& _ "iginal_dimType)) AND ((@IsNull_packingno = 1 AND [packingno] IS NULL) OR ([packi"& _ "ngno] = @Original_packingno)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR "& _ "([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS "& _ "NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 "& _ "AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_length", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_length", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_width", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_width", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dimType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dimType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_packingno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_packingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelDimHist] ([modelno], [length], [width], [height], [layerC"& _ "ount], [dimType], [packingno], [status], [lastupdate], [lastupdatedby]) VALUES ("& _ "@modelno, @length, @width, @height, @layerCount, @dimType, @packingno, @status, "& _ "@lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelno, length, width, height, l"& _ "ayerCount, dimType, packingno, status, lastupdate, lastupdatedby FROM modelDimHi"& _ "st WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@length", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@width", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelDimHist] SET [modelno] = @modelno, [length] = @length, [width]"& _ " = @width, [height] = @height, [layerCount] = @layerCount, [dimType] = @dimType,"& _ " [packingno] = @packingno, [status] = @status, [lastupdate] = @lastupdate, [last"& _ "updatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull"& _ "_modelno = 1 AND [modelno] IS NULL) OR ([modelno] = @Original_modelno)) AND ((@I"& _ "sNull_length = 1 AND [length] IS NULL) OR ([length] = @Original_length)) AND ((@"& _ "IsNull_width = 1 AND [width] IS NULL) OR ([width] = @Original_width)) AND ((@IsN"& _ "ull_height = 1 AND [height] IS NULL) OR ([height] = @Original_height)) AND ((@Is"& _ "Null_layerCount = 1 AND [layerCount] IS NULL) OR ([layerCount] = @Original_layer"& _ "Count)) AND ((@IsNull_dimType = 1 AND [dimType] IS NULL) OR ([dimType] = @Origin"& _ "al_dimType)) AND ((@IsNull_packingno = 1 AND [packingno] IS NULL) OR ([packingno"& _ "] = @Original_packingno)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([st"& _ "atus] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL"& _ ") OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND "& _ "[lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELE"& _ "CT lineNum, modelno, length, width, height, layerCount, dimType, packingno, stat"& _ "us, lastupdate, lastupdatedby FROM modelDimHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@length", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@width", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@packingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_length", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_length", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "length", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_width", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_width", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "width", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_height", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "height", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_layerCount", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layerCount", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dimType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dimType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_packingno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_packingno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "packingno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, modelno, length, width, height, layerCount, dimType, packingno, s"& _ "tatus, lastupdate, lastupdatedby FROM dbo.modelDimHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelDimHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelDimHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelDimHistDataTable = New EpsonDataSet1.modelDimHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelDimHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelDimHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_modelno As String, ByVal Original_length As Global.System.Nullable(Of Single), ByVal Original_width As Global.System.Nullable(Of Single), ByVal Original_height As Global.System.Nullable(Of Integer), ByVal Original_layerCount As Global.System.Nullable(Of Integer), ByVal Original_dimType As String, ByVal Original_packingno As String, ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_modelno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_modelno,String) End If If (Original_length.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_length.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_width.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_width.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_height.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_height.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_layerCount.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_layerCount.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_dimType Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_dimType,String) End If If (Original_packingno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_packingno,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal length As Global.System.Nullable(Of Single), ByVal width As Global.System.Nullable(Of Single), ByVal height As Global.System.Nullable(Of Integer), ByVal layerCount As Global.System.Nullable(Of Integer), ByVal dimType As String, ByVal packingno As String, ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (length.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(length.Value,Single) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (width.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(width.Value,Single) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (height.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(height.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (layerCount.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(layerCount.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (dimType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(dimType,String) End If If (packingno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(packingno,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal length As Global.System.Nullable(Of Single), _ ByVal width As Global.System.Nullable(Of Single), _ ByVal height As Global.System.Nullable(Of Integer), _ ByVal layerCount As Global.System.Nullable(Of Integer), _ ByVal dimType As String, _ ByVal packingno As String, _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_modelno As String, _ ByVal Original_length As Global.System.Nullable(Of Single), _ ByVal Original_width As Global.System.Nullable(Of Single), _ ByVal Original_height As Global.System.Nullable(Of Integer), _ ByVal Original_layerCount As Global.System.Nullable(Of Integer), _ ByVal Original_dimType As String, _ ByVal Original_packingno As String, _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (modelno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelno,String) End If If (length.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(length.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (width.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(width.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (height.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(height.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (layerCount.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(layerCount.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (dimType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(dimType,String) End If If (packingno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(packingno,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_lineNum,Long) If (Original_modelno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_modelno,String) End If If (Original_length.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_length.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_width.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_width.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_height.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_height.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_layerCount.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_layerCount.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_dimType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_dimType,String) End If If (Original_packingno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_packingno,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(31).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal length As Global.System.Nullable(Of Single), _ ByVal width As Global.System.Nullable(Of Single), _ ByVal height As Global.System.Nullable(Of Integer), _ ByVal layerCount As Global.System.Nullable(Of Integer), _ ByVal dimType As String, _ ByVal packingno As String, _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_modelno As String, _ ByVal Original_length As Global.System.Nullable(Of Single), _ ByVal Original_width As Global.System.Nullable(Of Single), _ ByVal Original_height As Global.System.Nullable(Of Integer), _ ByVal Original_layerCount As Global.System.Nullable(Of Integer), _ ByVal Original_dimType As String, _ ByVal Original_packingno As String, _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(modelno, length, width, height, layerCount, dimType, packingno, status, lastupdate, lastupdatedby, Original_lineNum, Original_modelno, Original_length, Original_width, Original_height, Original_layerCount, Original_dimType, Original_packingno, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelFamilyTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelFamily" tableMapping.ColumnMappings.Add("modelFamily", "modelFamily") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelFamily] WHERE (([modelFamily] = @Original_modelFamily) AN"& _ "D ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Orig"& _ "inal_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] ="& _ " @Original_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR (["& _ "lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastup"& _ "datedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelFamily] ([modelFamily], [description], [active], [lastupd"& _ "ate], [lastupdatedby]) VALUES (@modelFamily, @description, @active, @lastupdate,"& _ " @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT modelFamily, description, active, lastupdate, lastupda"& _ "tedby FROM modelFamily WHERE (modelFamily = @modelFamily)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelFamily] SET [modelFamily] = @modelFamily, [description] = @des"& _ "cription, [active] = @active, [lastupdate] = @lastupdate, [lastupdatedby] = @las"& _ "tupdatedby WHERE (([modelFamily] = @Original_modelFamily) AND ((@IsNull_descript"& _ "ion = 1 AND [description] IS NULL) OR ([description] = @Original_description)) A"& _ "ND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)) "& _ "AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Origi"& _ "nal_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR"& _ " ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT modelFamily, description"& _ ", active, lastupdate, lastupdatedby FROM modelFamily WHERE (modelFamily = @model"& _ "Family)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelFamily, description, active, lastupdate, lastupdatedby FROM dbo.model"& _ "Family" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelFamilyDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelFamilyDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelFamilyDataTable = New EpsonDataSet1.modelFamilyDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelFamilyDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelFamily") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_modelFamily As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_modelFamily Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelFamily") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_modelFamily,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelFamily As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelFamily Is Nothing) Then Throw New Global.System.ArgumentNullException("modelFamily") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelFamily,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal modelFamily As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_modelFamily As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (modelFamily Is Nothing) Then Throw New Global.System.ArgumentNullException("modelFamily") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelFamily,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If If (Original_modelFamily Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelFamily") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_modelFamily,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_modelFamily As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_modelFamily, description, active, lastupdate, lastupdatedby, Original_modelFamily, Original_description, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelFamilyHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelFamilyHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("modelFamily", "modelFamily") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelFamilyHist] WHERE (([lineNum] = @Original_lineNum) AND (("& _ "@IsNull_modelFamily = 1 AND [modelFamily] IS NULL) OR ([modelFamily] = @Original"& _ "_modelFamily)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([des"& _ "cription] = @Original_description)) AND ((@IsNull_active = 1 AND [active] IS NUL"& _ "L) OR ([active] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NU"& _ "LL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupda"& _ "te] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdated"& _ "by = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedb"& _ "y)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelFamily", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelFamilyHist] ([modelFamily], [description], [active], [sta"& _ "tus], [lastupdate], [lastupdatedby]) VALUES (@modelFamily, @description, @active"& _ ", @status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelFamily, descripti"& _ "on, active, status, lastupdate, lastupdatedby FROM modelFamilyHist WHERE (lineNu"& _ "m = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelFamilyHist] SET [modelFamily] = @modelFamily, [description] = "& _ "@description, [active] = @active, [status] = @status, [lastupdate] = @lastupdate"& _ ", [lastupdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND (("& _ "@IsNull_modelFamily = 1 AND [modelFamily] IS NULL) OR ([modelFamily] = @Original"& _ "_modelFamily)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([des"& _ "cription] = @Original_description)) AND ((@IsNull_active = 1 AND [active] IS NUL"& _ "L) OR ([active] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NU"& _ "LL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupda"& _ "te] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdated"& _ "by = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedb"& _ "y)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelFamily, description, active, status, lastupdate, las"& _ "tupdatedby FROM modelFamilyHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelFamily", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, modelFamily, description, active, status, lastupdate, lastupdated"& _ "by FROM dbo.modelFamilyHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelFamilyHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelFamilyHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelFamilyHistDataTable = New EpsonDataSet1.modelFamilyHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelFamilyHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelFamilyHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_modelFamily As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_modelFamily Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_modelFamily,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelFamily As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelFamily Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelFamily,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal modelFamily As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_modelFamily As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (modelFamily Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelFamily,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_modelFamily Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_modelFamily,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal modelFamily As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_modelFamily As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(modelFamily, description, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_modelFamily, Original_description, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelHierarchyTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelHierarchy" tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("descendant", "descendant") tableMapping.ColumnMappings.Add("mlevel", "mlevel") tableMapping.ColumnMappings.Add("carrySerial", "carrySerial") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelHierarchy] ([modelno], [descendant], [mlevel], [carrySeri"& _ "al], [active], [lastupdate], [lastupdatedby]) VALUES (@modelno, @descendant, @ml"& _ "evel, @carrySerial, @active, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@descendant", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "descendant", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@mlevel", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mlevel", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@carrySerial", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "carrySerial", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelno, descendant, mlevel, carrySerial, active, lastupdate, lastupdatedb"& _ "y FROM dbo.modelHierarchy" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelHierarchyDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelHierarchyDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelHierarchyDataTable = New EpsonDataSet1.modelHierarchyDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelHierarchyDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelHierarchy") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal descendant As String, ByVal mlevel As Global.System.Nullable(Of Integer), ByVal carrySerial As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (descendant Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(descendant,String) End If If (mlevel.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(mlevel.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (carrySerial.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(carrySerial.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelHierarchyHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelHierarchyHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("descendant", "descendant") tableMapping.ColumnMappings.Add("mlevel", "mlevel") tableMapping.ColumnMappings.Add("carrySerial", "carrySerial") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelHierarchyHist] WHERE (([lineNum] = @Original_lineNum) AND"& _ " ((@IsNull_modelno = 1 AND [modelno] IS NULL) OR ([modelno] = @Original_modelno)"& _ ") AND ((@IsNull_descendant = 1 AND [descendant] IS NULL) OR ([descendant] = @Ori"& _ "ginal_descendant)) AND ((@IsNull_mlevel = 1 AND [mlevel] IS NULL) OR ([mlevel] ="& _ " @Original_mlevel)) AND ((@IsNull_carrySerial = 1 AND [carrySerial] IS NULL) OR "& _ "([carrySerial] = @Original_carrySerial)) AND ((@IsNull_active = 1 AND [active] I"& _ "S NULL) OR ([active] = @Original_active)) AND ((@IsNull_status = 1 AND [status] "& _ "IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [las"& _ "tupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastup"& _ "datedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupd"& _ "atedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_descendant", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "descendant", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_descendant", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "descendant", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_mlevel", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mlevel", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_mlevel", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mlevel", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_carrySerial", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "carrySerial", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_carrySerial", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "carrySerial", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelHierarchyHist] ([modelno], [descendant], [mlevel], [carry"& _ "Serial], [active], [status], [lastupdate], [lastupdatedby]) VALUES (@modelno, @d"& _ "escendant, @mlevel, @carrySerial, @active, @status, @lastupdate, @lastupdatedby)"& _ ";"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelno, descendant, mlevel, carrySerial, active, status, las"& _ "tupdate, lastupdatedby FROM modelHierarchyHist WHERE (lineNum = SCOPE_IDENTITY()"& _ ")" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@descendant", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "descendant", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@mlevel", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mlevel", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@carrySerial", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "carrySerial", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelHierarchyHist] SET [modelno] = @modelno, [descendant] = @desce"& _ "ndant, [mlevel] = @mlevel, [carrySerial] = @carrySerial, [active] = @active, [st"& _ "atus] = @status, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WH"& _ "ERE (([lineNum] = @Original_lineNum) AND ((@IsNull_modelno = 1 AND [modelno] IS "& _ "NULL) OR ([modelno] = @Original_modelno)) AND ((@IsNull_descendant = 1 AND [desc"& _ "endant] IS NULL) OR ([descendant] = @Original_descendant)) AND ((@IsNull_mlevel "& _ "= 1 AND [mlevel] IS NULL) OR ([mlevel] = @Original_mlevel)) AND ((@IsNull_carryS"& _ "erial = 1 AND [carrySerial] IS NULL) OR ([carrySerial] = @Original_carrySerial))"& _ " AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)"& _ ") AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_status"& _ ")) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Or"& _ "iginal_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL)"& _ " OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelno, des"& _ "cendant, mlevel, carrySerial, active, status, lastupdate, lastupdatedby FROM mod"& _ "elHierarchyHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@descendant", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "descendant", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@mlevel", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mlevel", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@carrySerial", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "carrySerial", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_descendant", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "descendant", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_descendant", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "descendant", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_mlevel", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mlevel", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_mlevel", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mlevel", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_carrySerial", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "carrySerial", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_carrySerial", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "carrySerial", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, modelno, descendant, mlevel, carrySerial, active, status, lastupd"& _ "ate, lastupdatedby FROM dbo.modelHierarchyHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelHierarchyHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelHierarchyHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelHierarchyHistDataTable = New EpsonDataSet1.modelHierarchyHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelHierarchyHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelHierarchyHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_modelno As String, ByVal Original_descendant As String, ByVal Original_mlevel As Global.System.Nullable(Of Integer), ByVal Original_carrySerial As Global.System.Nullable(Of Integer), ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_modelno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_modelno,String) End If If (Original_descendant Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_descendant,String) End If If (Original_mlevel.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_mlevel.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_carrySerial.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_carrySerial.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal descendant As String, ByVal mlevel As Global.System.Nullable(Of Integer), ByVal carrySerial As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (descendant Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(descendant,String) End If If (mlevel.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(mlevel.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (carrySerial.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(carrySerial.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal descendant As String, _ ByVal mlevel As Global.System.Nullable(Of Integer), _ ByVal carrySerial As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_modelno As String, _ ByVal Original_descendant As String, _ ByVal Original_mlevel As Global.System.Nullable(Of Integer), _ ByVal Original_carrySerial As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (modelno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelno,String) End If If (descendant Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(descendant,String) End If If (mlevel.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(mlevel.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (carrySerial.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(carrySerial.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_lineNum,Long) If (Original_modelno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_modelno,String) End If If (Original_descendant Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_descendant,String) End If If (Original_mlevel.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_mlevel.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_carrySerial.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_carrySerial.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(25).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal descendant As String, _ ByVal mlevel As Global.System.Nullable(Of Integer), _ ByVal carrySerial As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_modelno As String, _ ByVal Original_descendant As String, _ ByVal Original_mlevel As Global.System.Nullable(Of Integer), _ ByVal Original_carrySerial As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(modelno, descendant, mlevel, carrySerial, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_modelno, Original_descendant, Original_mlevel, Original_carrySerial, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("modelDesc1", "modelDesc1") tableMapping.ColumnMappings.Add("modelDesc2", "modelDesc2") tableMapping.ColumnMappings.Add("modelFamily", "modelFamily") tableMapping.ColumnMappings.Add("modelType", "modelType") tableMapping.ColumnMappings.Add("minRev", "minRev") tableMapping.ColumnMappings.Add("latestRev", "latestRev") tableMapping.ColumnMappings.Add("itemWt", "itemWt") tableMapping.ColumnMappings.Add("batch", "batch") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelHist] WHERE (([lineNum] = @Original_lineNum) AND ((@IsNul"& _ "l_modelno = 1 AND [modelno] IS NULL) OR ([modelno] = @Original_modelno)) AND ((@"& _ "IsNull_modelDesc1 = 1 AND [modelDesc1] IS NULL) OR ([modelDesc1] = @Original_mod"& _ "elDesc1)) AND ((@IsNull_modelDesc2 = 1 AND [modelDesc2] IS NULL) OR ([modelDesc2"& _ "] = @Original_modelDesc2)) AND ((@IsNull_modelFamily = 1 AND [modelFamily] IS NU"& _ "LL) OR ([modelFamily] = @Original_modelFamily)) AND ((@IsNull_modelType = 1 AND "& _ "[modelType] IS NULL) OR ([modelType] = @Original_modelType)) AND ((@IsNull_minRe"& _ "v = 1 AND [minRev] IS NULL) OR ([minRev] = @Original_minRev)) AND ((@IsNull_late"& _ "stRev = 1 AND [latestRev] IS NULL) OR ([latestRev] = @Original_latestRev)) AND ("& _ "(@IsNull_itemWt = 1 AND [itemWt] IS NULL) OR ([itemWt] = @Original_itemWt)) AND "& _ "((@IsNull_batch = 1 AND [batch] IS NULL) OR ([batch] = @Original_batch)) AND ((@"& _ "IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)) AND (("& _ "@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ("& _ "(@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_l"& _ "astupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([la"& _ "stupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelDesc1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelDesc2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelFamily", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_minRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_latestRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_itemWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_itemWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelHist] ([modelno], [modelDesc1], [modelDesc2], [modelFamil"& _ "y], [modelType], [minRev], [latestRev], [itemWt], [batch], [active], [status], ["& _ "lastupdate], [lastupdatedby]) VALUES (@modelno, @modelDesc1, @modelDesc2, @model"& _ "Family, @modelType, @minRev, @latestRev, @itemWt, @batch, @active, @status, @las"& _ "tupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelno, modelDesc1, modelDesc2, mode"& _ "lFamily, modelType, minRev, latestRev, itemWt, batch, active, status, lastupdate"& _ ", lastupdatedby FROM modelHist WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@itemWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelHist] SET [modelno] = @modelno, [modelDesc1] = @modelDesc1, [m"& _ "odelDesc2] = @modelDesc2, [modelFamily] = @modelFamily, [modelType] = @modelType"& _ ", [minRev] = @minRev, [latestRev] = @latestRev, [itemWt] = @itemWt, [batch] = @b"& _ "atch, [active] = @active, [status] = @status, [lastupdate] = @lastupdate, [lastu"& _ "pdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull_"& _ "modelno = 1 AND [modelno] IS NULL) OR ([modelno] = @Original_modelno)) AND ((@Is"& _ "Null_modelDesc1 = 1 AND [modelDesc1] IS NULL) OR ([modelDesc1] = @Original_model"& _ "Desc1)) AND ((@IsNull_modelDesc2 = 1 AND [modelDesc2] IS NULL) OR ([modelDesc2] "& _ "= @Original_modelDesc2)) AND ((@IsNull_modelFamily = 1 AND [modelFamily] IS NULL"& _ ") OR ([modelFamily] = @Original_modelFamily)) AND ((@IsNull_modelType = 1 AND [m"& _ "odelType] IS NULL) OR ([modelType] = @Original_modelType)) AND ((@IsNull_minRev "& _ "= 1 AND [minRev] IS NULL) OR ([minRev] = @Original_minRev)) AND ((@IsNull_latest"& _ "Rev = 1 AND [latestRev] IS NULL) OR ([latestRev] = @Original_latestRev)) AND ((@"& _ "IsNull_itemWt = 1 AND [itemWt] IS NULL) OR ([itemWt] = @Original_itemWt)) AND (("& _ "@IsNull_batch = 1 AND [batch] IS NULL) OR ([batch] = @Original_batch)) AND ((@Is"& _ "Null_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)) AND ((@I"& _ "sNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@"& _ "IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_las"& _ "tupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([last"& _ "updatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelno, modelDesc1, m"& _ "odelDesc2, modelFamily, modelType, minRev, latestRev, itemWt, batch, active, sta"& _ "tus, lastupdate, lastupdatedby FROM modelHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@itemWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelDesc1", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelDesc2", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelFamily", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_minRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_latestRev", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_itemWt", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_itemWt", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "itemWt", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, "& _ "latestRev, itemWt, batch, active, status, lastupdate, lastupdatedby FROM dbo.mod"& _ "elHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelHistDataTable = New EpsonDataSet1.modelHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_modelno As String, ByVal Original_modelDesc1 As String, ByVal Original_modelDesc2 As String, ByVal Original_modelFamily As String, ByVal Original_modelType As String, ByVal Original_minRev As String, ByVal Original_latestRev As String, ByVal Original_itemWt As Global.System.Nullable(Of Single), ByVal Original_batch As Global.System.Nullable(Of Integer), ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_modelno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_modelno,String) End If If (Original_modelDesc1 Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_modelDesc1,String) End If If (Original_modelDesc2 Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_modelDesc2,String) End If If (Original_modelFamily Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_modelFamily,String) End If If (Original_modelType Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_modelType,String) End If If (Original_minRev Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_minRev,String) End If If (Original_latestRev Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_latestRev,String) End If If (Original_itemWt.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_itemWt.Value,Single) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_batch.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_batch.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal modelDesc1 As String, ByVal modelDesc2 As String, ByVal modelFamily As String, ByVal modelType As String, ByVal minRev As String, ByVal latestRev As String, ByVal itemWt As Global.System.Nullable(Of Single), ByVal batch As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (modelDesc1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(modelDesc1,String) End If If (modelDesc2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(modelDesc2,String) End If If (modelFamily Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(modelFamily,String) End If If (modelType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(modelType,String) End If If (minRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(minRev,String) End If If (latestRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(latestRev,String) End If If (itemWt.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(itemWt.Value,Single) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (batch.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(batch.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(11).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal modelDesc1 As String, _ ByVal modelDesc2 As String, _ ByVal modelFamily As String, _ ByVal modelType As String, _ ByVal minRev As String, _ ByVal latestRev As String, _ ByVal itemWt As Global.System.Nullable(Of Single), _ ByVal batch As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_modelno As String, _ ByVal Original_modelDesc1 As String, _ ByVal Original_modelDesc2 As String, _ ByVal Original_modelFamily As String, _ ByVal Original_modelType As String, _ ByVal Original_minRev As String, _ ByVal Original_latestRev As String, _ ByVal Original_itemWt As Global.System.Nullable(Of Single), _ ByVal Original_batch As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (modelno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelno,String) End If If (modelDesc1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(modelDesc1,String) End If If (modelDesc2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(modelDesc2,String) End If If (modelFamily Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(modelFamily,String) End If If (modelType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(modelType,String) End If If (minRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(minRev,String) End If If (latestRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(latestRev,String) End If If (itemWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(itemWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (batch.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(batch.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lineNum,Long) If (Original_modelno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_modelno,String) End If If (Original_modelDesc1 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_modelDesc1,String) End If If (Original_modelDesc2 Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_modelDesc2,String) End If If (Original_modelFamily Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_modelFamily,String) End If If (Original_modelType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_modelType,String) End If If (Original_minRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(24).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(24).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = CType(Original_minRev,String) End If If (Original_latestRev Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(26).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(26).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = CType(Original_latestRev,String) End If If (Original_itemWt.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(28).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = CType(Original_itemWt.Value,Single) Else Me.Adapter.UpdateCommand.Parameters(28).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(29).Value = Global.System.DBNull.Value End If If (Original_batch.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(30).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = CType(Original_batch.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(30).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(31).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(32).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(33).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(32).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(33).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(34).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(35).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(34).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(35).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(36).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(37).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(36).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(37).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(38).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(39).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(38).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(39).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(40).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal modelDesc1 As String, _ ByVal modelDesc2 As String, _ ByVal modelFamily As String, _ ByVal modelType As String, _ ByVal minRev As String, _ ByVal latestRev As String, _ ByVal itemWt As Global.System.Nullable(Of Single), _ ByVal batch As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_modelno As String, _ ByVal Original_modelDesc1 As String, _ ByVal Original_modelDesc2 As String, _ ByVal Original_modelFamily As String, _ ByVal Original_modelType As String, _ ByVal Original_minRev As String, _ ByVal Original_latestRev As String, _ ByVal Original_itemWt As Global.System.Nullable(Of Single), _ ByVal Original_batch As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev, itemWt, batch, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_modelno, Original_modelDesc1, Original_modelDesc2, Original_modelFamily, Original_modelType, Original_minRev, Original_latestRev, Original_itemWt, Original_batch, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelRouteTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelRoute" tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("flowsequence", "flowsequence") tableMapping.ColumnMappings.Add("station", "station") tableMapping.ColumnMappings.Add("skip", "skip") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastStation", "lastStation") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelRoute] WHERE (([modelno] = @Original_modelno) AND ((@IsNu"& _ "ll_flowsequence = 1 AND [flowsequence] IS NULL) OR ([flowsequence] = @Original_f"& _ "lowsequence)) AND ([station] = @Original_station) AND ((@IsNull_skip = 1 AND [sk"& _ "ip] IS NULL) OR ([skip] = @Original_skip)) AND ((@IsNull_active = 1 AND [active]"& _ " IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_lastStation = 1 AND [l"& _ "astStation] IS NULL) OR ([lastStation] = @Original_lastStation)) AND ((@IsNull_l"& _ "astupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)"& _ ") AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedb"& _ "y] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelRoute] ([modelno], [flowsequence], [station], [skip], [ac"& _ "tive], [lastStation], [lastupdate], [lastupdatedby]) VALUES (@modelno, @flowsequ"& _ "ence, @station, @skip, @active, @lastStation, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SEL"& _ "ECT modelno, flowsequence, station, skip, active, lastStation, lastupdate, lastu"& _ "pdatedby FROM modelRoute WHERE (modelno = @modelno) AND (station = @station)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelRoute] SET [modelno] = @modelno, [flowsequence] = @flowsequenc"& _ "e, [station] = @station, [skip] = @skip, [active] = @active, [lastStation] = @la"& _ "stStation, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE (("& _ "[modelno] = @Original_modelno) AND ((@IsNull_flowsequence = 1 AND [flowsequence]"& _ " IS NULL) OR ([flowsequence] = @Original_flowsequence)) AND ([station] = @Origin"& _ "al_station) AND ((@IsNull_skip = 1 AND [skip] IS NULL) OR ([skip] = @Original_sk"& _ "ip)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_act"& _ "ive)) AND ((@IsNull_lastStation = 1 AND [lastStation] IS NULL) OR ([lastStation]"& _ " = @Original_lastStation)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL"& _ ") OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND "& _ "[lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELE"& _ "CT modelno, flowsequence, station, skip, active, lastStation, lastupdate, lastup"& _ "datedby FROM modelRoute WHERE (modelno = @modelno) AND (station = @station)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelno, flowsequence, station, skip, active, lastStation, lastupdate, las"& _ "tupdatedby FROM dbo.modelRoute" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelRouteDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelRouteDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelRouteDataTable = New EpsonDataSet1.modelRouteDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelRouteDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelRoute") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_modelno As String, ByVal Original_flowsequence As Global.System.Nullable(Of Integer), ByVal Original_station As String, ByVal Original_skip As Global.System.Nullable(Of Integer), ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastStation As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_modelno,String) End If If (Original_flowsequence.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_flowsequence.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (Original_station Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_station") Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_station,String) End If If (Original_skip.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_skip.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (Original_lastStation.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(9).Value = CType(Original_lastStation.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(11).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(13).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal flowsequence As Global.System.Nullable(Of Integer), ByVal station As String, ByVal skip As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal lastStation As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (flowsequence.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(flowsequence.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (station Is Nothing) Then Throw New Global.System.ArgumentNullException("station") Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(station,String) End If If (skip.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(skip.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastStation.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastStation.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal flowsequence As Global.System.Nullable(Of Integer), _ ByVal station As String, _ ByVal skip As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal lastStation As Global.System.Nullable(Of Integer), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_modelno As String, _ ByVal Original_flowsequence As Global.System.Nullable(Of Integer), _ ByVal Original_station As String, _ ByVal Original_skip As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_lastStation As Global.System.Nullable(Of Integer), _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelno,String) End If If (flowsequence.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(flowsequence.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (station Is Nothing) Then Throw New Global.System.ArgumentNullException("station") Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(station,String) End If If (skip.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(skip.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastStation.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastStation.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(lastupdatedby,String) End If If (Original_modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelno") Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_modelno,String) End If If (Original_flowsequence.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_flowsequence.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_station Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_station") Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_station,String) End If If (Original_skip.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_skip.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (Original_lastStation.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_lastStation.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal flowsequence As Global.System.Nullable(Of Integer), ByVal skip As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal lastStation As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_modelno As String, ByVal Original_flowsequence As Global.System.Nullable(Of Integer), ByVal Original_station As String, ByVal Original_skip As Global.System.Nullable(Of Integer), ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastStation As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_modelno, flowsequence, Original_station, skip, active, lastStation, lastupdate, lastupdatedby, Original_modelno, Original_flowsequence, Original_station, Original_skip, Original_active, Original_lastStation, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelRoute_backup_1TableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelRoute_backup_1" tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("flowsequence", "flowsequence") tableMapping.ColumnMappings.Add("station", "station") tableMapping.ColumnMappings.Add("skip", "skip") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastStation", "lastStation") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelRoute_backup_1] ([modelno], [flowsequence], [station], [s"& _ "kip], [active], [lastStation], [lastupdate], [lastupdatedby]) VALUES (@modelno, "& _ "@flowsequence, @station, @skip, @active, @lastStation, @lastupdate, @lastupdated"& _ "by)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelno, flowsequence, station, skip, active, lastStation, lastupdate, las"& _ "tupdatedby FROM dbo.modelRoute_backup_1" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelRoute_backup_1DataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelRoute_backup_1DataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelRoute_backup_1DataTable = New EpsonDataSet1.modelRoute_backup_1DataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelRoute_backup_1DataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelRoute_backup_1") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal flowsequence As Global.System.Nullable(Of Integer), ByVal station As String, ByVal skip As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal lastStation As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (flowsequence.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(flowsequence.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (station Is Nothing) Then Throw New Global.System.ArgumentNullException("station") Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(station,String) End If If (skip.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(skip.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastStation.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastStation.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelRouteHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelRouteHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("flowsequence", "flowsequence") tableMapping.ColumnMappings.Add("station", "station") tableMapping.ColumnMappings.Add("skip", "skip") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastStation", "lastStation") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelRouteHist] WHERE (([lineNum] = @Original_lineNum) AND ((@"& _ "IsNull_modelno = 1 AND [modelno] IS NULL) OR ([modelno] = @Original_modelno)) AN"& _ "D ((@IsNull_flowsequence = 1 AND [flowsequence] IS NULL) OR ([flowsequence] = @O"& _ "riginal_flowsequence)) AND ((@IsNull_station = 1 AND [station] IS NULL) OR ([sta"& _ "tion] = @Original_station)) AND ((@IsNull_skip = 1 AND [skip] IS NULL) OR ([skip"& _ "] = @Original_skip)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active]"& _ " = @Original_active)) AND ((@IsNull_lastStation = 1 AND [lastStation] IS NULL) O"& _ "R ([lastStation] = @Original_lastStation)) AND ((@IsNull_status = 1 AND [status]"& _ " IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [la"& _ "stupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastu"& _ "pdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastup"& _ "datedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_station", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelRouteHist] ([modelno], [flowsequence], [station], [skip],"& _ " [active], [lastStation], [status], [lastupdate], [lastupdatedby]) VALUES (@mode"& _ "lno, @flowsequence, @station, @skip, @active, @lastStation, @status, @lastupdate"& _ ", @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelno, flowsequence, station, skip, active"& _ ", lastStation, status, lastupdate, lastupdatedby FROM modelRouteHist WHERE (line"& _ "Num = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelRouteHist] SET [modelno] = @modelno, [flowsequence] = @flowseq"& _ "uence, [station] = @station, [skip] = @skip, [active] = @active, [lastStation] ="& _ " @lastStation, [status] = @status, [lastupdate] = @lastupdate, [lastupdatedby] ="& _ " @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNull_modelno = 1"& _ " AND [modelno] IS NULL) OR ([modelno] = @Original_modelno)) AND ((@IsNull_flowse"& _ "quence = 1 AND [flowsequence] IS NULL) OR ([flowsequence] = @Original_flowsequen"& _ "ce)) AND ((@IsNull_station = 1 AND [station] IS NULL) OR ([station] = @Original_"& _ "station)) AND ((@IsNull_skip = 1 AND [skip] IS NULL) OR ([skip] = @Original_skip"& _ ")) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_activ"& _ "e)) AND ((@IsNull_lastStation = 1 AND [lastStation] IS NULL) OR ([lastStation] ="& _ " @Original_lastStation)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([sta"& _ "tus] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL)"& _ " OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND ["& _ "lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELEC"& _ "T lineNum, modelno, flowsequence, station, skip, active, lastStation, status, la"& _ "stupdate, lastupdatedby FROM modelRouteHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_flowsequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flowsequence", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_station", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_skip", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "skip", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastStation", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastStation", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, modelno, flowsequence, station, skip, active, lastStation, status"& _ ", lastupdate, lastupdatedby FROM dbo.modelRouteHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelRouteHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelRouteHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelRouteHistDataTable = New EpsonDataSet1.modelRouteHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelRouteHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelRouteHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_modelno As String, ByVal Original_flowsequence As Global.System.Nullable(Of Integer), ByVal Original_station As String, ByVal Original_skip As Global.System.Nullable(Of Integer), ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastStation As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_modelno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_modelno,String) End If If (Original_flowsequence.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_flowsequence.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_station Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_station,String) End If If (Original_skip.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_skip.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastStation.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastStation.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal flowsequence As Global.System.Nullable(Of Integer), ByVal station As String, ByVal skip As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal lastStation As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (flowsequence.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(flowsequence.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (station Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(station,String) End If If (skip.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(skip.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastStation.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastStation.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal flowsequence As Global.System.Nullable(Of Integer), _ ByVal station As String, _ ByVal skip As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal lastStation As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_modelno As String, _ ByVal Original_flowsequence As Global.System.Nullable(Of Integer), _ ByVal Original_station As String, _ ByVal Original_skip As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_lastStation As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (modelno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelno,String) End If If (flowsequence.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(1).Value = CType(flowsequence.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (station Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(station,String) End If If (skip.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(skip.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastStation.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastStation.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_lineNum,Long) If (Original_modelno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_modelno,String) End If If (Original_flowsequence.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_flowsequence.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value End If If (Original_station Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_station,String) End If If (Original_skip.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_skip.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (Original_lastStation.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(20).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = CType(Original_lastStation.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(20).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(21).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(22).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(22).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(23).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(24).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(24).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(25).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(26).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(26).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(27).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(28).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal modelno As String, _ ByVal flowsequence As Global.System.Nullable(Of Integer), _ ByVal station As String, _ ByVal skip As Global.System.Nullable(Of Integer), _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal lastStation As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_modelno As String, _ ByVal Original_flowsequence As Global.System.Nullable(Of Integer), _ ByVal Original_station As String, _ ByVal Original_skip As Global.System.Nullable(Of Integer), _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_lastStation As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(modelno, flowsequence, station, skip, active, lastStation, status, lastupdate, lastupdatedby, Original_lineNum, Original_modelno, Original_flowsequence, Original_station, Original_skip, Original_active, Original_lastStation, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelTempTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelTemp" tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("modelDesc1", "modelDesc1") tableMapping.ColumnMappings.Add("modelDesc2", "modelDesc2") tableMapping.ColumnMappings.Add("modelFamily", "modelFamily") tableMapping.ColumnMappings.Add("modelType", "modelType") tableMapping.ColumnMappings.Add("minRev", "minRev") tableMapping.ColumnMappings.Add("latestRev", "latestRev") tableMapping.ColumnMappings.Add("batch", "batch") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelTemp] ([modelno], [modelDesc1], [modelDesc2], [modelFamil"& _ "y], [modelType], [minRev], [latestRev], [batch], [active], [lastupdate], [lastup"& _ "datedby]) VALUES (@modelno, @modelDesc1, @modelDesc2, @modelFamily, @modelType, "& _ "@minRev, @latestRev, @batch, @active, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelFamily", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@minRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "minRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@latestRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "latestRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batch", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batch", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelno, modelDesc1, modelDesc2, modelFamily, modelType, minRev, latestRev"& _ ", batch, active, lastupdate, lastupdatedby FROM dbo.modelTemp" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelTempDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelTempDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelTempDataTable = New EpsonDataSet1.modelTempDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelTempDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelTemp") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal modelDesc1 As String, ByVal modelDesc2 As String, ByVal modelFamily As String, ByVal modelType As String, ByVal minRev As String, ByVal latestRev As String, ByVal batch As Global.System.Nullable(Of Integer), ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (modelDesc1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(modelDesc1,String) End If If (modelDesc2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(modelDesc2,String) End If If (modelFamily Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(modelFamily,String) End If If (modelType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(modelType,String) End If If (minRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(minRev,String) End If If (latestRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(latestRev,String) End If If (batch.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(batch.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelTypeTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelType" tableMapping.ColumnMappings.Add("modelType", "modelType") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelType] WHERE (([modelType] = @Original_modelType) AND ((@I"& _ "sNull_description = 1 AND [description] IS NULL) OR ([description] = @Original_d"& _ "escription)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Orig"& _ "inal_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastup"& _ "date] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedb"& _ "y] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelType] ([modelType], [description], [active], [lastupdate]"& _ ", [lastupdatedby]) VALUES (@modelType, @description, @active, @lastupdate, @last"& _ "updatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT modelType, description, active, lastupdate, lastupdatedby FR"& _ "OM modelType WHERE (modelType = @modelType)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelType] SET [modelType] = @modelType, [description] = @descripti"& _ "on, [active] = @active, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdat"& _ "edby WHERE (([modelType] = @Original_modelType) AND ((@IsNull_description = 1 AN"& _ "D [description] IS NULL) OR ([description] = @Original_description)) AND ((@IsNu"& _ "ll_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)) AND ((@IsN"& _ "ull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastup"& _ "date)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupd"& _ "atedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT modelType, description, active, la"& _ "stupdate, lastupdatedby FROM modelType WHERE (modelType = @modelType)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelType, description, active, lastupdate, lastupdatedby FROM dbo.modelTy"& _ "pe" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelTypeDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelTypeDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelTypeDataTable = New EpsonDataSet1.modelTypeDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelTypeDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelType") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_modelType As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_modelType Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelType") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_modelType,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelType As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelType Is Nothing) Then Throw New Global.System.ArgumentNullException("modelType") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelType,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal modelType As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_modelType As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (modelType Is Nothing) Then Throw New Global.System.ArgumentNullException("modelType") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelType,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdatedby,String) End If If (Original_modelType Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_modelType") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_modelType,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_modelType As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_modelType, description, active, lastupdate, lastupdatedby, Original_modelType, Original_description, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class modelTypeHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "modelTypeHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("modelType", "modelType") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[modelTypeHist] WHERE (([lineNum] = @Original_lineNum) AND ((@I"& _ "sNull_modelType = 1 AND [modelType] IS NULL) OR ([modelType] = @Original_modelTy"& _ "pe)) AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] "& _ "= @Original_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([ac"& _ "tive] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([s"& _ "tatus] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NUL"& _ "L) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND"& _ " [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[modelTypeHist] ([modelType], [description], [active], [status]"& _ ", [lastupdate], [lastupdatedby]) VALUES (@modelType, @description, @active, @sta"& _ "tus, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, modelType, description, acti"& _ "ve, status, lastupdate, lastupdatedby FROM modelTypeHist WHERE (lineNum = SCOPE_"& _ "IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[modelTypeHist] SET [modelType] = @modelType, [description] = @descr"& _ "iption, [active] = @active, [status] = @status, [lastupdate] = @lastupdate, [las"& _ "tupdatedby] = @lastupdatedby WHERE (([lineNum] = @Original_lineNum) AND ((@IsNul"& _ "l_modelType = 1 AND [modelType] IS NULL) OR ([modelType] = @Original_modelType))"& _ " AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @O"& _ "riginal_description)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active"& _ "] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([statu"& _ "s] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) O"& _ "R ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [la"& _ "stupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT "& _ "lineNum, modelType, description, active, status, lastupdate, lastupdatedby FROM "& _ "modelTypeHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_modelType", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_modelType", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelType", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, modelType, description, active, status, lastupdate, lastupdatedby"& _ " FROM dbo.modelTypeHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.modelTypeHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.modelTypeHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.modelTypeHistDataTable = New EpsonDataSet1.modelTypeHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.modelTypeHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "modelTypeHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_modelType As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_modelType Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_modelType,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal modelType As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (modelType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelType,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal modelType As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_modelType As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String, ByVal lineNum As Long) As Integer If (modelType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(modelType,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_modelType Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_modelType,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_description,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal modelType As String, ByVal description As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_lineNum As Long, ByVal Original_modelType As String, ByVal Original_description As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(modelType, description, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_modelType, Original_description, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class Parts_ListTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "Parts_List" tableMapping.ColumnMappings.Add("Descriptions_Parameter_Desc", "Descriptions_Parameter_Desc") tableMapping.ColumnMappings.Add("Item_Code", "Item_Code") tableMapping.ColumnMappings.Add("Item_Item_Desc", "Item_Item_Desc") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Parts_List] ([Descriptions_Parameter_Desc], [Item_Code], [Item"& _ "_Item_Desc]) VALUES (@Descriptions_Parameter_Desc, @Item_Code, @Item_Item_Desc)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Descriptions_Parameter_Desc", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Descriptions_Parameter_Desc", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Item_Code", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Item_Code", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Item_Item_Desc", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Item_Item_Desc", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Descriptions_Parameter_Desc, Item_Code, Item_Item_Desc FROM dbo.Parts_List"& _ "" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.Parts_ListDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.Parts_ListDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.Parts_ListDataTable = New EpsonDataSet1.Parts_ListDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.Parts_ListDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "Parts_List") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal Descriptions_Parameter_Desc As String, ByVal Item_Code As String, ByVal Item_Item_Desc As String) As Integer If (Descriptions_Parameter_Desc Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Descriptions_Parameter_Desc,String) End If If (Item_Code Is Nothing) Then Throw New Global.System.ArgumentNullException("Item_Code") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(Item_Code,String) End If If (Item_Item_Desc Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(Item_Item_Desc,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class partsCodeTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "partsCode" tableMapping.ColumnMappings.Add("part_id", "part_id") tableMapping.ColumnMappings.Add("partcode", "partcode") tableMapping.ColumnMappings.Add("partname", "partname") tableMapping.ColumnMappings.Add("standardpack", "standardpack") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("additional", "additional") tableMapping.ColumnMappings.Add("factory", "factory") tableMapping.ColumnMappings.Add("lastupdated", "lastupdated") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[partsCode] WHERE (([part_id] = @Original_part_id) AND ([standa"& _ "rdpack] = @Original_standardpack) AND ((@IsNull_lastupdated = 1 AND [lastupdated"& _ "] IS NULL) OR ([lastupdated] = @Original_lastupdated)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_part_id", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "part_id", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_standardpack", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "standardpack", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdated", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdated", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdated", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[partsCode] ([partcode], [partname], [standardpack], [model], ["& _ "additional], [factory], [lastupdated], [lastupdatedby]) VALUES (@partcode, @part"& _ "name, @standardpack, @model, @additional, @factory, @lastupdated, @lastupdatedby"& _ ");"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT part_id, partcode, partname, standardpack, model, additional, factory"& _ ", lastupdated, lastupdatedby FROM partsCode WHERE (part_id = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partcode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partcode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partname", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partname", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@standardpack", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "standardpack", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@additional", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "additional", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@factory", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "factory", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[partsCode] SET [partcode] = @partcode, [partname] = @partname, [sta"& _ "ndardpack] = @standardpack, [model] = @model, [additional] = @additional, [facto"& _ "ry] = @factory, [lastupdated] = @lastupdated, [lastupdatedby] = @lastupdatedby W"& _ "HERE (([part_id] = @Original_part_id) AND ([standardpack] = @Original_standardpa"& _ "ck) AND ((@IsNull_lastupdated = 1 AND [lastupdated] IS NULL) OR ([lastupdated] ="& _ " @Original_lastupdated)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT part_id, partcode, partname, standardpack, mo"& _ "del, additional, factory, lastupdated, lastupdatedby FROM partsCode WHERE (part_"& _ "id = @part_id)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partcode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partcode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partname", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partname", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@standardpack", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "standardpack", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@additional", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "additional", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@factory", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "factory", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_part_id", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "part_id", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_standardpack", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "standardpack", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdated", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdated", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdated", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@part_id", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "part_id", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT part_id, partcode, partname, standardpack, model, additional, factory, las"& _ "tupdated, lastupdatedby FROM dbo.partsCode" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.partsCodeDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.partsCodeDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.partsCodeDataTable = New EpsonDataSet1.partsCodeDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.partsCodeDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "partsCode") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_part_id As Integer, ByVal Original_standardpack As Integer, ByVal Original_lastupdated As Global.System.Nullable(Of Date)) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_part_id,Integer) Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_standardpack,Integer) If (Original_lastupdated.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(2).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_lastupdated.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(2).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(3).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal partcode As String, ByVal partname As String, ByVal standardpack As Integer, ByVal model As String, ByVal additional As String, ByVal factory As String, ByVal lastupdated As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (partcode Is Nothing) Then Throw New Global.System.ArgumentNullException("partcode") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(partcode,String) End If If (partname Is Nothing) Then Throw New Global.System.ArgumentNullException("partname") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(partname,String) End If Me.Adapter.InsertCommand.Parameters(2).Value = CType(standardpack,Integer) If (model Is Nothing) Then Throw New Global.System.ArgumentNullException("model") Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(model,String) End If If (additional Is Nothing) Then Throw New Global.System.ArgumentNullException("additional") Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(additional,String) End If If (factory Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(factory,String) End If If (lastupdated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal partcode As String, ByVal partname As String, ByVal standardpack As Integer, ByVal model As String, ByVal additional As String, ByVal factory As String, ByVal lastupdated As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_part_id As Integer, ByVal Original_standardpack As Integer, ByVal Original_lastupdated As Global.System.Nullable(Of Date), ByVal part_id As Integer) As Integer If (partcode Is Nothing) Then Throw New Global.System.ArgumentNullException("partcode") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(partcode,String) End If If (partname Is Nothing) Then Throw New Global.System.ArgumentNullException("partname") Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(partname,String) End If Me.Adapter.UpdateCommand.Parameters(2).Value = CType(standardpack,Integer) If (model Is Nothing) Then Throw New Global.System.ArgumentNullException("model") Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(model,String) End If If (additional Is Nothing) Then Throw New Global.System.ArgumentNullException("additional") Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(additional,String) End If If (factory Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(factory,String) End If If (lastupdated.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdated.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_part_id,Integer) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_standardpack,Integer) If (Original_lastupdated.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_lastupdated.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(12).Value = CType(part_id,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal partcode As String, ByVal partname As String, ByVal standardpack As Integer, ByVal model As String, ByVal additional As String, ByVal factory As String, ByVal lastupdated As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_part_id As Integer, ByVal Original_standardpack As Integer, ByVal Original_lastupdated As Global.System.Nullable(Of Date)) As Integer Return Me.Update(partcode, partname, standardpack, model, additional, factory, lastupdated, lastupdatedby, Original_part_id, Original_standardpack, Original_lastupdated, Original_part_id) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class PartsModelTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "PartsModel" tableMapping.ColumnMappings.Add("Account", "Account") tableMapping.ColumnMappings.Add("ModelCode", "ModelCode") tableMapping.ColumnMappings.Add("Description", "Description") tableMapping.ColumnMappings.Add("ControlID", "ControlID") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[PartsModel] WHERE (([ModelCode] = @Original_ModelCode) AND ([C"& _ "ontrolID] = @Original_ControlID))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ModelCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModelCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ControlID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ControlID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[PartsModel] ([Account], [ModelCode], [Description]) VALUES (@A"& _ "ccount, @ModelCode, @Description);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Account, ModelCode, Description, Cont"& _ "rolID FROM PartsModel WHERE (ControlID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Account", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Account", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModelCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModelCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[PartsModel] SET [Account] = @Account, [ModelCode] = @ModelCode, [De"& _ "scription] = @Description WHERE (([ModelCode] = @Original_ModelCode) AND ([Contr"& _ "olID] = @Original_ControlID));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Account, ModelCode, Description, ControlI"& _ "D FROM PartsModel WHERE (ControlID = @ControlID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Account", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Account", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModelCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModelCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ModelCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModelCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ControlID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ControlID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ControlID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "ControlID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Account, ModelCode, Description, ControlID FROM dbo.PartsModel" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.PartsModelDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.PartsModelDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.PartsModelDataTable = New EpsonDataSet1.PartsModelDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.PartsModelDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "PartsModel") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_ModelCode As String, ByVal Original_ControlID As Integer) As Integer If (Original_ModelCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_ModelCode") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_ModelCode,String) End If Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_ControlID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal Account As String, ByVal ModelCode As String, ByVal Description As String) As Integer If (Account Is Nothing) Then Throw New Global.System.ArgumentNullException("Account") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Account,String) End If If (ModelCode Is Nothing) Then Throw New Global.System.ArgumentNullException("ModelCode") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(ModelCode,String) End If If (Description Is Nothing) Then Throw New Global.System.ArgumentNullException("Description") Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(Description,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal Account As String, ByVal ModelCode As String, ByVal Description As String, ByVal Original_ModelCode As String, ByVal Original_ControlID As Integer, ByVal ControlID As Integer) As Integer If (Account Is Nothing) Then Throw New Global.System.ArgumentNullException("Account") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(Account,String) End If If (ModelCode Is Nothing) Then Throw New Global.System.ArgumentNullException("ModelCode") Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(ModelCode,String) End If If (Description Is Nothing) Then Throw New Global.System.ArgumentNullException("Description") Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Description,String) End If If (Original_ModelCode Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_ModelCode") Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_ModelCode,String) End If Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_ControlID,Integer) Me.Adapter.UpdateCommand.Parameters(5).Value = CType(ControlID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal Account As String, ByVal ModelCode As String, ByVal Description As String, ByVal Original_ModelCode As String, ByVal Original_ControlID As Integer) As Integer Return Me.Update(Account, ModelCode, Description, Original_ModelCode, Original_ControlID, Original_ControlID) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class PartsPrepTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "PartsPrep" tableMapping.ColumnMappings.Add("Control_ID", "Control_ID") tableMapping.ColumnMappings.Add("Ionics_PN", "Ionics_PN") tableMapping.ColumnMappings.Add("Epson_PN", "Epson_PN") tableMapping.ColumnMappings.Add("Supplier_PN", "Supplier_PN") tableMapping.ColumnMappings.Add("Description", "Description") tableMapping.ColumnMappings.Add("Rack", "Rack") tableMapping.ColumnMappings.Add("Com_Type", "Com_Type") tableMapping.ColumnMappings.Add("ModelCode", "ModelCode") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[PartsPrep] WHERE (([Control_ID] = @Original_Control_ID) AND (["& _ "Ionics_PN] = @Original_Ionics_PN) AND ([Epson_PN] = @Original_Epson_PN) AND ([Su"& _ "pplier_PN] = @Original_Supplier_PN) AND ([Rack] = @Original_Rack) AND ([Com_Type"& _ "] = @Original_Com_Type))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Control_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Control_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Ionics_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Ionics_PN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Epson_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Epson_PN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Supplier_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Supplier_PN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Rack", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Rack", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Com_Type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Com_Type", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[PartsPrep] ([Ionics_PN], [Epson_PN], [Supplier_PN], [Descripti"& _ "on], [Rack], [Com_Type], [ModelCode]) VALUES (@Ionics_PN, @Epson_PN, @Supplier_P"& _ "N, @Description, @Rack, @Com_Type, @ModelCode);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Control_ID, Ionics_PN, E"& _ "pson_PN, Supplier_PN, Description, Rack, Com_Type, ModelCode FROM PartsPrep WHER"& _ "E (Control_ID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Ionics_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Ionics_PN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Epson_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Epson_PN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Supplier_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Supplier_PN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Rack", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Rack", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Com_Type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Com_Type", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModelCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModelCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[PartsPrep] SET [Ionics_PN] = @Ionics_PN, [Epson_PN] = @Epson_PN, [S"& _ "upplier_PN] = @Supplier_PN, [Description] = @Description, [Rack] = @Rack, [Com_T"& _ "ype] = @Com_Type, [ModelCode] = @ModelCode WHERE (([Control_ID] = @Original_Cont"& _ "rol_ID) AND ([Ionics_PN] = @Original_Ionics_PN) AND ([Epson_PN] = @Original_Epso"& _ "n_PN) AND ([Supplier_PN] = @Original_Supplier_PN) AND ([Rack] = @Original_Rack) "& _ "AND ([Com_Type] = @Original_Com_Type));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Control_ID, Ionics_PN, Epson_PN,"& _ " Supplier_PN, Description, Rack, Com_Type, ModelCode FROM PartsPrep WHERE (Contr"& _ "ol_ID = @Control_ID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Ionics_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Ionics_PN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Epson_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Epson_PN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Supplier_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Supplier_PN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Rack", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Rack", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Com_Type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Com_Type", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModelCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModelCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Control_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Control_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Ionics_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Ionics_PN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Epson_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Epson_PN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Supplier_PN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Supplier_PN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Rack", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Rack", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Com_Type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Com_Type", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Control_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "Control_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Control_ID, Ionics_PN, Epson_PN, Supplier_PN, Description, Rack, Com_Type,"& _ " ModelCode FROM dbo.PartsPrep" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.PartsPrepDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.PartsPrepDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.PartsPrepDataTable = New EpsonDataSet1.PartsPrepDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.PartsPrepDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "PartsPrep") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_Control_ID As Integer, ByVal Original_Ionics_PN As String, ByVal Original_Epson_PN As String, ByVal Original_Supplier_PN As String, ByVal Original_Rack As String, ByVal Original_Com_Type As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_Control_ID,Integer) If (Original_Ionics_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Ionics_PN") Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Ionics_PN,String) End If If (Original_Epson_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Epson_PN") Else Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Epson_PN,String) End If If (Original_Supplier_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Supplier_PN") Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_Supplier_PN,String) End If If (Original_Rack Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Rack") Else Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_Rack,String) End If If (Original_Com_Type Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Com_Type") Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_Com_Type,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal Ionics_PN As String, ByVal Epson_PN As String, ByVal Supplier_PN As String, ByVal Description As String, ByVal Rack As String, ByVal Com_Type As String, ByVal ModelCode As String) As Integer If (Ionics_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Ionics_PN") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Ionics_PN,String) End If If (Epson_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Epson_PN") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(Epson_PN,String) End If If (Supplier_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Supplier_PN") Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(Supplier_PN,String) End If If (Description Is Nothing) Then Throw New Global.System.ArgumentNullException("Description") Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(Description,String) End If If (Rack Is Nothing) Then Throw New Global.System.ArgumentNullException("Rack") Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(Rack,String) End If If (Com_Type Is Nothing) Then Throw New Global.System.ArgumentNullException("Com_Type") Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(Com_Type,String) End If If (ModelCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(ModelCode,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal Ionics_PN As String, ByVal Epson_PN As String, ByVal Supplier_PN As String, ByVal Description As String, ByVal Rack As String, ByVal Com_Type As String, ByVal ModelCode As String, ByVal Original_Control_ID As Integer, ByVal Original_Ionics_PN As String, ByVal Original_Epson_PN As String, ByVal Original_Supplier_PN As String, ByVal Original_Rack As String, ByVal Original_Com_Type As String, ByVal Control_ID As Integer) As Integer If (Ionics_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Ionics_PN") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(Ionics_PN,String) End If If (Epson_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Epson_PN") Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Epson_PN,String) End If If (Supplier_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Supplier_PN") Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Supplier_PN,String) End If If (Description Is Nothing) Then Throw New Global.System.ArgumentNullException("Description") Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Description,String) End If If (Rack Is Nothing) Then Throw New Global.System.ArgumentNullException("Rack") Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Rack,String) End If If (Com_Type Is Nothing) Then Throw New Global.System.ArgumentNullException("Com_Type") Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Com_Type,String) End If If (ModelCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(ModelCode,String) End If Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Control_ID,Integer) If (Original_Ionics_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Ionics_PN") Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_Ionics_PN,String) End If If (Original_Epson_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Epson_PN") Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_Epson_PN,String) End If If (Original_Supplier_PN Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Supplier_PN") Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_Supplier_PN,String) End If If (Original_Rack Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Rack") Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_Rack,String) End If If (Original_Com_Type Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_Com_Type") Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_Com_Type,String) End If Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Control_ID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal Ionics_PN As String, ByVal Epson_PN As String, ByVal Supplier_PN As String, ByVal Description As String, ByVal Rack As String, ByVal Com_Type As String, ByVal ModelCode As String, ByVal Original_Control_ID As Integer, ByVal Original_Ionics_PN As String, ByVal Original_Epson_PN As String, ByVal Original_Supplier_PN As String, ByVal Original_Rack As String, ByVal Original_Com_Type As String) As Integer Return Me.Update(Ionics_PN, Epson_PN, Supplier_PN, Description, Rack, Com_Type, ModelCode, Original_Control_ID, Original_Ionics_PN, Original_Epson_PN, Original_Supplier_PN, Original_Rack, Original_Com_Type, Original_Control_ID) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class PartsRecordsTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "PartsRecords" tableMapping.ColumnMappings.Add("SerialNum", "SerialNum") tableMapping.ColumnMappings.Add("IonicsPN", "IonicsPN") tableMapping.ColumnMappings.Add("EpsonPN", "EpsonPN") tableMapping.ColumnMappings.Add("SupplierPN", "SupplierPN") tableMapping.ColumnMappings.Add("Description", "Description") tableMapping.ColumnMappings.Add("LotNO", "LotNO") tableMapping.ColumnMappings.Add("Rack", "Rack") tableMapping.ColumnMappings.Add("Qty", "Qty") tableMapping.ColumnMappings.Add("Status", "Status") tableMapping.ColumnMappings.Add("EOH", "EOH") tableMapping.ColumnMappings.Add("SPQ", "SPQ") tableMapping.ColumnMappings.Add("MFGDate", "MFGDate") tableMapping.ColumnMappings.Add("RCVDate", "RCVDate") tableMapping.ColumnMappings.Add("PrintedDate", "PrintedDate") tableMapping.ColumnMappings.Add("PrintedBy", "PrintedBy") tableMapping.ColumnMappings.Add("Returned", "Returned") tableMapping.ColumnMappings.Add("ControlID", "ControlID") tableMapping.ColumnMappings.Add("Remarks", "Remarks") tableMapping.ColumnMappings.Add("ModelCode", "ModelCode") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[PartsRecords] ([SerialNum], [IonicsPN], [EpsonPN], [SupplierPN"& _ "], [Description], [LotNO], [Rack], [Qty], [Status], [EOH], [SPQ], [MFGDate], [RC"& _ "VDate], [PrintedDate], [PrintedBy], [Returned], [Remarks], [ModelCode]) VALUES ("& _ "@SerialNum, @IonicsPN, @EpsonPN, @SupplierPN, @Description, @LotNO, @Rack, @Qty,"& _ " @Status, @EOH, @SPQ, @MFGDate, @RCVDate, @PrintedDate, @PrintedBy, @Returned, @"& _ "Remarks, @ModelCode)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SerialNum", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SerialNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IonicsPN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "IonicsPN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EpsonPN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EpsonPN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SupplierPN", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SupplierPN", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LotNO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LotNO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Rack", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Rack", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Qty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Qty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EOH", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EOH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SPQ", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SPQ", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@MFGDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "MFGDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RCVDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "RCVDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PrintedDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PrintedDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PrintedBy", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PrintedBy", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Returned", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Returned", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Remarks", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModelCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModelCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT SerialNum, IonicsPN, EpsonPN, SupplierPN, Description, LotNO, Rack, Qty, S"& _ "tatus, EOH, SPQ, MFGDate, RCVDate, PrintedDate, PrintedBy, Returned, ControlID, "& _ "Remarks, ModelCode FROM dbo.PartsRecords" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.PartsRecordsDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.PartsRecordsDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.PartsRecordsDataTable = New EpsonDataSet1.PartsRecordsDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.PartsRecordsDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "PartsRecords") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal SerialNum As String, _ ByVal IonicsPN As String, _ ByVal EpsonPN As String, _ ByVal SupplierPN As String, _ ByVal Description As String, _ ByVal LotNO As String, _ ByVal Rack As String, _ ByVal Qty As Integer, _ ByVal Status As String, _ ByVal EOH As Global.System.Nullable(Of Integer), _ ByVal SPQ As Global.System.Nullable(Of Integer), _ ByVal MFGDate As Date, _ ByVal RCVDate As Date, _ ByVal PrintedDate As Date, _ ByVal PrintedBy As String, _ ByVal Returned As Integer, _ ByVal Remarks As String, _ ByVal ModelCode As String) As Integer If (SerialNum Is Nothing) Then Throw New Global.System.ArgumentNullException("SerialNum") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(SerialNum,String) End If If (IonicsPN Is Nothing) Then Throw New Global.System.ArgumentNullException("IonicsPN") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(IonicsPN,String) End If If (EpsonPN Is Nothing) Then Throw New Global.System.ArgumentNullException("EpsonPN") Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(EpsonPN,String) End If If (SupplierPN Is Nothing) Then Throw New Global.System.ArgumentNullException("SupplierPN") Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(SupplierPN,String) End If If (Description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(Description,String) End If If (LotNO Is Nothing) Then Throw New Global.System.ArgumentNullException("LotNO") Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(LotNO,String) End If If (Rack Is Nothing) Then Throw New Global.System.ArgumentNullException("Rack") Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(Rack,String) End If Me.Adapter.InsertCommand.Parameters(7).Value = CType(Qty,Integer) If (Status Is Nothing) Then Throw New Global.System.ArgumentNullException("Status") Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(Status,String) End If If (EOH.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(EOH.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (SPQ.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(SPQ.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If Me.Adapter.InsertCommand.Parameters(11).Value = CType(MFGDate,Date) Me.Adapter.InsertCommand.Parameters(12).Value = CType(RCVDate,Date) Me.Adapter.InsertCommand.Parameters(13).Value = CType(PrintedDate,Date) If (PrintedBy Is Nothing) Then Throw New Global.System.ArgumentNullException("PrintedBy") Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(PrintedBy,String) End If Me.Adapter.InsertCommand.Parameters(15).Value = CType(Returned,Integer) If (Remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(Remarks,String) End If If (ModelCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(17).Value = CType(ModelCode,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class partsStationTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "partsStation" tableMapping.ColumnMappings.Add("station_id", "station_id") tableMapping.ColumnMappings.Add("station_code", "station_code") tableMapping.ColumnMappings.Add("supplier_id", "supplier_id") tableMapping.ColumnMappings.Add("lastupdated", "lastupdated") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[partsStation] ([station_code], [supplier_id], [lastupdated], ["& _ "lastupdatedby]) VALUES (@station_code, @supplier_id, @lastupdated, @lastupdatedb"& _ "y)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station_code", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station_code", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@supplier_id", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "supplier_id", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT station_id, station_code, supplier_id, lastupdated, lastupdatedby FROM dbo"& _ ".partsStation" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.partsStationDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.partsStationDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.partsStationDataTable = New EpsonDataSet1.partsStationDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.partsStationDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "partsStation") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal station_code As String, ByVal supplier_id As Global.System.Nullable(Of Integer), ByVal lastupdated As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (station_code Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(station_code,String) End If If (supplier_id.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(supplier_id.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (lastupdated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(lastupdated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class partsSupplierTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "partsSupplier" tableMapping.ColumnMappings.Add("supplier_id", "supplier_id") tableMapping.ColumnMappings.Add("supplier_name", "supplier_name") tableMapping.ColumnMappings.Add("lastupdated", "lastupdated") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[partsSupplier] ([supplier_name], [lastupdated], [lastupdatedby"& _ "]) VALUES (@supplier_name, @lastupdated, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@supplier_name", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "supplier_name", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT supplier_id, supplier_name, lastupdated, lastupdatedby FROM dbo.partsSuppl"& _ "ier" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.partsSupplierDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.partsSupplierDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.partsSupplierDataTable = New EpsonDataSet1.partsSupplierDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.partsSupplierDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "partsSupplier") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal supplier_name As String, ByVal lastupdated As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (supplier_name Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(supplier_name,String) End If If (lastupdated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(lastupdated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class po_detailTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "po_detail" tableMapping.ColumnMappings.Add("poNumber", "poNumber") tableMapping.ColumnMappings.Add("soNumber", "soNumber") tableMapping.ColumnMappings.Add("poDate", "poDate") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("custPoLine", "custPoLine") tableMapping.ColumnMappings.Add("soline", "soline") tableMapping.ColumnMappings.Add("alvsoline", "alvsoline") tableMapping.ColumnMappings.Add("duedate", "duedate") tableMapping.ColumnMappings.Add("custpartnumber", "custpartnumber") tableMapping.ColumnMappings.Add("parentpartnumber", "parentpartnumber") tableMapping.ColumnMappings.Add("childpartnumber", "childpartnumber") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("custpart", "custpart") tableMapping.ColumnMappings.Add("custpartno", "custpartno") tableMapping.ColumnMappings.Add("custpartdesc", "custpartdesc") tableMapping.ColumnMappings.Add("custgif", "custgif") tableMapping.ColumnMappings.Add("targetDate", "targetDate") tableMapping.ColumnMappings.Add("flag2", "flag2") tableMapping.ColumnMappings.Add("flag3", "flag3") tableMapping.ColumnMappings.Add("remarks", "remarks") tableMapping.ColumnMappings.Add("lineComments", "lineComments") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[po_detail] ([poNumber], [soNumber], [poDate], [poLine], [custP"& _ "oLine], [soline], [alvsoline], [duedate], [custpartnumber], [parentpartnumber], "& _ "[childpartnumber], [quantity], [custpart], [custpartno], [custpartdesc], [custgi"& _ "f], [targetDate], [flag2], [flag3], [remarks], [lineComments]) VALUES (@poNumber"& _ ", @soNumber, @poDate, @poLine, @custPoLine, @soline, @alvsoline, @duedate, @cust"& _ "partnumber, @parentpartnumber, @childpartnumber, @quantity, @custpart, @custpart"& _ "no, @custpartdesc, @custgif, @targetDate, @flag2, @flag3, @remarks, @lineComment"& _ "s)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@soNumber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "soNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custPoLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "custPoLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@soline", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "soline", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@alvsoline", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "alvsoline", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@duedate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "duedate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custpartnumber", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custpartnumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@parentpartnumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "parentpartnumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@childpartnumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "childpartnumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 11, 3, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custpart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custpart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custpartno", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custpartno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custpartdesc", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custpartdesc", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custgif", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custgif", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@targetDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "targetDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@flag2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flag2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@flag3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "flag3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@remarks", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineComments", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineComments", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT poNumber, soNumber, poDate, poLine, custPoLine, soline, alvsoline, duedate"& _ ", custpartnumber, parentpartnumber, childpartnumber, quantity, custpart, custpar"& _ "tno, custpartdesc, custgif, targetDate, flag2, flag3, remarks, lineComments FROM"& _ " dbo.po_detail" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.po_detailDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.po_detailDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.po_detailDataTable = New EpsonDataSet1.po_detailDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.po_detailDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "po_detail") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal poNumber As String, _ ByVal soNumber As String, _ ByVal poDate As Global.System.Nullable(Of Date), _ ByVal poLine As Global.System.Nullable(Of Decimal), _ ByVal custPoLine As Global.System.Nullable(Of Decimal), _ ByVal soline As String, _ ByVal alvsoline As Global.System.Nullable(Of Decimal), _ ByVal duedate As Global.System.Nullable(Of Date), _ ByVal custpartnumber As String, _ ByVal parentpartnumber As String, _ ByVal childpartnumber As String, _ ByVal quantity As Global.System.Nullable(Of Decimal), _ ByVal custpart As String, _ ByVal custpartno As String, _ ByVal custpartdesc As String, _ ByVal custgif As String, _ ByVal targetDate As Global.System.Nullable(Of Date), _ ByVal flag2 As String, _ ByVal flag3 As String, _ ByVal remarks As String, _ ByVal lineComments As String) As Integer If (poNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(poNumber,String) End If If (soNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(soNumber,String) End If If (poDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(poDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (poLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(poLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (custPoLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(custPoLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (soline Is Nothing) Then Throw New Global.System.ArgumentNullException("soline") Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(soline,String) End If If (alvsoline.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(alvsoline.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (duedate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(duedate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (custpartnumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(custpartnumber,String) End If If (parentpartnumber Is Nothing) Then Throw New Global.System.ArgumentNullException("parentpartnumber") Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(parentpartnumber,String) End If If (childpartnumber Is Nothing) Then Throw New Global.System.ArgumentNullException("childpartnumber") Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(childpartnumber,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(11).Value = CType(quantity.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (custpart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(custpart,String) End If If (custpartno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(custpartno,String) End If If (custpartdesc Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(custpartdesc,String) End If If (custgif Is Nothing) Then Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(15).Value = CType(custgif,String) End If If (targetDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(16).Value = CType(targetDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value End If If (flag2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(17).Value = CType(flag2,String) End If If (flag3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(flag3,String) End If If (remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(19).Value = CType(remarks,String) End If If (lineComments Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(lineComments,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class po_detail_backupTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "po_detail_backup" tableMapping.ColumnMappings.Add("Company", "Company") tableMapping.ColumnMappings.Add("CodeType", "CodeType") tableMapping.ColumnMappings.Add("TypHD", "TypHD") tableMapping.ColumnMappings.Add("ModeHD", "ModeHD") tableMapping.ColumnMappings.Add("PONUmber", "PONUmber") tableMapping.ColumnMappings.Add("SONumber", "SONumber") tableMapping.ColumnMappings.Add("PODate", "PODate") tableMapping.ColumnMappings.Add("POLine", "POLine") tableMapping.ColumnMappings.Add("CustPOLine", "CustPOLine") tableMapping.ColumnMappings.Add("SOLine", "SOLine") tableMapping.ColumnMappings.Add("DueDate", "DueDate") tableMapping.ColumnMappings.Add("CustPartNumber", "CustPartNumber") tableMapping.ColumnMappings.Add("ParentPartNumber", "ParentPartNumber") tableMapping.ColumnMappings.Add("ChildPartNumber", "ChildPartNumber") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("ParentPrice", "ParentPrice") tableMapping.ColumnMappings.Add("s21Price", "s21Price") tableMapping.ColumnMappings.Add("UnitofMeasure", "UnitofMeasure") tableMapping.ColumnMappings.Add("TargetDate", "TargetDate") tableMapping.ColumnMappings.Add("CustPart", "CustPart") tableMapping.ColumnMappings.Add("CustPartDesc", "CustPartDesc") tableMapping.ColumnMappings.Add("CustGif", "CustGif") tableMapping.ColumnMappings.Add("Flag", "Flag") tableMapping.ColumnMappings.Add("Flag1", "Flag1") tableMapping.ColumnMappings.Add("Flag2", "Flag2") tableMapping.ColumnMappings.Add("Flag3", "Flag3") tableMapping.ColumnMappings.Add("Remarks", "Remarks") tableMapping.ColumnMappings.Add("Field1", "Field1") tableMapping.ColumnMappings.Add("Field2", "Field2") tableMapping.ColumnMappings.Add("Field3", "Field3") tableMapping.ColumnMappings.Add("LineComments", "LineComments") tableMapping.ColumnMappings.Add("DateCreated", "DateCreated") tableMapping.ColumnMappings.Add("TimeCreated", "TimeCreated") tableMapping.ColumnMappings.Add("UserID", "UserID") tableMapping.ColumnMappings.Add("DateLastChanged", "DateLastChanged") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[po_detail_backup] ([Company], [CodeType], [TypHD], [ModeHD], ["& _ "PONUmber], [SONumber], [PODate], [POLine], [CustPOLine], [SOLine], [DueDate], [C"& _ "ustPartNumber], [ParentPartNumber], [ChildPartNumber], [quantity], [ParentPrice]"& _ ", [s21Price], [UnitofMeasure], [TargetDate], [CustPart], [CustPartDesc], [CustGi"& _ "f], [Flag], [Flag1], [Flag2], [Flag3], [Remarks], [Field1], [Field2], [Field3], "& _ "[LineComments], [DateCreated], [TimeCreated], [UserID], [DateLastChanged]) VALUE"& _ "S (@Company, @CodeType, @TypHD, @ModeHD, @PONUmber, @SONumber, @PODate, @POLine,"& _ " @CustPOLine, @SOLine, @DueDate, @CustPartNumber, @ParentPartNumber, @ChildPartN"& _ "umber, @quantity, @ParentPrice, @s21Price, @UnitofMeasure, @TargetDate, @CustPar"& _ "t, @CustPartDesc, @CustGif, @Flag, @Flag1, @Flag2, @Flag3, @Remarks, @Field1, @F"& _ "ield2, @Field3, @LineComments, @DateCreated, @TimeCreated, @UserID, @DateLastCha"& _ "nged)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Company", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Company", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CodeType", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CodeType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TypHD", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TypHD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModeHD", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModeHD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PONUmber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PONUmber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SONumber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SONumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PODate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PODate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@POLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "POLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPOLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "CustPOLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SOLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SOLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DueDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DueDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPartNumber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPartNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ParentPartNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ParentPartNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ChildPartNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ChildPartNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 11, 3, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ParentPrice", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ParentPrice", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@s21Price", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "s21Price", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UnitofMeasure", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UnitofMeasure", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TargetDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TargetDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPart", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPartDesc", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPartDesc", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustGif", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustGif", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Remarks", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Field1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Field1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Field2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Field2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Field3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Field3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LineComments", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LineComments", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DateCreated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DateCreated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TimeCreated", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TimeCreated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UserID", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UserID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DateLastChanged", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DateLastChanged", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Company, CodeType, TypHD, ModeHD, PONUmber, SONumber, PODate, POLine, Cust"& _ "POLine, SOLine, DueDate, CustPartNumber, ParentPartNumber, ChildPartNumber, quan"& _ "tity, ParentPrice, s21Price, UnitofMeasure, TargetDate, CustPart, CustPartDesc, "& _ "CustGif, Flag, Flag1, Flag2, Flag3, Remarks, Field1, Field2, Field3, LineComment"& _ "s, DateCreated, TimeCreated, UserID, DateLastChanged FROM dbo.po_detail_backup" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.po_detail_backupDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.po_detail_backupDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.po_detail_backupDataTable = New EpsonDataSet1.po_detail_backupDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.po_detail_backupDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "po_detail_backup") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal Company As String, _ ByVal CodeType As String, _ ByVal TypHD As String, _ ByVal ModeHD As String, _ ByVal PONUmber As String, _ ByVal SONumber As String, _ ByVal PODate As Global.System.Nullable(Of Date), _ ByVal POLine As Global.System.Nullable(Of Decimal), _ ByVal CustPOLine As Global.System.Nullable(Of Decimal), _ ByVal SOLine As String, _ ByVal DueDate As Global.System.Nullable(Of Date), _ ByVal CustPartNumber As String, _ ByVal ParentPartNumber As String, _ ByVal ChildPartNumber As String, _ ByVal quantity As Global.System.Nullable(Of Decimal), _ ByVal ParentPrice As Integer, _ ByVal s21Price As Integer, _ ByVal UnitofMeasure As String, _ ByVal TargetDate As Global.System.Nullable(Of Date), _ ByVal CustPart As String, _ ByVal CustPartDesc As String, _ ByVal CustGif As String, _ ByVal Flag As String, _ ByVal Flag1 As String, _ ByVal Flag2 As String, _ ByVal Flag3 As String, _ ByVal Remarks As String, _ ByVal Field1 As String, _ ByVal Field2 As String, _ ByVal Field3 As String, _ ByVal LineComments As String, _ ByVal DateCreated As Global.System.Nullable(Of Date), _ ByVal TimeCreated As String, _ ByVal UserID As String, _ ByVal DateLastChanged As String) As Integer If (Company Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Company,String) End If If (CodeType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(CodeType,String) End If If (TypHD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(TypHD,String) End If If (ModeHD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(ModeHD,String) End If If (PONUmber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(PONUmber,String) End If If (SONumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(SONumber,String) End If If (PODate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(PODate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (POLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(POLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (CustPOLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(CustPOLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (SOLine Is Nothing) Then Throw New Global.System.ArgumentNullException("SOLine") Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(SOLine,String) End If If (DueDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(DueDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (CustPartNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(CustPartNumber,String) End If If (ParentPartNumber Is Nothing) Then Throw New Global.System.ArgumentNullException("ParentPartNumber") Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(ParentPartNumber,String) End If If (ChildPartNumber Is Nothing) Then Throw New Global.System.ArgumentNullException("ChildPartNumber") Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(ChildPartNumber,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(14).Value = CType(quantity.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value End If Me.Adapter.InsertCommand.Parameters(15).Value = CType(ParentPrice,Integer) Me.Adapter.InsertCommand.Parameters(16).Value = CType(s21Price,Integer) If (UnitofMeasure Is Nothing) Then Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(17).Value = CType(UnitofMeasure,String) End If If (TargetDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(18).Value = CType(TargetDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (CustPart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(19).Value = CType(CustPart,String) End If If (CustPartDesc Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(CustPartDesc,String) End If If (CustGif Is Nothing) Then Me.Adapter.InsertCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(21).Value = CType(CustGif,String) End If If (Flag Is Nothing) Then Me.Adapter.InsertCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(22).Value = CType(Flag,String) End If If (Flag1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(23).Value = CType(Flag1,String) End If If (Flag2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(24).Value = CType(Flag2,String) End If If (Flag3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(25).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(25).Value = CType(Flag3,String) End If If (Remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(26).Value = CType(Remarks,String) End If If (Field1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(27).Value = CType(Field1,String) End If If (Field2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(28).Value = CType(Field2,String) End If If (Field3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(29).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(29).Value = CType(Field3,String) End If If (LineComments Is Nothing) Then Me.Adapter.InsertCommand.Parameters(30).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(30).Value = CType(LineComments,String) End If If (DateCreated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(31).Value = CType(DateCreated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(31).Value = Global.System.DBNull.Value End If If (TimeCreated Is Nothing) Then Me.Adapter.InsertCommand.Parameters(32).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(32).Value = CType(TimeCreated,String) End If If (UserID Is Nothing) Then Me.Adapter.InsertCommand.Parameters(33).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(33).Value = CType(UserID,String) End If If (DateLastChanged Is Nothing) Then Me.Adapter.InsertCommand.Parameters(34).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(34).Value = CType(DateLastChanged,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class po_detail_tempTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "po_detail_temp" tableMapping.ColumnMappings.Add("Company", "Company") tableMapping.ColumnMappings.Add("CodeType", "CodeType") tableMapping.ColumnMappings.Add("TypHD", "TypHD") tableMapping.ColumnMappings.Add("ModeHD", "ModeHD") tableMapping.ColumnMappings.Add("PONumber", "PONumber") tableMapping.ColumnMappings.Add("SONumber", "SONumber") tableMapping.ColumnMappings.Add("PODate", "PODate") tableMapping.ColumnMappings.Add("POLine", "POLine") tableMapping.ColumnMappings.Add("CustPOLine", "CustPOLine") tableMapping.ColumnMappings.Add("SOLine", "SOLine") tableMapping.ColumnMappings.Add("AlvSOLine", "AlvSOLine") tableMapping.ColumnMappings.Add("DueDate", "DueDate") tableMapping.ColumnMappings.Add("CustPartNumber", "CustPartNumber") tableMapping.ColumnMappings.Add("ParentPartNumber", "ParentPartNumber") tableMapping.ColumnMappings.Add("ChildPartNumber", "ChildPartNumber") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("ParentPrice", "ParentPrice") tableMapping.ColumnMappings.Add("s21Price", "s21Price") tableMapping.ColumnMappings.Add("UnitofMeasure", "UnitofMeasure") tableMapping.ColumnMappings.Add("TargetDate", "TargetDate") tableMapping.ColumnMappings.Add("CustPart", "CustPart") tableMapping.ColumnMappings.Add("CustPartNo", "CustPartNo") tableMapping.ColumnMappings.Add("CustPartDesc", "CustPartDesc") tableMapping.ColumnMappings.Add("CustGif", "CustGif") tableMapping.ColumnMappings.Add("Flag", "Flag") tableMapping.ColumnMappings.Add("Flag1", "Flag1") tableMapping.ColumnMappings.Add("Flag2", "Flag2") tableMapping.ColumnMappings.Add("Flag3", "Flag3") tableMapping.ColumnMappings.Add("Remarks", "Remarks") tableMapping.ColumnMappings.Add("Field1", "Field1") tableMapping.ColumnMappings.Add("Field2", "Field2") tableMapping.ColumnMappings.Add("Field3", "Field3") tableMapping.ColumnMappings.Add("LineComments", "LineComments") tableMapping.ColumnMappings.Add("DateCreated", "DateCreated") tableMapping.ColumnMappings.Add("TimeCreated", "TimeCreated") tableMapping.ColumnMappings.Add("UserID", "UserID") tableMapping.ColumnMappings.Add("DateLastChanged", "DateLastChanged") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[po_detail_temp] ([Company], [CodeType], [TypHD], [ModeHD], [PO"& _ "Number], [SONumber], [PODate], [POLine], [CustPOLine], [SOLine], [AlvSOLine], [D"& _ "ueDate], [CustPartNumber], [ParentPartNumber], [ChildPartNumber], [quantity], [P"& _ "arentPrice], [s21Price], [UnitofMeasure], [TargetDate], [CustPart], [CustPartNo]"& _ ", [CustPartDesc], [CustGif], [Flag], [Flag1], [Flag2], [Flag3], [Remarks], [Fiel"& _ "d1], [Field2], [Field3], [LineComments], [DateCreated], [TimeCreated], [UserID],"& _ " [DateLastChanged]) VALUES (@Company, @CodeType, @TypHD, @ModeHD, @PONumber, @SO"& _ "Number, @PODate, @POLine, @CustPOLine, @SOLine, @AlvSOLine, @DueDate, @CustPartN"& _ "umber, @ParentPartNumber, @ChildPartNumber, @quantity, @ParentPrice, @s21Price, "& _ "@UnitofMeasure, @TargetDate, @CustPart, @CustPartNo, @CustPartDesc, @CustGif, @F"& _ "lag, @Flag1, @Flag2, @Flag3, @Remarks, @Field1, @Field2, @Field3, @LineComments,"& _ " @DateCreated, @TimeCreated, @UserID, @DateLastChanged)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Company", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Company", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CodeType", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CodeType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TypHD", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TypHD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModeHD", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModeHD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PONumber", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PONumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SONumber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SONumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PODate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PODate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@POLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "POLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPOLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "CustPOLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SOLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SOLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AlvSOLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "AlvSOLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DueDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DueDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPartNumber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPartNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ParentPartNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ParentPartNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ChildPartNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ChildPartNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 11, 3, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ParentPrice", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ParentPrice", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@s21Price", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "s21Price", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UnitofMeasure", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UnitofMeasure", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TargetDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TargetDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPartNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPartNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPartDesc", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPartDesc", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustGif", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustGif", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Remarks", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Field1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Field1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Field2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Field2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Field3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Field3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LineComments", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LineComments", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DateCreated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DateCreated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TimeCreated", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TimeCreated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UserID", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UserID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DateLastChanged", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DateLastChanged", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Company, CodeType, TypHD, ModeHD, PONumber, SONumber, PODate, POLine, Cust"& _ "POLine, SOLine, AlvSOLine, DueDate, CustPartNumber, ParentPartNumber, ChildPartN"& _ "umber, quantity, ParentPrice, s21Price, UnitofMeasure, TargetDate, CustPart, Cus"& _ "tPartNo, CustPartDesc, CustGif, Flag, Flag1, Flag2, Flag3, Remarks, Field1, Fiel"& _ "d2, Field3, LineComments, DateCreated, TimeCreated, UserID, DateLastChanged FROM"& _ " dbo.po_detail_temp" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.po_detail_tempDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.po_detail_tempDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.po_detail_tempDataTable = New EpsonDataSet1.po_detail_tempDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.po_detail_tempDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "po_detail_temp") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal Company As String, _ ByVal CodeType As String, _ ByVal TypHD As String, _ ByVal ModeHD As String, _ ByVal PONumber As String, _ ByVal SONumber As String, _ ByVal PODate As Global.System.Nullable(Of Date), _ ByVal POLine As Global.System.Nullable(Of Decimal), _ ByVal CustPOLine As Global.System.Nullable(Of Decimal), _ ByVal SOLine As String, _ ByVal AlvSOLine As Global.System.Nullable(Of Decimal), _ ByVal DueDate As Global.System.Nullable(Of Date), _ ByVal CustPartNumber As String, _ ByVal ParentPartNumber As String, _ ByVal ChildPartNumber As String, _ ByVal quantity As Global.System.Nullable(Of Decimal), _ ByVal ParentPrice As Integer, _ ByVal s21Price As Integer, _ ByVal UnitofMeasure As String, _ ByVal TargetDate As Global.System.Nullable(Of Date), _ ByVal CustPart As String, _ ByVal CustPartNo As String, _ ByVal CustPartDesc As String, _ ByVal CustGif As String, _ ByVal Flag As String, _ ByVal Flag1 As String, _ ByVal Flag2 As String, _ ByVal Flag3 As String, _ ByVal Remarks As String, _ ByVal Field1 As String, _ ByVal Field2 As String, _ ByVal Field3 As String, _ ByVal LineComments As String, _ ByVal DateCreated As Global.System.Nullable(Of Date), _ ByVal TimeCreated As String, _ ByVal UserID As String, _ ByVal DateLastChanged As String) As Integer If (Company Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Company,String) End If If (CodeType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(CodeType,String) End If If (TypHD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(TypHD,String) End If If (ModeHD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(ModeHD,String) End If If (PONumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(PONumber,String) End If If (SONumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(SONumber,String) End If If (PODate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(PODate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (POLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(POLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (CustPOLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(CustPOLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (SOLine Is Nothing) Then Throw New Global.System.ArgumentNullException("SOLine") Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(SOLine,String) End If If (AlvSOLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(AlvSOLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (DueDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(11).Value = CType(DueDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (CustPartNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(CustPartNumber,String) End If If (ParentPartNumber Is Nothing) Then Throw New Global.System.ArgumentNullException("ParentPartNumber") Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(ParentPartNumber,String) End If If (ChildPartNumber Is Nothing) Then Throw New Global.System.ArgumentNullException("ChildPartNumber") Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(ChildPartNumber,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(quantity.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If Me.Adapter.InsertCommand.Parameters(16).Value = CType(ParentPrice,Integer) Me.Adapter.InsertCommand.Parameters(17).Value = CType(s21Price,Integer) If (UnitofMeasure Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(UnitofMeasure,String) End If If (TargetDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(19).Value = CType(TargetDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (CustPart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(CustPart,String) End If If (CustPartNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(21).Value = CType(CustPartNo,String) End If If (CustPartDesc Is Nothing) Then Me.Adapter.InsertCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(22).Value = CType(CustPartDesc,String) End If If (CustGif Is Nothing) Then Me.Adapter.InsertCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(23).Value = CType(CustGif,String) End If If (Flag Is Nothing) Then Me.Adapter.InsertCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(24).Value = CType(Flag,String) End If If (Flag1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(25).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(25).Value = CType(Flag1,String) End If If (Flag2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(26).Value = CType(Flag2,String) End If If (Flag3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(27).Value = CType(Flag3,String) End If If (Remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(28).Value = CType(Remarks,String) End If If (Field1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(29).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(29).Value = CType(Field1,String) End If If (Field2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(30).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(30).Value = CType(Field2,String) End If If (Field3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(31).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(31).Value = CType(Field3,String) End If If (LineComments Is Nothing) Then Me.Adapter.InsertCommand.Parameters(32).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(32).Value = CType(LineComments,String) End If If (DateCreated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(33).Value = CType(DateCreated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(33).Value = Global.System.DBNull.Value End If If (TimeCreated Is Nothing) Then Me.Adapter.InsertCommand.Parameters(34).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(34).Value = CType(TimeCreated,String) End If If (UserID Is Nothing) Then Me.Adapter.InsertCommand.Parameters(35).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(35).Value = CType(UserID,String) End If If (DateLastChanged Is Nothing) Then Me.Adapter.InsertCommand.Parameters(36).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(36).Value = CType(DateLastChanged,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class po_headerTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "po_header" tableMapping.ColumnMappings.Add("Company", "Company") tableMapping.ColumnMappings.Add("CodeType", "CodeType") tableMapping.ColumnMappings.Add("TypeHD", "TypeHD") tableMapping.ColumnMappings.Add("ModeHD", "ModeHD") tableMapping.ColumnMappings.Add("Prefix", "Prefix") tableMapping.ColumnMappings.Add("GenDate", "GenDate") tableMapping.ColumnMappings.Add("GenHour", "GenHour") tableMapping.ColumnMappings.Add("PONumber", "PONumber") tableMapping.ColumnMappings.Add("PONumberPrev", "PONumberPrev") tableMapping.ColumnMappings.Add("SONumber", "SONumber") tableMapping.ColumnMappings.Add("PODate", "PODate") tableMapping.ColumnMappings.Add("Revision", "Revision") tableMapping.ColumnMappings.Add("Status", "Status") tableMapping.ColumnMappings.Add("AlvSO", "AlvSO") tableMapping.ColumnMappings.Add("CustPO", "CustPO") tableMapping.ColumnMappings.Add("ShipVia", "ShipVia") tableMapping.ColumnMappings.Add("ShipTo", "ShipTo") tableMapping.ColumnMappings.Add("SipAdd1", "SipAdd1") tableMapping.ColumnMappings.Add("ShipAdd2", "ShipAdd2") tableMapping.ColumnMappings.Add("ShipAdd3", "ShipAdd3") tableMapping.ColumnMappings.Add("City", "City") tableMapping.ColumnMappings.Add("State", "State") tableMapping.ColumnMappings.Add("PostalCode", "PostalCode") tableMapping.ColumnMappings.Add("CountryCode", "CountryCode") tableMapping.ColumnMappings.Add("ShipToNum", "ShipToNum") tableMapping.ColumnMappings.Add("Flag0", "Flag0") tableMapping.ColumnMappings.Add("Flag1", "Flag1") tableMapping.ColumnMappings.Add("Flag2", "Flag2") tableMapping.ColumnMappings.Add("Flag3", "Flag3") tableMapping.ColumnMappings.Add("Remark", "Remark") tableMapping.ColumnMappings.Add("Fild1", "Fild1") tableMapping.ColumnMappings.Add("Fild2", "Fild2") tableMapping.ColumnMappings.Add("Fild3", "Fild3") tableMapping.ColumnMappings.Add("Fild4", "Fild4") tableMapping.ColumnMappings.Add("Fild5", "Fild5") tableMapping.ColumnMappings.Add("Comments", "Comments") tableMapping.ColumnMappings.Add("DateCreated", "DateCreated") tableMapping.ColumnMappings.Add("TimeCreated", "TimeCreated") tableMapping.ColumnMappings.Add("UserID", "UserID") tableMapping.ColumnMappings.Add("DateLastChanged", "DateLastChanged") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[po_header] ([Company], [CodeType], [TypeHD], [ModeHD], [Prefix"& _ "], [GenDate], [GenHour], [PONumber], [PONumberPrev], [SONumber], [PODate], [Revi"& _ "sion], [Status], [AlvSO], [CustPO], [ShipVia], [ShipTo], [SipAdd1], [ShipAdd2], "& _ "[ShipAdd3], [City], [State], [PostalCode], [CountryCode], [ShipToNum], [Flag0], "& _ "[Flag1], [Flag2], [Flag3], [Remark], [Fild1], [Fild2], [Fild3], [Fild4], [Fild5]"& _ ", [Comments], [DateCreated], [TimeCreated], [UserID], [DateLastChanged]) VALUES "& _ "(@Company, @CodeType, @TypeHD, @ModeHD, @Prefix, @GenDate, @GenHour, @PONumber, "& _ "@PONumberPrev, @SONumber, @PODate, @Revision, @Status, @AlvSO, @CustPO, @ShipVia"& _ ", @ShipTo, @SipAdd1, @ShipAdd2, @ShipAdd3, @City, @State, @PostalCode, @CountryC"& _ "ode, @ShipToNum, @Flag0, @Flag1, @Flag2, @Flag3, @Remark, @Fild1, @Fild2, @Fild3"& _ ", @Fild4, @Fild5, @Comments, @DateCreated, @TimeCreated, @UserID, @DateLastChang"& _ "ed)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Company", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Company", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CodeType", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CodeType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TypeHD", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TypeHD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModeHD", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModeHD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Prefix", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Prefix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GenDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GenDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GenHour", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GenHour", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PONumber", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PONumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PONumberPrev", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PONumberPrev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SONumber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SONumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PODate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PODate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Revision", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "Revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Status", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AlvSO", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "AlvSO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPO", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipVia", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipVia", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipTo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipTo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SipAdd1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SipAdd1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipAdd2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipAdd2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipAdd3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipAdd3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@City", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "City", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@State", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "State", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PostalCode", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PostalCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CountryCode", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CountryCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipToNum", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipToNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag0", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag0", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Remark", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Remark", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Fild1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Fild1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Fild2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Fild2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Fild3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Fild3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Fild4", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Fild4", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Fild5", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Fild5", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Comments", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Comments", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DateCreated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DateCreated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TimeCreated", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TimeCreated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UserID", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UserID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DateLastChanged", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DateLastChanged", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Company, CodeType, TypeHD, ModeHD, Prefix, GenDate, GenHour, PONumber, PON"& _ "umberPrev, SONumber, PODate, Revision, Status, AlvSO, CustPO, ShipVia, ShipTo, S"& _ "ipAdd1, ShipAdd2, ShipAdd3, City, State, PostalCode, CountryCode, ShipToNum, Fla"& _ "g0, Flag1, Flag2, Flag3, Remark, Fild1, Fild2, Fild3, Fild4, Fild5, Comments, Da"& _ "teCreated, TimeCreated, UserID, DateLastChanged FROM dbo.po_header" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.po_headerDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.po_headerDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.po_headerDataTable = New EpsonDataSet1.po_headerDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.po_headerDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "po_header") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal Company As String, _ ByVal CodeType As String, _ ByVal TypeHD As String, _ ByVal ModeHD As String, _ ByVal Prefix As String, _ ByVal GenDate As Global.System.Nullable(Of Date), _ ByVal GenHour As Global.System.Nullable(Of Date), _ ByVal PONumber As String, _ ByVal PONumberPrev As String, _ ByVal SONumber As String, _ ByVal PODate As Global.System.Nullable(Of Date), _ ByVal Revision As Global.System.Nullable(Of Decimal), _ ByVal Status As String, _ ByVal AlvSO As String, _ ByVal CustPO As String, _ ByVal ShipVia As String, _ ByVal ShipTo As String, _ ByVal SipAdd1 As String, _ ByVal ShipAdd2 As String, _ ByVal ShipAdd3 As String, _ ByVal City As String, _ ByVal State As String, _ ByVal PostalCode As String, _ ByVal CountryCode As String, _ ByVal ShipToNum As String, _ ByVal Flag0 As String, _ ByVal Flag1 As String, _ ByVal Flag2 As String, _ ByVal Flag3 As String, _ ByVal Remark As String, _ ByVal Fild1 As String, _ ByVal Fild2 As String, _ ByVal Fild3 As String, _ ByVal Fild4 As String, _ ByVal Fild5 As String, _ ByVal Comments As String, _ ByVal DateCreated As Global.System.Nullable(Of Date), _ ByVal TimeCreated As String, _ ByVal UserID As String, _ ByVal DateLastChanged As String) As Integer If (Company Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Company,String) End If If (CodeType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(CodeType,String) End If If (TypeHD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(TypeHD,String) End If If (ModeHD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(ModeHD,String) End If If (Prefix Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(Prefix,String) End If If (GenDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(GenDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (GenHour.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(GenHour.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (PONumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(PONumber,String) End If If (PONumberPrev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(PONumberPrev,String) End If If (SONumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(SONumber,String) End If If (PODate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(PODate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Revision.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(11).Value = CType(Revision.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(Status,String) End If If (AlvSO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(AlvSO,String) End If If (CustPO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(CustPO,String) End If If (ShipVia Is Nothing) Then Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(15).Value = CType(ShipVia,String) End If If (ShipTo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(ShipTo,String) End If If (SipAdd1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(17).Value = CType(SipAdd1,String) End If If (ShipAdd2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(ShipAdd2,String) End If If (ShipAdd3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(19).Value = CType(ShipAdd3,String) End If If (City Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(City,String) End If If (State Is Nothing) Then Me.Adapter.InsertCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(21).Value = CType(State,String) End If If (PostalCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(22).Value = CType(PostalCode,String) End If If (CountryCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(23).Value = CType(CountryCode,String) End If If (ShipToNum Is Nothing) Then Me.Adapter.InsertCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(24).Value = CType(ShipToNum,String) End If If (Flag0 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(25).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(25).Value = CType(Flag0,String) End If If (Flag1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(26).Value = CType(Flag1,String) End If If (Flag2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(27).Value = CType(Flag2,String) End If If (Flag3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(28).Value = CType(Flag3,String) End If If (Remark Is Nothing) Then Me.Adapter.InsertCommand.Parameters(29).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(29).Value = CType(Remark,String) End If If (Fild1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(30).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(30).Value = CType(Fild1,String) End If If (Fild2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(31).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(31).Value = CType(Fild2,String) End If If (Fild3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(32).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(32).Value = CType(Fild3,String) End If If (Fild4 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(33).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(33).Value = CType(Fild4,String) End If If (Fild5 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(34).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(34).Value = CType(Fild5,String) End If If (Comments Is Nothing) Then Me.Adapter.InsertCommand.Parameters(35).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(35).Value = CType(Comments,String) End If If (DateCreated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(36).Value = CType(DateCreated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(36).Value = Global.System.DBNull.Value End If If (TimeCreated Is Nothing) Then Me.Adapter.InsertCommand.Parameters(37).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(37).Value = CType(TimeCreated,String) End If If (UserID Is Nothing) Then Me.Adapter.InsertCommand.Parameters(38).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(38).Value = CType(UserID,String) End If If (DateLastChanged Is Nothing) Then Me.Adapter.InsertCommand.Parameters(39).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(39).Value = CType(DateLastChanged,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class po_header_backupTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "po_header_backup" tableMapping.ColumnMappings.Add("Company", "Company") tableMapping.ColumnMappings.Add("CodeType", "CodeType") tableMapping.ColumnMappings.Add("TypeHD", "TypeHD") tableMapping.ColumnMappings.Add("ModeHD", "ModeHD") tableMapping.ColumnMappings.Add("Prefix", "Prefix") tableMapping.ColumnMappings.Add("GenDate", "GenDate") tableMapping.ColumnMappings.Add("GenHour", "GenHour") tableMapping.ColumnMappings.Add("PONumber", "PONumber") tableMapping.ColumnMappings.Add("SONumber", "SONumber") tableMapping.ColumnMappings.Add("PODate", "PODate") tableMapping.ColumnMappings.Add("Revision", "Revision") tableMapping.ColumnMappings.Add("Status", "Status") tableMapping.ColumnMappings.Add("CustPO", "CustPO") tableMapping.ColumnMappings.Add("ShipVia", "ShipVia") tableMapping.ColumnMappings.Add("ShipTo", "ShipTo") tableMapping.ColumnMappings.Add("SipAdd1", "SipAdd1") tableMapping.ColumnMappings.Add("ShipAdd2", "ShipAdd2") tableMapping.ColumnMappings.Add("ShipAdd3", "ShipAdd3") tableMapping.ColumnMappings.Add("City", "City") tableMapping.ColumnMappings.Add("State", "State") tableMapping.ColumnMappings.Add("PostalCode", "PostalCode") tableMapping.ColumnMappings.Add("CountryCode", "CountryCode") tableMapping.ColumnMappings.Add("Flag0", "Flag0") tableMapping.ColumnMappings.Add("Flag1", "Flag1") tableMapping.ColumnMappings.Add("Flag2", "Flag2") tableMapping.ColumnMappings.Add("Flag3", "Flag3") tableMapping.ColumnMappings.Add("Remark", "Remark") tableMapping.ColumnMappings.Add("Fild1", "Fild1") tableMapping.ColumnMappings.Add("Fild2", "Fild2") tableMapping.ColumnMappings.Add("Fild3", "Fild3") tableMapping.ColumnMappings.Add("Comments", "Comments") tableMapping.ColumnMappings.Add("DateCreated", "DateCreated") tableMapping.ColumnMappings.Add("TimeCreated", "TimeCreated") tableMapping.ColumnMappings.Add("UserID", "UserID") tableMapping.ColumnMappings.Add("DateLastChanged", "DateLastChanged") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[po_header_backup] ([Company], [CodeType], [TypeHD], [ModeHD], "& _ "[Prefix], [GenDate], [GenHour], [PONumber], [SONumber], [PODate], [Revision], [S"& _ "tatus], [CustPO], [ShipVia], [ShipTo], [SipAdd1], [ShipAdd2], [ShipAdd3], [City]"& _ ", [State], [PostalCode], [CountryCode], [Flag0], [Flag1], [Flag2], [Flag3], [Rem"& _ "ark], [Fild1], [Fild2], [Fild3], [Comments], [DateCreated], [TimeCreated], [User"& _ "ID], [DateLastChanged]) VALUES (@Company, @CodeType, @TypeHD, @ModeHD, @Prefix, "& _ "@GenDate, @GenHour, @PONumber, @SONumber, @PODate, @Revision, @Status, @CustPO, "& _ "@ShipVia, @ShipTo, @SipAdd1, @ShipAdd2, @ShipAdd3, @City, @State, @PostalCode, @"& _ "CountryCode, @Flag0, @Flag1, @Flag2, @Flag3, @Remark, @Fild1, @Fild2, @Fild3, @C"& _ "omments, @DateCreated, @TimeCreated, @UserID, @DateLastChanged)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Company", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Company", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CodeType", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CodeType", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TypeHD", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TypeHD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ModeHD", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ModeHD", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Prefix", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Prefix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GenDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GenDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GenHour", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GenHour", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PONumber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PONumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SONumber", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SONumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PODate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PODate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Revision", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "Revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Status", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPO", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipVia", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipVia", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipTo", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipTo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SipAdd1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SipAdd1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipAdd2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipAdd2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ShipAdd3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ShipAdd3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@City", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "City", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@State", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "State", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PostalCode", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PostalCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CountryCode", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CountryCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag0", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag0", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Remark", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Remark", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Fild1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Fild1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Fild2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Fild2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Fild3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Fild3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Comments", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Comments", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DateCreated", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DateCreated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@TimeCreated", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "TimeCreated", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UserID", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UserID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DateLastChanged", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DateLastChanged", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Company, CodeType, TypeHD, ModeHD, Prefix, GenDate, GenHour, PONumber, SON"& _ "umber, PODate, Revision, Status, CustPO, ShipVia, ShipTo, SipAdd1, ShipAdd2, Shi"& _ "pAdd3, City, State, PostalCode, CountryCode, Flag0, Flag1, Flag2, Flag3, Remark,"& _ " Fild1, Fild2, Fild3, Comments, DateCreated, TimeCreated, UserID, DateLastChange"& _ "d FROM dbo.po_header_backup" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.po_header_backupDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.po_header_backupDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.po_header_backupDataTable = New EpsonDataSet1.po_header_backupDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.po_header_backupDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "po_header_backup") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal Company As String, _ ByVal CodeType As String, _ ByVal TypeHD As String, _ ByVal ModeHD As String, _ ByVal Prefix As String, _ ByVal GenDate As Global.System.Nullable(Of Date), _ ByVal GenHour As Global.System.Nullable(Of Date), _ ByVal PONumber As String, _ ByVal SONumber As String, _ ByVal PODate As Global.System.Nullable(Of Date), _ ByVal Revision As Global.System.Nullable(Of Decimal), _ ByVal Status As String, _ ByVal CustPO As String, _ ByVal ShipVia As String, _ ByVal ShipTo As String, _ ByVal SipAdd1 As String, _ ByVal ShipAdd2 As String, _ ByVal ShipAdd3 As String, _ ByVal City As String, _ ByVal State As String, _ ByVal PostalCode As String, _ ByVal CountryCode As String, _ ByVal Flag0 As String, _ ByVal Flag1 As String, _ ByVal Flag2 As String, _ ByVal Flag3 As String, _ ByVal Remark As String, _ ByVal Fild1 As String, _ ByVal Fild2 As String, _ ByVal Fild3 As String, _ ByVal Comments As String, _ ByVal DateCreated As Global.System.Nullable(Of Date), _ ByVal TimeCreated As String, _ ByVal UserID As String, _ ByVal DateLastChanged As String) As Integer If (Company Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Company,String) End If If (CodeType Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(CodeType,String) End If If (TypeHD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(TypeHD,String) End If If (ModeHD Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(ModeHD,String) End If If (Prefix Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(Prefix,String) End If If (GenDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(GenDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (GenHour.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(GenHour.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (PONumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(PONumber,String) End If If (SONumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(SONumber,String) End If If (PODate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(PODate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (Revision.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(Revision.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(Status,String) End If If (CustPO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(CustPO,String) End If If (ShipVia Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(ShipVia,String) End If If (ShipTo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(ShipTo,String) End If If (SipAdd1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(15).Value = CType(SipAdd1,String) End If If (ShipAdd2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(ShipAdd2,String) End If If (ShipAdd3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(17).Value = CType(ShipAdd3,String) End If If (City Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(City,String) End If If (State Is Nothing) Then Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(19).Value = CType(State,String) End If If (PostalCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(PostalCode,String) End If If (CountryCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(21).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(21).Value = CType(CountryCode,String) End If If (Flag0 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(22).Value = CType(Flag0,String) End If If (Flag1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(23).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(23).Value = CType(Flag1,String) End If If (Flag2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(24).Value = CType(Flag2,String) End If If (Flag3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(25).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(25).Value = CType(Flag3,String) End If If (Remark Is Nothing) Then Me.Adapter.InsertCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(26).Value = CType(Remark,String) End If If (Fild1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(27).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(27).Value = CType(Fild1,String) End If If (Fild2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(28).Value = CType(Fild2,String) End If If (Fild3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(29).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(29).Value = CType(Fild3,String) End If If (Comments Is Nothing) Then Me.Adapter.InsertCommand.Parameters(30).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(30).Value = CType(Comments,String) End If If (DateCreated.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(31).Value = CType(DateCreated.Value,Date) Else Me.Adapter.InsertCommand.Parameters(31).Value = Global.System.DBNull.Value End If If (TimeCreated Is Nothing) Then Me.Adapter.InsertCommand.Parameters(32).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(32).Value = CType(TimeCreated,String) End If If (UserID Is Nothing) Then Me.Adapter.InsertCommand.Parameters(33).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(33).Value = CType(UserID,String) End If If (DateLastChanged Is Nothing) Then Me.Adapter.InsertCommand.Parameters(34).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(34).Value = CType(DateLastChanged,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class po_history_detailTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "po_history_detail" tableMapping.ColumnMappings.Add("poNumber", "poNumber") tableMapping.ColumnMappings.Add("revision", "revision") tableMapping.ColumnMappings.Add("chg_type", "chg_type") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("change", "change") tableMapping.ColumnMappings.Add("from_value", "from_value") tableMapping.ColumnMappings.Add("to_value", "to_value") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("content", "content") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[po_history_detail] ([poNumber], [revision], [chg_type], [poLin"& _ "e], [change], [from_value], [to_value], [lastupdate], [content]) VALUES (@poNumb"& _ "er, @revision, @chg_type, @poLine, @change, @from_value, @to_value, @lastupdate,"& _ " @content)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@revision", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "revision", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@chg_type", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "chg_type", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@change", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "change", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@from_value", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "from_value", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@to_value", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "to_value", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@content", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "content", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT poNumber, revision, chg_type, poLine, change, from_value, to_value, lastup"& _ "date, content FROM dbo.po_history_detail" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.po_history_detailDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.po_history_detailDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.po_history_detailDataTable = New EpsonDataSet1.po_history_detailDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.po_history_detailDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "po_history_detail") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal poNumber As String, ByVal revision As String, ByVal chg_type As String, ByVal poLine As String, ByVal change As String, ByVal from_value As String, ByVal to_value As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal content As String) As Integer If (poNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(poNumber,String) End If If (revision Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(revision,String) End If If (chg_type Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(chg_type,String) End If If (poLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(poLine,String) End If If (change Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(change,String) End If If (from_value Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(from_value,String) End If If (to_value Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(to_value,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (content Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(content,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class po_orig_detailTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "po_orig_detail" tableMapping.ColumnMappings.Add("poNumber", "poNumber") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("soLine", "soLine") tableMapping.ColumnMappings.Add("targetDate", "targetDate") tableMapping.ColumnMappings.Add("lineComments", "lineComments") tableMapping.ColumnMappings.Add("custPartNumber", "custPartNumber") tableMapping.ColumnMappings.Add("quantity", "quantity") tableMapping.ColumnMappings.Add("unitPrice", "unitPrice") tableMapping.ColumnMappings.Add("custPartNo", "custPartNo") tableMapping.ColumnMappings.Add("dueDate", "dueDate") tableMapping.ColumnMappings.Add("custPart", "custPart") tableMapping.ColumnMappings.Add("custPartGif", "custPartGif") tableMapping.ColumnMappings.Add("custPartDesc", "custPartDesc") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[po_orig_detail] ([poNumber], [poLine], [soLine], [targetDate],"& _ " [lineComments], [custPartNumber], [quantity], [unitPrice], [custPartNo], [dueDa"& _ "te], [custPart], [custPartGif], [custPartDesc]) VALUES (@poNumber, @poLine, @soL"& _ "ine, @targetDate, @lineComments, @custPartNumber, @quantity, @unitPrice, @custPa"& _ "rtNo, @dueDate, @custPart, @custPartGif, @custPartDesc)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@soLine", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "soLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@targetDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "targetDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineComments", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineComments", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custPartNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custPartNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@quantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "quantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@unitPrice", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "unitPrice", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custPartNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custPartNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dueDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dueDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custPart", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custPart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custPartGif", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custPartGif", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custPartDesc", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custPartDesc", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT poNumber, poLine, soLine, targetDate, lineComments, custPartNumber, quanti"& _ "ty, unitPrice, custPartNo, dueDate, custPart, custPartGif, custPartDesc FROM dbo"& _ ".po_orig_detail" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.po_orig_detailDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.po_orig_detailDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.po_orig_detailDataTable = New EpsonDataSet1.po_orig_detailDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.po_orig_detailDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "po_orig_detail") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal poNumber As String, ByVal poLine As String, ByVal soLine As String, ByVal targetDate As Global.System.Nullable(Of Date), ByVal lineComments As String, ByVal custPartNumber As String, ByVal quantity As Global.System.Nullable(Of Integer), ByVal unitPrice As Global.System.Nullable(Of Integer), ByVal custPartNo As String, ByVal dueDate As Global.System.Nullable(Of Date), ByVal custPart As String, ByVal custPartGif As String, ByVal custPartDesc As String) As Integer If (poNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(poNumber,String) End If If (poLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(poLine,String) End If If (soLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(soLine,String) End If If (targetDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(targetDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (lineComments Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(lineComments,String) End If If (custPartNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(custPartNumber,String) End If If (quantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(quantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (unitPrice.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(7).Value = CType(unitPrice.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value End If If (custPartNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(custPartNo,String) End If If (dueDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(dueDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (custPart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(custPart,String) End If If (custPartGif Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(custPartGif,String) End If If (custPartDesc Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(custPartDesc,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class po_orig_headerTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "po_orig_header" tableMapping.ColumnMappings.Add("poNumber", "poNumber") tableMapping.ColumnMappings.Add("poDate", "poDate") tableMapping.ColumnMappings.Add("poRev", "poRev") tableMapping.ColumnMappings.Add("comments", "comments") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("custPo", "custPo") tableMapping.ColumnMappings.Add("alvSo", "alvSo") tableMapping.ColumnMappings.Add("shipVia", "shipVia") tableMapping.ColumnMappings.Add("shipTo", "shipTo") tableMapping.ColumnMappings.Add("shipAdd1", "shipAdd1") tableMapping.ColumnMappings.Add("shipAdd2", "shipAdd2") tableMapping.ColumnMappings.Add("shipAdd3", "shipAdd3") tableMapping.ColumnMappings.Add("shipToNum", "shipToNum") tableMapping.ColumnMappings.Add("city", "city") tableMapping.ColumnMappings.Add("state", "state") tableMapping.ColumnMappings.Add("postalCode", "postalCode") tableMapping.ColumnMappings.Add("countryCode", "countryCode") tableMapping.ColumnMappings.Add("insertDate", "insertDate") tableMapping.ColumnMappings.Add("content", "content") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[po_orig_header] ([poNumber], [poDate], [poRev], [comments], [s"& _ "tatus], [custPo], [alvSo], [shipVia], [shipTo], [shipAdd1], [shipAdd2], [shipAdd"& _ "3], [shipToNum], [city], [state], [postalCode], [countryCode], [insertDate], [co"& _ "ntent]) VALUES (@poNumber, @poDate, @poRev, @comments, @status, @custPo, @alvSo,"& _ " @shipVia, @shipTo, @shipAdd1, @shipAdd2, @shipAdd3, @shipToNum, @city, @state, "& _ "@postalCode, @countryCode, @insertDate, @content)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poNumber", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poRev", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "poRev", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@comments", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "comments", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custPo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custPo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@alvSo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "alvSo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipVia", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipVia", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipTo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipTo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipAdd1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipAdd1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipAdd2", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipAdd2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipAdd3", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipAdd3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipToNum", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipToNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@city", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "city", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@state", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "state", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@postalCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "postalCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@countryCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "countryCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@insertDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "insertDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@content", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "content", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT poNumber, poDate, poRev, comments, status, custPo, alvSo, shipVia, shipTo,"& _ " shipAdd1, shipAdd2, shipAdd3, shipToNum, city, state, postalCode, countryCode, "& _ "insertDate, content FROM dbo.po_orig_header" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.po_orig_headerDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.po_orig_headerDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.po_orig_headerDataTable = New EpsonDataSet1.po_orig_headerDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.po_orig_headerDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "po_orig_header") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal poNumber As String, _ ByVal poDate As Global.System.Nullable(Of Date), _ ByVal poRev As String, _ ByVal comments As String, _ ByVal status As String, _ ByVal custPo As String, _ ByVal alvSo As String, _ ByVal shipVia As String, _ ByVal shipTo As String, _ ByVal shipAdd1 As String, _ ByVal shipAdd2 As String, _ ByVal shipAdd3 As String, _ ByVal shipToNum As String, _ ByVal city As String, _ ByVal state As String, _ ByVal postalCode As String, _ ByVal countryCode As String, _ ByVal insertDate As Global.System.Nullable(Of Date), _ ByVal content As String) As Integer If (poNumber Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(poNumber,String) End If If (poDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(1).Value = CType(poDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value End If If (poRev Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(poRev,String) End If If (comments Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(comments,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(status,String) End If If (custPo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(custPo,String) End If If (alvSo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(alvSo,String) End If If (shipVia Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(shipVia,String) End If If (shipTo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(shipTo,String) End If If (shipAdd1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(shipAdd1,String) End If If (shipAdd2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(shipAdd2,String) End If If (shipAdd3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(shipAdd3,String) End If If (shipToNum Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(shipToNum,String) End If If (city Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(city,String) End If If (state Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(state,String) End If If (postalCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(15).Value = CType(postalCode,String) End If If (countryCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(countryCode,String) End If If (insertDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(17).Value = CType(insertDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (content Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(content,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class printerTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "printer" tableMapping.ColumnMappings.Add("printerName", "printerName") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[printer] ([printerName]) VALUES (@printerName)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@printerName", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "printerName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT printerName FROM dbo.printer" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.printerDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.printerDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.printerDataTable = New EpsonDataSet1.printerDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.printerDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "printer") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal printerName As String) As Integer If (printerName Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(printerName,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class ptTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "pt" tableMapping.ColumnMappings.Add("ptID", "ptID") tableMapping.ColumnMappings.Add("batchNo", "batchNo") tableMapping.ColumnMappings.Add("ptNo", "ptNo") tableMapping.ColumnMappings.Add("partNo", "partNo") tableMapping.ColumnMappings.Add("curtstage", "curtstage") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("ptParent", "ptParent") tableMapping.ColumnMappings.Add("ptStart", "ptStart") tableMapping.ColumnMappings.Add("prefix", "prefix") tableMapping.ColumnMappings.Add("suffix", "suffix") tableMapping.ColumnMappings.Add("origQuantity", "origQuantity") tableMapping.ColumnMappings.Add("currQuantity", "currQuantity") tableMapping.ColumnMappings.Add("startTime", "startTime") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[pt] WHERE (([ptID] = @Original_ptID) AND ((@IsNull_batchNo = 1"& _ " AND [batchNo] IS NULL) OR ([batchNo] = @Original_batchNo)) AND ((@IsNull_ptNo ="& _ " 1 AND [ptNo] IS NULL) OR ([ptNo] = @Original_ptNo)) AND ((@IsNull_partNo = 1 AN"& _ "D [partNo] IS NULL) OR ([partNo] = @Original_partNo)) AND ((@IsNull_curtstage = "& _ "1 AND [curtstage] IS NULL) OR ([curtstage] = @Original_curtstage)) AND ((@IsNull"& _ "_status = 1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNul"& _ "l_ptParent = 1 AND [ptParent] IS NULL) OR ([ptParent] = @Original_ptParent)) AND"& _ " ((@IsNull_ptStart = 1 AND [ptStart] IS NULL) OR ([ptStart] = @Original_ptStart)"& _ ") AND ((@IsNull_prefix = 1 AND [prefix] IS NULL) OR ([prefix] = @Original_prefix"& _ ")) AND ((@IsNull_suffix = 1 AND [suffix] IS NULL) OR ([suffix] = @Original_suffi"& _ "x)) AND ((@IsNull_origQuantity = 1 AND [origQuantity] IS NULL) OR ([origQuantity"& _ "] = @Original_origQuantity)) AND ((@IsNull_currQuantity = 1 AND [currQuantity] I"& _ "S NULL) OR ([currQuantity] = @Original_currQuantity)) AND ((@IsNull_startTime = "& _ "1 AND [startTime] IS NULL) OR ([startTime] = @Original_startTime)) AND ((@IsNull"& _ "_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdat"& _ "e)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdate"& _ "dby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_batchNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_partNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_curtstage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_curtstage", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptParent", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptParent", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptParent", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptParent", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptStart", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptStart", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptStart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptStart", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_prefix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_origQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "origQuantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_origQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "origQuantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_currQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "currQuantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_currQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "currQuantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_startTime", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "startTime", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_startTime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "startTime", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[pt] ([batchNo], [ptNo], [partNo], [curtstage], [status], [ptPa"& _ "rent], [ptStart], [prefix], [suffix], [origQuantity], [currQuantity], [startTime"& _ "], [lastupdate], [lastupdatedby]) VALUES (@batchNo, @ptNo, @partNo, @curtstage, "& _ "@status, @ptParent, @ptStart, @prefix, @suffix, @origQuantity, @currQuantity, @s"& _ "tartTime, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT ptID, batchNo, ptNo, partNo, cur"& _ "tstage, status, ptParent, ptStart, prefix, suffix, origQuantity, currQuantity, s"& _ "tartTime, lastupdate, lastupdatedby FROM pt WHERE (ptID = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptParent", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptParent", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptStart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptStart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@origQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "origQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@currQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "currQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@startTime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "startTime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[pt] SET [batchNo] = @batchNo, [ptNo] = @ptNo, [partNo] = @partNo, ["& _ "curtstage] = @curtstage, [status] = @status, [ptParent] = @ptParent, [ptStart] ="& _ " @ptStart, [prefix] = @prefix, [suffix] = @suffix, [origQuantity] = @origQuantit"& _ "y, [currQuantity] = @currQuantity, [startTime] = @startTime, [lastupdate] = @las"& _ "tupdate, [lastupdatedby] = @lastupdatedby WHERE (([ptID] = @Original_ptID) AND ("& _ "(@IsNull_batchNo = 1 AND [batchNo] IS NULL) OR ([batchNo] = @Original_batchNo)) "& _ "AND ((@IsNull_ptNo = 1 AND [ptNo] IS NULL) OR ([ptNo] = @Original_ptNo)) AND ((@"& _ "IsNull_partNo = 1 AND [partNo] IS NULL) OR ([partNo] = @Original_partNo)) AND (("& _ "@IsNull_curtstage = 1 AND [curtstage] IS NULL) OR ([curtstage] = @Original_curts"& _ "tage)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([status] = @Original_s"& _ "tatus)) AND ((@IsNull_ptParent = 1 AND [ptParent] IS NULL) OR ([ptParent] = @Ori"& _ "ginal_ptParent)) AND ((@IsNull_ptStart = 1 AND [ptStart] IS NULL) OR ([ptStart] "& _ "= @Original_ptStart)) AND ((@IsNull_prefix = 1 AND [prefix] IS NULL) OR ([prefix"& _ "] = @Original_prefix)) AND ((@IsNull_suffix = 1 AND [suffix] IS NULL) OR ([suffi"& _ "x] = @Original_suffix)) AND ((@IsNull_origQuantity = 1 AND [origQuantity] IS NUL"& _ "L) OR ([origQuantity] = @Original_origQuantity)) AND ((@IsNull_currQuantity = 1 "& _ "AND [currQuantity] IS NULL) OR ([currQuantity] = @Original_currQuantity)) AND (("& _ "@IsNull_startTime = 1 AND [startTime] IS NULL) OR ([startTime] = @Original_start"& _ "Time)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] ="& _ " @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS N"& _ "ULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT ptID, batchNo, pt"& _ "No, partNo, curtstage, status, ptParent, ptStart, prefix, suffix, origQuantity, "& _ "currQuantity, startTime, lastupdate, lastupdatedby FROM pt WHERE (ptID = @ptID)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptParent", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptParent", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptStart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptStart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@origQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "origQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@currQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "currQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@startTime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "startTime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_batchNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_partNo", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_curtstage", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_curtstage", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptParent", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptParent", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptParent", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptParent", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_ptStart", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptStart", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ptStart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptStart", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_prefix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_origQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "origQuantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_origQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "origQuantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_currQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "currQuantity", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_currQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "currQuantity", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_startTime", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "startTime", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_startTime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "startTime", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "ptID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT ptID, batchNo, ptNo, partNo, curtstage, status, ptParent, ptStart, prefix,"& _ " suffix, origQuantity, currQuantity, startTime, lastupdate, lastupdatedby FROM d"& _ "bo.pt" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.ptDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.ptDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.ptDataTable = New EpsonDataSet1.ptDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.ptDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "pt") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_ptID As Integer, ByVal Original_batchNo As String, ByVal Original_ptNo As String, ByVal Original_partNo As String, ByVal Original_curtstage As String, ByVal Original_status As String, ByVal Original_ptParent As String, ByVal Original_ptStart As String, ByVal Original_prefix As String, ByVal Original_suffix As Global.System.Nullable(Of Integer), ByVal Original_origQuantity As Global.System.Nullable(Of Integer), ByVal Original_currQuantity As Global.System.Nullable(Of Integer), ByVal Original_startTime As Global.System.Nullable(Of Date), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_ptID,Integer) If (Original_batchNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_batchNo,String) End If If (Original_ptNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_ptNo,String) End If If (Original_partNo Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_partNo,String) End If If (Original_curtstage Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_curtstage,String) End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_status,String) End If If (Original_ptParent Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_ptParent,String) End If If (Original_ptStart Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_ptStart,String) End If If (Original_prefix Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_prefix,String) End If If (Original_suffix.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = CType(Original_suffix.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_origQuantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = CType(Original_origQuantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(20).Value = Global.System.DBNull.Value End If If (Original_currQuantity.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = CType(Original_currQuantity.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(22).Value = Global.System.DBNull.Value End If If (Original_startTime.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = CType(Original_startTime.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(24).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(26).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(28).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal batchNo As String, ByVal ptNo As String, ByVal partNo As String, ByVal curtstage As String, ByVal status As String, ByVal ptParent As String, ByVal ptStart As String, ByVal prefix As String, ByVal suffix As Global.System.Nullable(Of Integer), ByVal origQuantity As Global.System.Nullable(Of Integer), ByVal currQuantity As Global.System.Nullable(Of Integer), ByVal startTime As Global.System.Nullable(Of Date), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (batchNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(batchNo,String) End If If (ptNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(ptNo,String) End If If (partNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(partNo,String) End If If (curtstage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(curtstage,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(status,String) End If If (ptParent Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(ptParent,String) End If If (ptStart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(ptStart,String) End If If (prefix Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(prefix,String) End If If (suffix.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(suffix.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (origQuantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(origQuantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (currQuantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(currQuantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (startTime.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(11).Value = CType(startTime.Value,Date) Else Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(12).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal batchNo As String, _ ByVal ptNo As String, _ ByVal partNo As String, _ ByVal curtstage As String, _ ByVal status As String, _ ByVal ptParent As String, _ ByVal ptStart As String, _ ByVal prefix As String, _ ByVal suffix As Global.System.Nullable(Of Integer), _ ByVal origQuantity As Global.System.Nullable(Of Integer), _ ByVal currQuantity As Global.System.Nullable(Of Integer), _ ByVal startTime As Global.System.Nullable(Of Date), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_ptID As Integer, _ ByVal Original_batchNo As String, _ ByVal Original_ptNo As String, _ ByVal Original_partNo As String, _ ByVal Original_curtstage As String, _ ByVal Original_status As String, _ ByVal Original_ptParent As String, _ ByVal Original_ptStart As String, _ ByVal Original_prefix As String, _ ByVal Original_suffix As Global.System.Nullable(Of Integer), _ ByVal Original_origQuantity As Global.System.Nullable(Of Integer), _ ByVal Original_currQuantity As Global.System.Nullable(Of Integer), _ ByVal Original_startTime As Global.System.Nullable(Of Date), _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal ptID As Integer) As Integer If (batchNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(batchNo,String) End If If (ptNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(ptNo,String) End If If (partNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(partNo,String) End If If (curtstage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(curtstage,String) End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(status,String) End If If (ptParent Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(ptParent,String) End If If (ptStart Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(ptStart,String) End If If (prefix Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(prefix,String) End If If (suffix.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(suffix.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (origQuantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(origQuantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (currQuantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(currQuantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (startTime.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(startTime.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_ptID,Integer) If (Original_batchNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_batchNo,String) End If If (Original_ptNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_ptNo,String) End If If (Original_partNo Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_partNo,String) End If If (Original_curtstage Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_curtstage,String) End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_status,String) End If If (Original_ptParent Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(25).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(25).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(26).Value = CType(Original_ptParent,String) End If If (Original_ptStart Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(27).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(27).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(28).Value = CType(Original_ptStart,String) End If If (Original_prefix Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(29).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(29).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(30).Value = CType(Original_prefix,String) End If If (Original_suffix.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(31).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(32).Value = CType(Original_suffix.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(31).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(32).Value = Global.System.DBNull.Value End If If (Original_origQuantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(33).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(34).Value = CType(Original_origQuantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(33).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(34).Value = Global.System.DBNull.Value End If If (Original_currQuantity.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(35).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(36).Value = CType(Original_currQuantity.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(35).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(36).Value = Global.System.DBNull.Value End If If (Original_startTime.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(37).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(38).Value = CType(Original_startTime.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(37).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(38).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(39).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(40).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(39).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(40).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(41).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(42).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(41).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(42).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(43).Value = CType(ptID,Integer) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal batchNo As String, _ ByVal ptNo As String, _ ByVal partNo As String, _ ByVal curtstage As String, _ ByVal status As String, _ ByVal ptParent As String, _ ByVal ptStart As String, _ ByVal prefix As String, _ ByVal suffix As Global.System.Nullable(Of Integer), _ ByVal origQuantity As Global.System.Nullable(Of Integer), _ ByVal currQuantity As Global.System.Nullable(Of Integer), _ ByVal startTime As Global.System.Nullable(Of Date), _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_ptID As Integer, _ ByVal Original_batchNo As String, _ ByVal Original_ptNo As String, _ ByVal Original_partNo As String, _ ByVal Original_curtstage As String, _ ByVal Original_status As String, _ ByVal Original_ptParent As String, _ ByVal Original_ptStart As String, _ ByVal Original_prefix As String, _ ByVal Original_suffix As Global.System.Nullable(Of Integer), _ ByVal Original_origQuantity As Global.System.Nullable(Of Integer), _ ByVal Original_currQuantity As Global.System.Nullable(Of Integer), _ ByVal Original_startTime As Global.System.Nullable(Of Date), _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(batchNo, ptNo, partNo, curtstage, status, ptParent, ptStart, prefix, suffix, origQuantity, currQuantity, startTime, lastupdate, lastupdatedby, Original_ptID, Original_batchNo, Original_ptNo, Original_partNo, Original_curtstage, Original_status, Original_ptParent, Original_ptStart, Original_prefix, Original_suffix, Original_origQuantity, Original_currQuantity, Original_startTime, Original_lastupdate, Original_lastupdatedby, Original_ptID) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class pt_HistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "pt_Hist" tableMapping.ColumnMappings.Add("ptID", "ptID") tableMapping.ColumnMappings.Add("batchNo", "batchNo") tableMapping.ColumnMappings.Add("ptNo", "ptNo") tableMapping.ColumnMappings.Add("partNo", "partNo") tableMapping.ColumnMappings.Add("curtstage", "curtstage") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("ptParent", "ptParent") tableMapping.ColumnMappings.Add("ptStart", "ptStart") tableMapping.ColumnMappings.Add("prefix", "prefix") tableMapping.ColumnMappings.Add("suffix", "suffix") tableMapping.ColumnMappings.Add("origQuantity", "origQuantity") tableMapping.ColumnMappings.Add("currQuantity", "currQuantity") tableMapping.ColumnMappings.Add("startTime", "startTime") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[pt_Hist] ([batchNo], [ptNo], [partNo], [curtstage], [status], "& _ "[ptParent], [ptStart], [prefix], [suffix], [origQuantity], [currQuantity], [star"& _ "tTime], [lastupdate], [lastupdatedby]) VALUES (@batchNo, @ptNo, @partNo, @curtst"& _ "age, @status, @ptParent, @ptStart, @prefix, @suffix, @origQuantity, @currQuantit"& _ "y, @startTime, @lastupdate, @lastupdatedby)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "batchNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@partNo", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "partNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@curtstage", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "curtstage", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptParent", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptParent", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ptStart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ptStart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@prefix", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "prefix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@suffix", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "suffix", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@origQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "origQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@currQuantity", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "currQuantity", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@startTime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "startTime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT ptID, batchNo, ptNo, partNo, curtstage, status, ptParent, ptStart, prefix,"& _ " suffix, origQuantity, currQuantity, startTime, lastupdate, lastupdatedby FROM d"& _ "bo.pt_Hist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.pt_HistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.pt_HistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.pt_HistDataTable = New EpsonDataSet1.pt_HistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.pt_HistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "pt_Hist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal batchNo As String, ByVal ptNo As String, ByVal partNo As String, ByVal curtstage As String, ByVal status As String, ByVal ptParent As String, ByVal ptStart As String, ByVal prefix As String, ByVal suffix As Global.System.Nullable(Of Integer), ByVal origQuantity As Global.System.Nullable(Of Integer), ByVal currQuantity As Global.System.Nullable(Of Integer), ByVal startTime As Global.System.Nullable(Of Date), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (batchNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(batchNo,String) End If If (ptNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(ptNo,String) End If If (partNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(partNo,String) End If If (curtstage Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(curtstage,String) End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(status,String) End If If (ptParent Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(ptParent,String) End If If (ptStart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(ptStart,String) End If If (prefix Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(prefix,String) End If If (suffix.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(8).Value = CType(suffix.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (origQuantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(9).Value = CType(origQuantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value End If If (currQuantity.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(10).Value = CType(currQuantity.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (startTime.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(11).Value = CType(startTime.Value,Date) Else Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(12).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class serialAlvarisetTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "serialAlvariset" tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("mpPartno", "mpPartno") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[serialAlvariset] WHERE (([cardno] = @Original_cardno) AND ((@I"& _ "sNull_mpPartno = 1 AND [mpPartno] IS NULL) OR ([mpPartno] = @Original_mpPartno))"& _ " AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Orig"& _ "inal_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) O"& _ "R ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_mpPartno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mpPartno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_mpPartno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mpPartno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[serialAlvariset] ([cardno], [mpPartno], [lastupdate], [lastupd"& _ "atedby]) VALUES (@cardno, @mpPartno, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT cardn"& _ "o, mpPartno, lastupdate, lastupdatedby FROM serialAlvariset WHERE (cardno = @car"& _ "dno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@mpPartno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mpPartno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[serialAlvariset] SET [cardno] = @cardno, [mpPartno] = @mpPartno, [l"& _ "astupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE (([cardno] = @O"& _ "riginal_cardno) AND ((@IsNull_mpPartno = 1 AND [mpPartno] IS NULL) OR ([mpPartno"& _ "] = @Original_mpPartno)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) "& _ "OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [l"& _ "astupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT"& _ " cardno, mpPartno, lastupdate, lastupdatedby FROM serialAlvariset WHERE (cardno "& _ "= @cardno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@mpPartno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mpPartno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_mpPartno", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mpPartno", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_mpPartno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "mpPartno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cardno, mpPartno, lastupdate, lastupdatedby FROM dbo.serialAlvariset" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.serialAlvarisetDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.serialAlvarisetDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.serialAlvarisetDataTable = New EpsonDataSet1.serialAlvarisetDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.serialAlvarisetDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "serialAlvariset") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_cardno As String, ByVal Original_mpPartno As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_cardno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_cardno,String) End If If (Original_mpPartno Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_mpPartno,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal cardno As String, ByVal mpPartno As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("cardno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (mpPartno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(mpPartno,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal cardno As String, ByVal mpPartno As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_cardno As String, ByVal Original_mpPartno As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("cardno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(cardno,String) End If If (mpPartno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(mpPartno,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdatedby,String) End If If (Original_cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_cardno") Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_cardno,String) End If If (Original_mpPartno Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_mpPartno,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal mpPartno As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_cardno As String, ByVal Original_mpPartno As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_cardno, mpPartno, lastupdate, lastupdatedby, Original_cardno, Original_mpPartno, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class serialMacTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "serialMac" tableMapping.ColumnMappings.Add("cardno", "cardno") tableMapping.ColumnMappings.Add("macaddress", "macaddress") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[serialMac] WHERE (([cardno] = @Original_cardno) AND ((@IsNull_"& _ "macaddress = 1 AND [macaddress] IS NULL) OR ([macaddress] = @Original_macaddress"& _ ")) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Or"& _ "iginal_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL)"& _ " OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_macaddress", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "macaddress", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_macaddress", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "macaddress", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[serialMac] ([cardno], [macaddress], [lastupdate], [lastupdated"& _ "by]) VALUES (@cardno, @macaddress, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT cardno,"& _ " macaddress, lastupdate, lastupdatedby FROM serialMac WHERE (cardno = @cardno)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@macaddress", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "macaddress", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[serialMac] SET [cardno] = @cardno, [macaddress] = @macaddress, [las"& _ "tupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE (([cardno] = @Ori"& _ "ginal_cardno) AND ((@IsNull_macaddress = 1 AND [macaddress] IS NULL) OR ([macadd"& _ "ress] = @Original_macaddress)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS "& _ "NULL) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 "& _ "AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)& _ "SELECT cardno, macaddress, lastupdate, lastupdatedby FROM serialMac WHERE (cardn"& _ "o = @cardno)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@macaddress", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "macaddress", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_cardno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cardno", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_macaddress", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "macaddress", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_macaddress", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "macaddress", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cardno, macaddress, lastupdate, lastupdatedby FROM dbo.serialMac" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.serialMacDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.serialMacDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.serialMacDataTable = New EpsonDataSet1.serialMacDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.serialMacDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "serialMac") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_cardno As String, ByVal Original_macaddress As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_cardno") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_cardno,String) End If If (Original_macaddress Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_macaddress,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal cardno As String, ByVal macaddress As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("cardno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cardno,String) End If If (macaddress Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(macaddress,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal cardno As String, ByVal macaddress As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_cardno As String, ByVal Original_macaddress As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("cardno") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(cardno,String) End If If (macaddress Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(macaddress,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(lastupdatedby,String) End If If (Original_cardno Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_cardno") Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_cardno,String) End If If (Original_macaddress Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_macaddress,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal macaddress As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_cardno As String, ByVal Original_macaddress As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_cardno, macaddress, lastupdate, lastupdatedby, Original_cardno, Original_macaddress, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class SHIPPER_REPORT_TABLETableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "SHIPPER_REPORT_TABLE" tableMapping.ColumnMappings.Add("cnNo", "cnNo") tableMapping.ColumnMappings.Add("shipno", "shipno") tableMapping.ColumnMappings.Add("shipDate", "shipDate") tableMapping.ColumnMappings.Add("shipto", "shipto") tableMapping.ColumnMappings.Add("sipAdd1", "sipAdd1") tableMapping.ColumnMappings.Add("shipAdd2", "shipAdd2") tableMapping.ColumnMappings.Add("shipAdd3", "shipAdd3") tableMapping.ColumnMappings.Add("ZIP", "ZIP") tableMapping.ColumnMappings.Add("countryCode", "countryCode") tableMapping.ColumnMappings.Add("Phone", "Phone") tableMapping.ColumnMappings.Add("shipVia", "shipVia") tableMapping.ColumnMappings.Add("POLine", "POLine") tableMapping.ColumnMappings.Add("modelDesc1", "modelDesc1") tableMapping.ColumnMappings.Add("CustPO", "CustPO") tableMapping.ColumnMappings.Add("AlvSO", "AlvSO") tableMapping.ColumnMappings.Add("AlvSOLine", "AlvSOLine") tableMapping.ColumnMappings.Add("Flag3", "Flag3") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("custPart", "custPart") tableMapping.ColumnMappings.Add("SNQty", "SNQty") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("layer", "layer") tableMapping.ColumnMappings.Add("dimension", "dimension") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[SHIPPER_REPORT_TABLE] ([cnNo], [shipno], [shipDate], [shipto],"& _ " [sipAdd1], [shipAdd2], [shipAdd3], [ZIP], [countryCode], [Phone], [shipVia], [P"& _ "OLine], [modelDesc1], [CustPO], [AlvSO], [AlvSOLine], [Flag3], [model], [custPar"& _ "t], [SNQty], [serialno], [layer], [dimension]) VALUES (@cnNo, @shipno, @shipDate"& _ ", @shipto, @sipAdd1, @shipAdd2, @shipAdd3, @ZIP, @countryCode, @Phone, @shipVia,"& _ " @POLine, @modelDesc1, @CustPO, @AlvSO, @AlvSOLine, @Flag3, @model, @custPart, @"& _ "SNQty, @serialno, @layer, @dimension)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cnNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipto", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipto", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sipAdd1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sipAdd1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipAdd2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipAdd2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipAdd3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipAdd3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ZIP", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ZIP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@countryCode", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "countryCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Phone", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Phone", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipVia", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipVia", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@POLine", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "POLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPO", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AlvSO", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "AlvSO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AlvSOLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "AlvSOLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@custPart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "custPart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SNQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SNQty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layer", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cnNo, shipno, shipDate, shipto, sipAdd1, shipAdd2, shipAdd3, ZIP, countryC"& _ "ode, Phone, shipVia, POLine, modelDesc1, CustPO, AlvSO, AlvSOLine, Flag3, model,"& _ " custPart, SNQty, serialno, layer, dimension FROM dbo.SHIPPER_REPORT_TABLE" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.SHIPPER_REPORT_TABLEDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.SHIPPER_REPORT_TABLEDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.SHIPPER_REPORT_TABLEDataTable = New EpsonDataSet1.SHIPPER_REPORT_TABLEDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.SHIPPER_REPORT_TABLEDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "SHIPPER_REPORT_TABLE") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal cnNo As String, _ ByVal shipno As String, _ ByVal shipDate As Global.System.Nullable(Of Date), _ ByVal shipto As String, _ ByVal sipAdd1 As String, _ ByVal shipAdd2 As String, _ ByVal shipAdd3 As String, _ ByVal ZIP As String, _ ByVal countryCode As String, _ ByVal Phone As String, _ ByVal shipVia As String, _ ByVal POLine As String, _ ByVal modelDesc1 As String, _ ByVal CustPO As String, _ ByVal AlvSO As String, _ ByVal AlvSOLine As Global.System.Nullable(Of Decimal), _ ByVal Flag3 As String, _ ByVal model As String, _ ByVal custPart As String, _ ByVal SNQty As Global.System.Nullable(Of Integer), _ ByVal serialno As String, _ ByVal layer As Global.System.Nullable(Of Single), _ ByVal dimension As String) As Integer If (cnNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cnNo,String) End If If (shipno Is Nothing) Then Throw New Global.System.ArgumentNullException("shipno") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(shipno,String) End If If (shipDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(shipDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (shipto Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(shipto,String) End If If (sipAdd1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(sipAdd1,String) End If If (shipAdd2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(shipAdd2,String) End If If (shipAdd3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(shipAdd3,String) End If If (ZIP Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(ZIP,String) End If If (countryCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(countryCode,String) End If If (Phone Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(Phone,String) End If If (shipVia Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(shipVia,String) End If If (POLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(POLine,String) End If If (modelDesc1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(modelDesc1,String) End If If (CustPO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(CustPO,String) End If If (AlvSO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(AlvSO,String) End If If (AlvSOLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(AlvSOLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (Flag3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(Flag3,String) End If If (model Is Nothing) Then Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(17).Value = CType(model,String) End If If (custPart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(custPart,String) End If If (SNQty.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(19).Value = CType(SNQty.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(serialno,String) End If If (layer.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(21).Value = CType(layer.Value,Single) Else Me.Adapter.InsertCommand.Parameters(21).Value = Global.System.DBNull.Value End If If (dimension Is Nothing) Then Me.Adapter.InsertCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(22).Value = CType(dimension,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class SHIPPER_STATUSTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "SHIPPER_STATUS" tableMapping.ColumnMappings.Add("Shipno", "Shipno") tableMapping.ColumnMappings.Add("Process", "Process") tableMapping.ColumnMappings.Add("Result", "Result") tableMapping.ColumnMappings.Add("Remarks", "Remarks") tableMapping.ColumnMappings.Add("UPDTime", "UPDTime") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[SHIPPER_STATUS] ([Shipno], [Process], [Result], [Remarks], [UP"& _ "DTime]) VALUES (@Shipno, @Process, @Result, @Remarks, @UPDTime)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Shipno", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Shipno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Process", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Process", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Result", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Result", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Remarks", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Remarks", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@UPDTime", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "UPDTime", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT Shipno, Process, Result, Remarks, UPDTime FROM dbo.SHIPPER_STATUS" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.SHIPPER_STATUSDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.SHIPPER_STATUSDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.SHIPPER_STATUSDataTable = New EpsonDataSet1.SHIPPER_STATUSDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.SHIPPER_STATUSDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "SHIPPER_STATUS") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal Shipno As String, ByVal Process As String, ByVal Result As String, ByVal Remarks As String, ByVal UPDTime As Global.System.Nullable(Of Date)) As Integer If (Shipno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(Shipno,String) End If If (Process Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(Process,String) End If If (Result Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(Result,String) End If If (Remarks Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(Remarks,String) End If If (UPDTime.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(UPDTime.Value,Date) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class SHIPPER_SUMMARY_TABLETableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "SHIPPER_SUMMARY_TABLE" tableMapping.ColumnMappings.Add("cnNo", "cnNo") tableMapping.ColumnMappings.Add("shipno", "shipno") tableMapping.ColumnMappings.Add("shipDate", "shipDate") tableMapping.ColumnMappings.Add("shipto", "shipto") tableMapping.ColumnMappings.Add("sipAdd1", "sipAdd1") tableMapping.ColumnMappings.Add("shipAdd2", "shipAdd2") tableMapping.ColumnMappings.Add("shipAdd3", "shipAdd3") tableMapping.ColumnMappings.Add("ZIP", "ZIP") tableMapping.ColumnMappings.Add("countryCode", "countryCode") tableMapping.ColumnMappings.Add("Phone", "Phone") tableMapping.ColumnMappings.Add("shipVia", "shipVia") tableMapping.ColumnMappings.Add("POLine", "POLine") tableMapping.ColumnMappings.Add("modelDesc1", "modelDesc1") tableMapping.ColumnMappings.Add("CustPO", "CustPO") tableMapping.ColumnMappings.Add("AlvSO", "AlvSO") tableMapping.ColumnMappings.Add("AlvSOLine", "AlvSOLine") tableMapping.ColumnMappings.Add("Flag3", "Flag3") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("CustPart", "CustPart") tableMapping.ColumnMappings.Add("SNQty", "SNQty") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("layer", "layer") tableMapping.ColumnMappings.Add("dimension", "dimension") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[SHIPPER_SUMMARY_TABLE] ([cnNo], [shipno], [shipDate], [shipto]"& _ ", [sipAdd1], [shipAdd2], [shipAdd3], [ZIP], [countryCode], [Phone], [shipVia], ["& _ "POLine], [modelDesc1], [CustPO], [AlvSO], [AlvSOLine], [Flag3], [model], [CustPa"& _ "rt], [SNQty], [serialno], [layer], [dimension]) VALUES (@cnNo, @shipno, @shipDat"& _ "e, @shipto, @sipAdd1, @shipAdd2, @shipAdd3, @ZIP, @countryCode, @Phone, @shipVia"& _ ", @POLine, @modelDesc1, @CustPO, @AlvSO, @AlvSOLine, @Flag3, @model, @CustPart, "& _ "@SNQty, @serialno, @layer, @dimension)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@cnNo", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "cnNo", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipto", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipto", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sipAdd1", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sipAdd1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipAdd2", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipAdd2", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipAdd3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipAdd3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ZIP", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ZIP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@countryCode", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "countryCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Phone", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Phone", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipVia", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "shipVia", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@POLine", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "POLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelDesc1", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelDesc1", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPO", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AlvSO", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "AlvSO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AlvSOLine", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 0, "AlvSOLine", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Flag3", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Flag3", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@model", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "model", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CustPart", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CustPart", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@SNQty", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "SNQty", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "serialno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@layer", Global.System.Data.SqlDbType.Real, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "layer", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dimension", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dimension", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT cnNo, shipno, shipDate, shipto, sipAdd1, shipAdd2, shipAdd3, ZIP, countryC"& _ "ode, Phone, shipVia, POLine, modelDesc1, CustPO, AlvSO, AlvSOLine, Flag3, model,"& _ " CustPart, SNQty, serialno, layer, dimension FROM dbo.SHIPPER_SUMMARY_TABLE" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.SHIPPER_SUMMARY_TABLEDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.SHIPPER_SUMMARY_TABLEDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.SHIPPER_SUMMARY_TABLEDataTable = New EpsonDataSet1.SHIPPER_SUMMARY_TABLEDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.SHIPPER_SUMMARY_TABLEDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "SHIPPER_SUMMARY_TABLE") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert( _ ByVal cnNo As String, _ ByVal shipno As String, _ ByVal shipDate As Global.System.Nullable(Of Date), _ ByVal shipto As String, _ ByVal sipAdd1 As String, _ ByVal shipAdd2 As String, _ ByVal shipAdd3 As String, _ ByVal ZIP As String, _ ByVal countryCode As String, _ ByVal Phone As String, _ ByVal shipVia As String, _ ByVal POLine As String, _ ByVal modelDesc1 As String, _ ByVal CustPO As String, _ ByVal AlvSO As String, _ ByVal AlvSOLine As Global.System.Nullable(Of Decimal), _ ByVal Flag3 As String, _ ByVal model As String, _ ByVal CustPart As String, _ ByVal SNQty As Global.System.Nullable(Of Integer), _ ByVal serialno As String, _ ByVal layer As Global.System.Nullable(Of Single), _ ByVal dimension As String) As Integer If (cnNo Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(cnNo,String) End If If (shipno Is Nothing) Then Throw New Global.System.ArgumentNullException("shipno") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(shipno,String) End If If (shipDate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(shipDate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (shipto Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(shipto,String) End If If (sipAdd1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(sipAdd1,String) End If If (shipAdd2 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(shipAdd2,String) End If If (shipAdd3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(shipAdd3,String) End If If (ZIP Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(ZIP,String) End If If (countryCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(8).Value = CType(countryCode,String) End If If (Phone Is Nothing) Then Me.Adapter.InsertCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(9).Value = CType(Phone,String) End If If (shipVia Is Nothing) Then Me.Adapter.InsertCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(10).Value = CType(shipVia,String) End If If (POLine Is Nothing) Then Me.Adapter.InsertCommand.Parameters(11).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(11).Value = CType(POLine,String) End If If (modelDesc1 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(12).Value = CType(modelDesc1,String) End If If (CustPO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(13).Value = CType(CustPO,String) End If If (AlvSO Is Nothing) Then Me.Adapter.InsertCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(14).Value = CType(AlvSO,String) End If If (AlvSOLine.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(15).Value = CType(AlvSOLine.Value,Decimal) Else Me.Adapter.InsertCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (Flag3 Is Nothing) Then Me.Adapter.InsertCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(16).Value = CType(Flag3,String) End If If (model Is Nothing) Then Me.Adapter.InsertCommand.Parameters(17).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(17).Value = CType(model,String) End If If (CustPart Is Nothing) Then Me.Adapter.InsertCommand.Parameters(18).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(18).Value = CType(CustPart,String) End If If (SNQty.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(19).Value = CType(SNQty.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(19).Value = Global.System.DBNull.Value End If If (serialno Is Nothing) Then Me.Adapter.InsertCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(20).Value = CType(serialno,String) End If If (layer.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(21).Value = CType(layer.Value,Single) Else Me.Adapter.InsertCommand.Parameters(21).Value = Global.System.DBNull.Value End If If (dimension Is Nothing) Then Me.Adapter.InsertCommand.Parameters(22).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(22).Value = CType(dimension,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class stationTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "station" tableMapping.ColumnMappings.Add("station", "station") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("sequence", "sequence") tableMapping.ColumnMappings.Add("stype", "stype") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[station] WHERE (([station] = @Original_station) AND ((@IsNull_"& _ "description = 1 AND [description] IS NULL) OR ([description] = @Original_descrip"& _ "tion)) AND ((@IsNull_sequence = 1 AND [sequence] IS NULL) OR ([sequence] = @Orig"& _ "inal_sequence)) AND ((@IsNull_stype = 1 AND [stype] IS NULL) OR ([stype] = @Orig"& _ "inal_stype)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Orig"& _ "inal_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) OR ([lastup"& _ "date] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [lastupdatedb"& _ "y] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_stype", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_stype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[station] ([station], [description], [sequence], [stype], [acti"& _ "ve], [lastupdate], [lastupdatedby]) VALUES (@station, @description, @sequence, @"& _ "stype, @active, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT station, description, sequ"& _ "ence, stype, active, lastupdate, lastupdatedby FROM station WHERE (station = @st"& _ "ation)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[station] SET [station] = @station, [description] = @description, [s"& _ "equence] = @sequence, [stype] = @stype, [active] = @active, [lastupdate] = @last"& _ "update, [lastupdatedby] = @lastupdatedby WHERE (([station] = @Original_station) "& _ "AND ((@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Or"& _ "iginal_description)) AND ((@IsNull_sequence = 1 AND [sequence] IS NULL) OR ([seq"& _ "uence] = @Original_sequence)) AND ((@IsNull_stype = 1 AND [stype] IS NULL) OR (["& _ "stype] = @Original_stype)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([a"& _ "ctive] = @Original_active)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NUL"& _ "L) OR ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND"& _ " [lastupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SEL"& _ "ECT station, description, sequence, stype, active, lastupdate, lastupdatedby FRO"& _ "M station WHERE (station = @station)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_stype", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_stype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT station, description, sequence, stype, active, lastupdate, lastupdatedby F"& _ "ROM dbo.station" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.stationDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.stationDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.stationDataTable = New EpsonDataSet1.stationDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.stationDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "station") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_station As String, ByVal Original_description As String, ByVal Original_sequence As Global.System.Nullable(Of Integer), ByVal Original_stype As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (Original_station Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_station") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_station,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_description,String) End If If (Original_sequence.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_sequence.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (Original_stype Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_stype,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal station As String, ByVal description As String, ByVal sequence As Global.System.Nullable(Of Integer), ByVal stype As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (station Is Nothing) Then Throw New Global.System.ArgumentNullException("station") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(station,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (sequence.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(sequence.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (stype Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(stype,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal station As String, ByVal description As String, ByVal sequence As Global.System.Nullable(Of Integer), ByVal stype As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_station As String, ByVal Original_description As String, ByVal Original_sequence As Global.System.Nullable(Of Integer), ByVal Original_stype As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer If (station Is Nothing) Then Throw New Global.System.ArgumentNullException("station") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(station,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (sequence.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(sequence.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (stype Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(stype,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdatedby,String) End If If (Original_station Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_station") Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_station,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_description,String) End If If (Original_sequence.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_sequence.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value End If If (Original_stype Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_stype,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal description As String, ByVal sequence As Global.System.Nullable(Of Integer), ByVal stype As String, ByVal active As Global.System.Nullable(Of Integer), ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String, ByVal Original_station As String, ByVal Original_description As String, ByVal Original_sequence As Global.System.Nullable(Of Integer), ByVal Original_stype As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Return Me.Update(Original_station, description, sequence, stype, active, lastupdate, lastupdatedby, Original_station, Original_description, Original_sequence, Original_stype, Original_active, Original_lastupdate, Original_lastupdatedby) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class station_convertTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "station_convert" tableMapping.ColumnMappings.Add("ioStation", "ioStation") tableMapping.ColumnMappings.Add("alvStation", "alvStation") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[station_convert] ([ioStation], [alvStation]) VALUES (@ioStatio"& _ "n, @alvStation)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ioStation", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ioStation", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@alvStation", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "alvStation", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT ioStation, alvStation FROM dbo.station_convert" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.station_convertDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.station_convertDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.station_convertDataTable = New EpsonDataSet1.station_convertDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.station_convertDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "station_convert") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal ioStation As String, ByVal alvStation As String) As Integer If (ioStation Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(ioStation,String) End If If (alvStation Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(alvStation,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class stationHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "stationHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("station", "station") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("sequence", "sequence") tableMapping.ColumnMappings.Add("stype", "stype") tableMapping.ColumnMappings.Add("active", "active") tableMapping.ColumnMappings.Add("status", "status") tableMapping.ColumnMappings.Add("lastupdate", "lastupdate") tableMapping.ColumnMappings.Add("lastupdatedby", "lastupdatedby") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[stationHist] WHERE (([lineNum] = @Original_lineNum) AND ((@IsN"& _ "ull_station = 1 AND [station] IS NULL) OR ([station] = @Original_station)) AND ("& _ "(@IsNull_description = 1 AND [description] IS NULL) OR ([description] = @Origina"& _ "l_description)) AND ((@IsNull_sequence = 1 AND [sequence] IS NULL) OR ([sequence"& _ "] = @Original_sequence)) AND ((@IsNull_stype = 1 AND [stype] IS NULL) OR ([stype"& _ "] = @Original_stype)) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active"& _ "] = @Original_active)) AND ((@IsNull_status = 1 AND [status] IS NULL) OR ([statu"& _ "s] = @Original_status)) AND ((@IsNull_lastupdate = 1 AND [lastupdate] IS NULL) O"& _ "R ([lastupdate] = @Original_lastupdate)) AND ((@IsNull_lastupdatedby = 1 AND [la"& _ "stupdatedby] IS NULL) OR ([lastupdatedby] = @Original_lastupdatedby)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_station", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_stype", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_stype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[stationHist] ([station], [description], [sequence], [stype], ["& _ "active], [status], [lastupdate], [lastupdatedby]) VALUES (@station, @description"& _ ", @sequence, @stype, @active, @status, @lastupdate, @lastupdatedby);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lin"& _ "eNum, station, description, sequence, stype, active, status, lastupdate, lastupd"& _ "atedby FROM stationHist WHERE (lineNum = SCOPE_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[stationHist] SET [station] = @station, [description] = @description"& _ ", [sequence] = @sequence, [stype] = @stype, [active] = @active, [status] = @stat"& _ "us, [lastupdate] = @lastupdate, [lastupdatedby] = @lastupdatedby WHERE (([lineNu"& _ "m] = @Original_lineNum) AND ((@IsNull_station = 1 AND [station] IS NULL) OR ([st"& _ "ation] = @Original_station)) AND ((@IsNull_description = 1 AND [description] IS "& _ "NULL) OR ([description] = @Original_description)) AND ((@IsNull_sequence = 1 AND"& _ " [sequence] IS NULL) OR ([sequence] = @Original_sequence)) AND ((@IsNull_stype ="& _ " 1 AND [stype] IS NULL) OR ([stype] = @Original_stype)) AND ((@IsNull_active = 1"& _ " AND [active] IS NULL) OR ([active] = @Original_active)) AND ((@IsNull_status = "& _ "1 AND [status] IS NULL) OR ([status] = @Original_status)) AND ((@IsNull_lastupda"& _ "te = 1 AND [lastupdate] IS NULL) OR ([lastupdate] = @Original_lastupdate)) AND ("& _ "(@IsNull_lastupdatedby = 1 AND [lastupdatedby] IS NULL) OR ([lastupdatedby] = @O"& _ "riginal_lastupdatedby)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, station, description, sequence, stype"& _ ", active, status, lastupdate, lastupdatedby FROM stationHist WHERE (lineNum = @l"& _ "ineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@stype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_station", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_description", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_sequence", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "sequence", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_stype", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_stype", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "stype", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_status", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_status", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "status", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_lastupdatedby", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lastupdatedby", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lastupdatedby", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, station, description, sequence, stype, active, status, lastupdate"& _ ", lastupdatedby FROM dbo.stationHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.stationHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.stationHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.stationHistDataTable = New EpsonDataSet1.stationHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.stationHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "stationHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_station As String, ByVal Original_description As String, ByVal Original_sequence As Global.System.Nullable(Of Integer), ByVal Original_stype As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal Original_status As String, ByVal Original_lastupdate As Global.System.Nullable(Of Date), ByVal Original_lastupdatedby As String) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_station Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_station,String) End If If (Original_description Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_description,String) End If If (Original_sequence.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_sequence.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_stype Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_stype,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(16).Value = CType(Original_lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal station As String, ByVal description As String, ByVal sequence As Global.System.Nullable(Of Integer), ByVal stype As String, ByVal active As Global.System.Nullable(Of Integer), ByVal status As String, ByVal lastupdate As Global.System.Nullable(Of Date), ByVal lastupdatedby As String) As Integer If (station Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(station,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(description,String) End If If (sequence.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(2).Value = CType(sequence.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (stype Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(stype,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(5).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.InsertCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal station As String, _ ByVal description As String, _ ByVal sequence As Global.System.Nullable(Of Integer), _ ByVal stype As String, _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_station As String, _ ByVal Original_description As String, _ ByVal Original_sequence As Global.System.Nullable(Of Integer), _ ByVal Original_stype As String, _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String, _ ByVal lineNum As Long) As Integer If (station Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(station,String) End If If (description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(description,String) End If If (sequence.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(2).Value = CType(sequence.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value End If If (stype Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(3).Value = CType(stype,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(4).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(5).Value = CType(status,String) End If If (lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(6).Value = CType(lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_lineNum,Long) If (Original_station Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_station,String) End If If (Original_description Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_description,String) End If If (Original_sequence.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_sequence.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_stype Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_stype,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value End If If (Original_status Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(19).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(19).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(20).Value = CType(Original_status,String) End If If (Original_lastupdate.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(21).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = CType(Original_lastupdate.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(21).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(22).Value = Global.System.DBNull.Value End If If (Original_lastupdatedby Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(23).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(23).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(24).Value = CType(Original_lastupdatedby,String) End If Me.Adapter.UpdateCommand.Parameters(25).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update( _ ByVal station As String, _ ByVal description As String, _ ByVal sequence As Global.System.Nullable(Of Integer), _ ByVal stype As String, _ ByVal active As Global.System.Nullable(Of Integer), _ ByVal status As String, _ ByVal lastupdate As Global.System.Nullable(Of Date), _ ByVal lastupdatedby As String, _ ByVal Original_lineNum As Long, _ ByVal Original_station As String, _ ByVal Original_description As String, _ ByVal Original_sequence As Global.System.Nullable(Of Integer), _ ByVal Original_stype As String, _ ByVal Original_active As Global.System.Nullable(Of Integer), _ ByVal Original_status As String, _ ByVal Original_lastupdate As Global.System.Nullable(Of Date), _ ByVal Original_lastupdatedby As String) As Integer Return Me.Update(station, description, sequence, stype, active, status, lastupdate, lastupdatedby, Original_lineNum, Original_station, Original_description, Original_sequence, Original_stype, Original_active, Original_status, Original_lastupdate, Original_lastupdatedby, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class usersTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "users" tableMapping.ColumnMappings.Add("username", "username") tableMapping.ColumnMappings.Add("password", "password") tableMapping.ColumnMappings.Add("employeeCode", "employeeCode") tableMapping.ColumnMappings.Add("dateJoined", "dateJoined") tableMapping.ColumnMappings.Add("authentication", "authentication") tableMapping.ColumnMappings.Add("active", "active") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[users] WHERE (([username] = @Original_username) AND ((@IsNull_"& _ "password = 1 AND [password] IS NULL) OR ([password] = @Original_password)) AND ("& _ "(@IsNull_employeeCode = 1 AND [employeeCode] IS NULL) OR ([employeeCode] = @Orig"& _ "inal_employeeCode)) AND ((@IsNull_dateJoined = 1 AND [dateJoined] IS NULL) OR (["& _ "dateJoined] = @Original_dateJoined)) AND ((@IsNull_authentication = 1 AND [authe"& _ "ntication] IS NULL) OR ([authentication] = @Original_authentication)) AND ((@IsN"& _ "ull_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_username", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_password", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_password", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_employeeCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_employeeCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dateJoined", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dateJoined", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_authentication", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_authentication", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[users] ([username], [password], [employeeCode], [dateJoined], "& _ "[authentication], [active]) VALUES (@username, @password, @employeeCode, @dateJo"& _ "ined, @authentication, @active);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT username, password, employeeCode, dateJ"& _ "oined, authentication, active FROM users WHERE (username = @username)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@username", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@password", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@employeeCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dateJoined", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@authentication", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[users] SET [username] = @username, [password] = @password, [employe"& _ "eCode] = @employeeCode, [dateJoined] = @dateJoined, [authentication] = @authenti"& _ "cation, [active] = @active WHERE (([username] = @Original_username) AND ((@IsNul"& _ "l_password = 1 AND [password] IS NULL) OR ([password] = @Original_password)) AND"& _ " ((@IsNull_employeeCode = 1 AND [employeeCode] IS NULL) OR ([employeeCode] = @Or"& _ "iginal_employeeCode)) AND ((@IsNull_dateJoined = 1 AND [dateJoined] IS NULL) OR "& _ "([dateJoined] = @Original_dateJoined)) AND ((@IsNull_authentication = 1 AND [aut"& _ "hentication] IS NULL) OR ([authentication] = @Original_authentication)) AND ((@I"& _ "sNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELE"& _ "CT username, password, employeeCode, dateJoined, authentication, active FROM use"& _ "rs WHERE (username = @username)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@username", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@password", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@employeeCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dateJoined", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@authentication", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_username", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_password", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_password", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_employeeCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_employeeCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dateJoined", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dateJoined", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_authentication", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_authentication", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT username, password, employeeCode, dateJoined, authentication, active FROM "& _ "dbo.users" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.usersDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.usersDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.usersDataTable = New EpsonDataSet1.usersDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.usersDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "users") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_username As String, ByVal Original_password As String, ByVal Original_employeeCode As String, ByVal Original_dateJoined As Global.System.Nullable(Of Date), ByVal Original_authentication As String, ByVal Original_active As Global.System.Nullable(Of Integer)) As Integer If (Original_username Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_username") Else Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_username,String) End If If (Original_password Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_password,String) End If If (Original_employeeCode Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_employeeCode,String) End If If (Original_dateJoined.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_dateJoined.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value End If If (Original_authentication Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_authentication,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal username As String, ByVal password As String, ByVal employeeCode As String, ByVal dateJoined As Global.System.Nullable(Of Date), ByVal authentication As String, ByVal active As Global.System.Nullable(Of Integer)) As Integer If (username Is Nothing) Then Throw New Global.System.ArgumentNullException("username") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(username,String) End If If (password Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(password,String) End If If (employeeCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(employeeCode,String) End If If (dateJoined.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(dateJoined.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (authentication Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(authentication,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal username As String, ByVal password As String, ByVal employeeCode As String, ByVal dateJoined As Global.System.Nullable(Of Date), ByVal authentication As String, ByVal active As Global.System.Nullable(Of Integer), ByVal Original_username As String, ByVal Original_password As String, ByVal Original_employeeCode As String, ByVal Original_dateJoined As Global.System.Nullable(Of Date), ByVal Original_authentication As String, ByVal Original_active As Global.System.Nullable(Of Integer)) As Integer If (username Is Nothing) Then Throw New Global.System.ArgumentNullException("username") Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(username,String) End If If (password Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(password,String) End If If (employeeCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(employeeCode,String) End If If (dateJoined.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(dateJoined.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (authentication Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(authentication,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If If (Original_username Is Nothing) Then Throw New Global.System.ArgumentNullException("Original_username") Else Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_username,String) End If If (Original_password Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_password,String) End If If (Original_employeeCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_employeeCode,String) End If If (Original_dateJoined.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_dateJoined.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value End If If (Original_authentication Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_authentication,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal password As String, ByVal employeeCode As String, ByVal dateJoined As Global.System.Nullable(Of Date), ByVal authentication As String, ByVal active As Global.System.Nullable(Of Integer), ByVal Original_username As String, ByVal Original_password As String, ByVal Original_employeeCode As String, ByVal Original_dateJoined As Global.System.Nullable(Of Date), ByVal Original_authentication As String, ByVal Original_active As Global.System.Nullable(Of Integer)) As Integer Return Me.Update(Original_username, password, employeeCode, dateJoined, authentication, active, Original_username, Original_password, Original_employeeCode, Original_dateJoined, Original_authentication, Original_active) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class usersHistTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "usersHist" tableMapping.ColumnMappings.Add("lineNum", "lineNum") tableMapping.ColumnMappings.Add("username", "username") tableMapping.ColumnMappings.Add("password", "password") tableMapping.ColumnMappings.Add("employeeCode", "employeeCode") tableMapping.ColumnMappings.Add("dateJoined", "dateJoined") tableMapping.ColumnMappings.Add("authentication", "authentication") tableMapping.ColumnMappings.Add("active", "active") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.DeleteCommand.Connection = Me.Connection Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[usersHist] WHERE (([lineNum] = @Original_lineNum) AND ((@IsNul"& _ "l_username = 1 AND [username] IS NULL) OR ([username] = @Original_username)) AND"& _ " ((@IsNull_password = 1 AND [password] IS NULL) OR ([password] = @Original_passw"& _ "ord)) AND ((@IsNull_employeeCode = 1 AND [employeeCode] IS NULL) OR ([employeeCo"& _ "de] = @Original_employeeCode)) AND ((@IsNull_dateJoined = 1 AND [dateJoined] IS "& _ "NULL) OR ([dateJoined] = @Original_dateJoined)) AND ((@IsNull_authentication = 1"& _ " AND [authentication] IS NULL) OR ([authentication] = @Original_authentication))"& _ " AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_active)"& _ "))" Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_username", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_username", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_password", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_password", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_employeeCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_employeeCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dateJoined", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dateJoined", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_authentication", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_authentication", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[usersHist] ([username], [password], [employeeCode], [dateJoine"& _ "d], [authentication], [active]) VALUES (@username, @password, @employeeCode, @da"& _ "teJoined, @authentication, @active);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, username, password, employ"& _ "eeCode, dateJoined, authentication, active FROM usersHist WHERE (lineNum = SCOPE"& _ "_IDENTITY())" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@username", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@password", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@employeeCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dateJoined", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@authentication", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.UpdateCommand.Connection = Me.Connection Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[usersHist] SET [username] = @username, [password] = @password, [emp"& _ "loyeeCode] = @employeeCode, [dateJoined] = @dateJoined, [authentication] = @auth"& _ "entication, [active] = @active WHERE (([lineNum] = @Original_lineNum) AND ((@IsN"& _ "ull_username = 1 AND [username] IS NULL) OR ([username] = @Original_username)) A"& _ "ND ((@IsNull_password = 1 AND [password] IS NULL) OR ([password] = @Original_pas"& _ "sword)) AND ((@IsNull_employeeCode = 1 AND [employeeCode] IS NULL) OR ([employee"& _ "Code] = @Original_employeeCode)) AND ((@IsNull_dateJoined = 1 AND [dateJoined] I"& _ "S NULL) OR ([dateJoined] = @Original_dateJoined)) AND ((@IsNull_authentication ="& _ " 1 AND [authentication] IS NULL) OR ([authentication] = @Original_authentication"& _ ")) AND ((@IsNull_active = 1 AND [active] IS NULL) OR ([active] = @Original_activ"& _ "e)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT lineNum, username, password, employeeCode, dateJoined, authenticat"& _ "ion, active FROM usersHist WHERE (lineNum = @lineNum)" Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@username", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@password", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@employeeCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dateJoined", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@authentication", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_lineNum", Global.System.Data.SqlDbType.BigInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_username", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_username", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "username", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_password", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_password", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "password", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_employeeCode", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_employeeCode", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "employeeCode", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_dateJoined", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_dateJoined", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "dateJoined", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_authentication", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_authentication", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "authentication", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_active", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "active", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@lineNum", Global.System.Data.SqlDbType.BigInt, 8, Global.System.Data.ParameterDirection.Input, 0, 0, "lineNum", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT lineNum, username, password, employeeCode, dateJoined, authentication, act"& _ "ive FROM dbo.usersHist" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.usersHistDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.usersHistDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.usersHistDataTable = New EpsonDataSet1.usersHistDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.usersHistDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "usersHist") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Delete(ByVal Original_lineNum As Long, ByVal Original_username As String, ByVal Original_password As String, ByVal Original_employeeCode As String, ByVal Original_dateJoined As Global.System.Nullable(Of Date), ByVal Original_authentication As String, ByVal Original_active As Global.System.Nullable(Of Integer)) As Integer Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_lineNum,Long) If (Original_username Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_username,String) End If If (Original_password Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_password,String) End If If (Original_employeeCode Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_employeeCode,String) End If If (Original_dateJoined.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_dateJoined.Value,Date) Else Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value End If If (Original_authentication Is Nothing) Then Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_authentication,String) End If If (Original_active.HasValue = true) Then Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_active.Value,Integer) Else Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.DeleteCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.DeleteCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Insert(ByVal username As String, ByVal password As String, ByVal employeeCode As String, ByVal dateJoined As Global.System.Nullable(Of Date), ByVal authentication As String, ByVal active As Global.System.Nullable(Of Integer)) As Integer If (username Is Nothing) Then Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(username,String) End If If (password Is Nothing) Then Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(password,String) End If If (employeeCode Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(employeeCode,String) End If If (dateJoined.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(3).Value = CType(dateJoined.Value,Date) Else Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (authentication Is Nothing) Then Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(4).Value = CType(authentication,String) End If If (active.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(active.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal username As String, ByVal password As String, ByVal employeeCode As String, ByVal dateJoined As Global.System.Nullable(Of Date), ByVal authentication As String, ByVal active As Global.System.Nullable(Of Integer), ByVal Original_lineNum As Long, ByVal Original_username As String, ByVal Original_password As String, ByVal Original_employeeCode As String, ByVal Original_dateJoined As Global.System.Nullable(Of Date), ByVal Original_authentication As String, ByVal Original_active As Global.System.Nullable(Of Integer), ByVal lineNum As Long) As Integer If (username Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(0).Value = CType(username,String) End If If (password Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(1).Value = CType(password,String) End If If (employeeCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(2).Value = CType(employeeCode,String) End If If (dateJoined.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(3).Value = CType(dateJoined.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value End If If (authentication Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(4).Value = CType(authentication,String) End If If (active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(5).Value = CType(active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_lineNum,Long) If (Original_username Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_username,String) End If If (Original_password Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_password,String) End If If (Original_employeeCode Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_employeeCode,String) End If If (Original_dateJoined.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_dateJoined.Value,Date) Else Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value End If If (Original_authentication Is Nothing) Then Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value Else Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_authentication,String) End If If (Original_active.HasValue = true) Then Me.Adapter.UpdateCommand.Parameters(17).Value = CType(0,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = CType(Original_active.Value,Integer) Else Me.Adapter.UpdateCommand.Parameters(17).Value = CType(1,Object) Me.Adapter.UpdateCommand.Parameters(18).Value = Global.System.DBNull.Value End If Me.Adapter.UpdateCommand.Parameters(19).Value = CType(lineNum,Long) Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.UpdateCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.UpdateCommand.Connection.Close End If End Try End Function _ Public Overloads Overridable Function Update(ByVal username As String, ByVal password As String, ByVal employeeCode As String, ByVal dateJoined As Global.System.Nullable(Of Date), ByVal authentication As String, ByVal active As Global.System.Nullable(Of Integer), ByVal Original_lineNum As Long, ByVal Original_username As String, ByVal Original_password As String, ByVal Original_employeeCode As String, ByVal Original_dateJoined As Global.System.Nullable(Of Date), ByVal Original_authentication As String, ByVal Original_active As Global.System.Nullable(Of Integer)) As Integer Return Me.Update(username, password, employeeCode, dateJoined, authentication, active, Original_lineNum, Original_username, Original_password, Original_employeeCode, Original_dateJoined, Original_authentication, Original_active, Original_lineNum) End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class WIP_TEMPTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "WIP_TEMP" tableMapping.ColumnMappings.Add("modelno", "modelno") tableMapping.ColumnMappings.Add("station", "station") tableMapping.ColumnMappings.Add("previous", "previous") tableMapping.ColumnMappings.Add("description", "description") tableMapping.ColumnMappings.Add("WIP", "WIP") tableMapping.ColumnMappings.Add("date", "date") Me._adapter.TableMappings.Add(tableMapping) Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() Me._adapter.InsertCommand.Connection = Me.Connection Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[WIP_TEMP] ([modelno], [station], [previous], [description], [W"& _ "IP], [date]) VALUES (@modelno, @station, @previous, @description, @WIP, @date)" Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelno", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "modelno", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "station", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@previous", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "previous", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@description", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "description", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@WIP", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "WIP", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@date", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "date", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT modelno, station, previous, description, WIP, date FROM dbo.WIP_TEMP" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.WIP_TEMPDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.WIP_TEMPDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.WIP_TEMPDataTable = New EpsonDataSet1.WIP_TEMPDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function _ Public Overloads Overridable Function Update(ByVal dataTable As EpsonDataSet1.WIP_TEMPDataTable) As Integer Return Me.Adapter.Update(dataTable) End Function _ Public Overloads Overridable Function Update(ByVal dataSet As EpsonDataSet1) As Integer Return Me.Adapter.Update(dataSet, "WIP_TEMP") End Function _ Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) End Function _ Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer Return Me.Adapter.Update(dataRows) End Function _ Public Overloads Overridable Function Insert(ByVal modelno As String, ByVal station As String, ByVal previous As String, ByVal description As String, ByVal WIP As Global.System.Nullable(Of Integer), ByVal _date As Global.System.Nullable(Of Date)) As Integer If (modelno Is Nothing) Then Throw New Global.System.ArgumentNullException("modelno") Else Me.Adapter.InsertCommand.Parameters(0).Value = CType(modelno,String) End If If (station Is Nothing) Then Throw New Global.System.ArgumentNullException("station") Else Me.Adapter.InsertCommand.Parameters(1).Value = CType(station,String) End If If (previous Is Nothing) Then Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(2).Value = CType(previous,String) End If If (description Is Nothing) Then Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.InsertCommand.Parameters(3).Value = CType(description,String) End If If (WIP.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(4).Value = CType(WIP.Value,Integer) Else Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value End If If (_date.HasValue = true) Then Me.Adapter.InsertCommand.Parameters(5).Value = CType(_date.Value,Date) Else Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then Me.Adapter.InsertCommand.Connection.Open End If Try Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery Return returnValue Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then Me.Adapter.InsertCommand.Connection.Close End If End Try End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class CTSB9_00001TableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "CTSB9-00001" tableMapping.ColumnMappings.Add("ModuleAndFeeder", "ModuleAndFeeder") tableMapping.ColumnMappings.Add("PartNo", "PartNo") tableMapping.ColumnMappings.Add("Lot", "Lot") tableMapping.ColumnMappings.Add("Location", "Location") tableMapping.ColumnMappings.Add("DateAndTimeMounted", "DateAndTimeMounted") tableMapping.ColumnMappings.Add("Operator", "Operator") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT ModuleAndFeeder, PartNo, Lot, Location, DateAndTimeMounted, Operator FROM "& _ "dbo.[CTSB9-00001]" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1._CTSB9_00001DataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1._CTSB9_00001DataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1._CTSB9_00001DataTable = New EpsonDataSet1._CTSB9_00001DataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class CTSB9_00002TableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "CTSB9-00002" tableMapping.ColumnMappings.Add("ModuleAndFeeder", "ModuleAndFeeder") tableMapping.ColumnMappings.Add("PartNo", "PartNo") tableMapping.ColumnMappings.Add("Lot", "Lot") tableMapping.ColumnMappings.Add("Location", "Location") tableMapping.ColumnMappings.Add("DateAndTimeMounted", "DateAndTimeMounted") tableMapping.ColumnMappings.Add("Operator", "Operator") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT ModuleAndFeeder, PartNo, Lot, Location, DateAndTimeMounted, Operator FROM "& _ "dbo.[CTSB9-00002]" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1._CTSB9_00002DataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1._CTSB9_00002DataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1._CTSB9_00002DataTable = New EpsonDataSet1._CTSB9_00002DataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class getMaxDateTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT serialno, lastupdate FROM dbo.getMaxDate" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.getMaxDateDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.getMaxDateDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.getMaxDateDataTable = New EpsonDataSet1.getMaxDateDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class getMinDateTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT serialno, lastupdate FROM dbo.getMinDate" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.getMinDateDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.getMinDateDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.getMinDateDataTable = New EpsonDataSet1.getMinDateDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class Shipper_FileTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "Shipper_File" tableMapping.ColumnMappings.Add("shipno", "shipno") tableMapping.ColumnMappings.Add("shipDate", "shipDate") tableMapping.ColumnMappings.Add("shipVia", "shipVia") tableMapping.ColumnMappings.Add("shipto", "shipto") tableMapping.ColumnMappings.Add("sipAdd1", "sipAdd1") tableMapping.ColumnMappings.Add("shipAdd2", "shipAdd2") tableMapping.ColumnMappings.Add("shipAdd3", "shipAdd3") tableMapping.ColumnMappings.Add("city", "city") tableMapping.ColumnMappings.Add("state", "state") tableMapping.ColumnMappings.Add("postalCode", "postalCode") tableMapping.ColumnMappings.Add("countryCode", "countryCode") tableMapping.ColumnMappings.Add("cnNo", "cnNo") tableMapping.ColumnMappings.Add("layer", "layer") tableMapping.ColumnMappings.Add("dimension", "dimension") tableMapping.ColumnMappings.Add("serialno", "serialno") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("model", "model") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT shipno, shipDate, shipVia, shipto, sipAdd1, shipAdd2, shipAdd3, city, stat"& _ "e, postalCode, countryCode, cnNo, layer, dimension, serialno, poLine, model FROM"& _ " dbo.Shipper_File" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.Shipper_FileDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.Shipper_FileDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.Shipper_FileDataTable = New EpsonDataSet1.Shipper_FileDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class Shipper_File_BodyTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "Shipper_File_Body" tableMapping.ColumnMappings.Add("POLine", "POLine") tableMapping.ColumnMappings.Add("modelDesc1", "modelDesc1") tableMapping.ColumnMappings.Add("CustPO", "CustPO") tableMapping.ColumnMappings.Add("Flag3", "Flag3") tableMapping.ColumnMappings.Add("model", "model") tableMapping.ColumnMappings.Add("CustPart", "CustPart") tableMapping.ColumnMappings.Add("serialno", "serialno") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT POLine, modelDesc1, CustPO, Flag3, model, CustPart, serialno FROM dbo.Ship"& _ "per_File_Body" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.Shipper_File_BodyDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.Shipper_File_BodyDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.Shipper_File_BodyDataTable = New EpsonDataSet1.Shipper_File_BodyDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class Shipper_File_HeaderTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "Shipper_File_Header" tableMapping.ColumnMappings.Add("shipno", "shipno") tableMapping.ColumnMappings.Add("shipDate", "shipDate") tableMapping.ColumnMappings.Add("shipVia", "shipVia") tableMapping.ColumnMappings.Add("shipto", "shipto") tableMapping.ColumnMappings.Add("sipAdd1", "sipAdd1") tableMapping.ColumnMappings.Add("shipAdd2", "shipAdd2") tableMapping.ColumnMappings.Add("shipAdd3", "shipAdd3") tableMapping.ColumnMappings.Add("ZIP", "ZIP") tableMapping.ColumnMappings.Add("countryCode", "countryCode") tableMapping.ColumnMappings.Add("cnNo", "cnNo") tableMapping.ColumnMappings.Add("layer", "layer") tableMapping.ColumnMappings.Add("dimension", "dimension") tableMapping.ColumnMappings.Add("poLine", "poLine") tableMapping.ColumnMappings.Add("model", "model") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "SELECT shipno, shipDate, shipVia, shipto, sipAdd1, shipAdd2, shipAdd3, ZIP, count"& _ "ryCode, cnNo, layer, dimension, poLine, model FROM dbo.Shipper_File_Header" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.Shipper_File_HeaderDataTable) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData() As EpsonDataSet1.Shipper_File_HeaderDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) Dim dataTable As EpsonDataSet1.Shipper_File_HeaderDataTable = New EpsonDataSet1.Shipper_File_HeaderDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class containerTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "container" tableMapping.ColumnMappings.Add("Column1", "Column1") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.container" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.containerDataTable, ByVal shipNumber As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal shipNumber As String) As EpsonDataSet1.containerDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If Dim dataTable As EpsonDataSet1.containerDataTable = New EpsonDataSet1.containerDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class createViewTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "createView" tableMapping.ColumnMappings.Add("ModuleAndFeeder", "ModuleAndFeeder") tableMapping.ColumnMappings.Add("PartNo", "PartNo") tableMapping.ColumnMappings.Add("Lot", "Lot") tableMapping.ColumnMappings.Add("Location", "Location") tableMapping.ColumnMappings.Add("DateAndTimeMounted", "DateAndTimeMounted") tableMapping.ColumnMappings.Add("Operator", "Operator") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.createView" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@KSEQUENCENO", Global.System.Data.SqlDbType.VarChar, 2147483647, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.createViewDataTable, ByVal KSEQUENCENO As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (KSEQUENCENO Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(KSEQUENCENO,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal KSEQUENCENO As String) As EpsonDataSet1.createViewDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (KSEQUENCENO Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(KSEQUENCENO,String) End If Dim dataTable As EpsonDataSet1.createViewDataTable = New EpsonDataSet1.createViewDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class itemTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "item" tableMapping.ColumnMappings.Add("Column1", "Column1") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.item" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.itemDataTable, ByVal shipNumber As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal shipNumber As String) As EpsonDataSet1.itemDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If Dim dataTable As EpsonDataSet1.itemDataTable = New EpsonDataSet1.itemDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class POTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "PO" tableMapping.ColumnMappings.Add("Column1", "Column1") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.PO" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.PODataTable, ByVal shipNumber As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal shipNumber As String) As EpsonDataSet1.PODataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If Dim dataTable As EpsonDataSet1.PODataTable = New EpsonDataSet1.PODataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class POLINETableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "POLINE" tableMapping.ColumnMappings.Add("Column1", "Column1") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.POLINE" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.POLINEDataTable, ByVal shipNumber As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal shipNumber As String) As EpsonDataSet1.POLINEDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If Dim dataTable As EpsonDataSet1.POLINEDataTable = New EpsonDataSet1.POLINEDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class shipAdd1TableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "shipAdd1" tableMapping.ColumnMappings.Add("Column1", "Column1") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.shipAdd1" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.shipAdd1DataTable, ByVal shipNumber As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal shipNumber As String) As EpsonDataSet1.shipAdd1DataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If Dim dataTable As EpsonDataSet1.shipAdd1DataTable = New EpsonDataSet1.shipAdd1DataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class shipAdd2TableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "shipAdd2" tableMapping.ColumnMappings.Add("Column1", "Column1") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.shipAdd2" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.shipAdd2DataTable, ByVal shipNumber As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal shipNumber As String) As EpsonDataSet1.shipAdd2DataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If Dim dataTable As EpsonDataSet1.shipAdd2DataTable = New EpsonDataSet1.shipAdd2DataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class shipAdd3TableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "shipAdd3" tableMapping.ColumnMappings.Add("Column1", "Column1") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.shipAdd3" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.shipAdd3DataTable, ByVal shipNumber As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal shipNumber As String) As EpsonDataSet1.shipAdd3DataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (shipNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(shipNumber,String) End If Dim dataTable As EpsonDataSet1.shipAdd3DataTable = New EpsonDataSet1.shipAdd3DataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class validatePOTransferTableAdapter Inherits Global.System.ComponentModel.Component Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter Private _connection As Global.System.Data.SqlClient.SqlConnection Private _transaction As Global.System.Data.SqlClient.SqlTransaction Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand Private _clearBeforeFill As Boolean _ Public Sub New() MyBase.New Me.ClearBeforeFill = true End Sub _ Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter Get If (Me._adapter Is Nothing) Then Me.InitAdapter End If Return Me._adapter End Get End Property _ Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection Get If (Me._connection Is Nothing) Then Me.InitConnection End If Return Me._connection End Get Set Me._connection = value If (Not (Me.Adapter.InsertCommand) Is Nothing) Then Me.Adapter.InsertCommand.Connection = value End If If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then Me.Adapter.DeleteCommand.Connection = value End If If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then Me.Adapter.UpdateCommand.Connection = value End If Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) If (Not (Me.CommandCollection(i)) Is Nothing) Then CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value End If i = (i + 1) Loop End Set End Property _ Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction Get Return Me._transaction End Get Set Me._transaction = value Dim i As Integer = 0 Do While (i < Me.CommandCollection.Length) Me.CommandCollection(i).Transaction = Me._transaction i = (i + 1) Loop If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then Me.Adapter.DeleteCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then Me.Adapter.InsertCommand.Transaction = Me._transaction End If If ((Not (Me.Adapter) Is Nothing) _ AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then Me.Adapter.UpdateCommand.Transaction = Me._transaction End If End Set End Property _ Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Public Property ClearBeforeFill() As Boolean Get Return Me._clearBeforeFill End Get Set Me._clearBeforeFill = value End Set End Property _ Private Sub InitAdapter() Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() tableMapping.SourceTable = "Table" tableMapping.DataSetTable = "validatePOTransfer" tableMapping.ColumnMappings.Add("partOldPo", "partOldPo") tableMapping.ColumnMappings.Add("partNewPo", "partNewPo") tableMapping.ColumnMappings.Add("countOldPO", "countOldPO") tableMapping.ColumnMappings.Add("openNewPo", "openNewPo") Me._adapter.TableMappings.Add(tableMapping) End Sub _ Private Sub InitConnection() Me._connection = New Global.System.Data.SqlClient.SqlConnection() Me._connection.ConnectionString = Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString End Sub _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(0).Connection = Me.Connection Me._commandCollection(0).CommandText = "dbo.validatePOTransfer" Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@oldPoNumber", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@oldPoLine", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@newPoNumber", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@newPoLine", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function Fill(ByVal dataTable As EpsonDataSet1.validatePOTransferDataTable, ByVal oldPoNumber As String, ByVal oldPoLine As String, ByVal newPoNumber As String, ByVal newPoLine As String) As Integer Me.Adapter.SelectCommand = Me.CommandCollection(0) If (oldPoNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(oldPoNumber,String) End If If (oldPoLine Is Nothing) Then Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(2).Value = CType(oldPoLine,String) End If If (newPoNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(3).Value = CType(newPoNumber,String) End If If (newPoLine Is Nothing) Then Me.Adapter.SelectCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(4).Value = CType(newPoLine,String) End If If (Me.ClearBeforeFill = true) Then dataTable.Clear End If Dim returnValue As Integer = Me.Adapter.Fill(dataTable) Return returnValue End Function _ Public Overloads Overridable Function GetData(ByVal oldPoNumber As String, ByVal oldPoLine As String, ByVal newPoNumber As String, ByVal newPoLine As String) As EpsonDataSet1.validatePOTransferDataTable Me.Adapter.SelectCommand = Me.CommandCollection(0) If (oldPoNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(1).Value = CType(oldPoNumber,String) End If If (oldPoLine Is Nothing) Then Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(2).Value = CType(oldPoLine,String) End If If (newPoNumber Is Nothing) Then Me.Adapter.SelectCommand.Parameters(3).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(3).Value = CType(newPoNumber,String) End If If (newPoLine Is Nothing) Then Me.Adapter.SelectCommand.Parameters(4).Value = Global.System.DBNull.Value Else Me.Adapter.SelectCommand.Parameters(4).Value = CType(newPoLine,String) End If Dim dataTable As EpsonDataSet1.validatePOTransferDataTable = New EpsonDataSet1.validatePOTransferDataTable() Me.Adapter.Fill(dataTable) Return dataTable End Function End Class ''' '''Represents the connection and commands used to retrieve and save data. ''' _ Partial Public Class QueriesTableAdapter Inherits Global.System.ComponentModel.Component Private _commandCollection() As Global.System.Data.IDbCommand _ Protected ReadOnly Property CommandCollection() As Global.System.Data.IDbCommand() Get If (Me._commandCollection Is Nothing) Then Me.InitCommandCollection End If Return Me._commandCollection End Get End Property _ Private Sub InitCommandCollection() Me._commandCollection = New Global.System.Data.IDbCommand(26) {} Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.AeroMacEnd_Procedure" CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@MacEndInput", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.AeroMacRange" CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@MacStartInput", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@MacEndInput", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@i", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.AeroMacStart_Procedure" CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@MacStartInput", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(3) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(3),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(3),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.AeroModel_Procedure" CType(Me._commandCollection(3),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(3),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(3),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@AeroFamily", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(4) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(4),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(4),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.ARS_FAR" CType(Me._commandCollection(4),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(4),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(4),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dateStart", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(4),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dateEnd", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(4),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@choice", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(5) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(5),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(5),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.ARS_WIP" CType(Me._commandCollection(5),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(5),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(5),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dateStart", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(5),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@dateEnd", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(6) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(6),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(6),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.batchYield" CType(Me._commandCollection(6),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(6),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(6),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 200, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(7) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(7),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(7),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.buybackPOLine" CType(Me._commandCollection(7),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(7),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(7),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(7),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.NVarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(8) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(8),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(8),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.CancelledShipper" CType(Me._commandCollection(8),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(8),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(8),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@shipNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(9) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(9),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(9),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.DorinaWIP" CType(Me._commandCollection(9),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(9),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(10) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(10),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(10),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.FPY" CType(Me._commandCollection(10),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(10),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(10),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(11) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(11),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(11),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.FTY" CType(Me._commandCollection(11),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(11),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(11),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(12) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(12),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(12),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.packingInfo" CType(Me._commandCollection(12),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(12),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(12),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialno", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(13) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(13),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(13),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.po_update" CType(Me._commandCollection(13),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(13),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(14) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(14),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(14),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.prodOutput" CType(Me._commandCollection(14),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(14),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(14),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@start", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(14),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@end", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(14),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@station", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(15) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(15),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(15),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.prodOutputDorina" CType(Me._commandCollection(15),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(15),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(15),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@start", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(15),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@end", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(16) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(16),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(16),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.repairDetails" CType(Me._commandCollection(16),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(16),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(16),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(17) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(17),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(17),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.repairDetailsPerDate" CType(Me._commandCollection(17),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(17),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(17),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StartDate", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(17),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EndDate", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(18) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(18),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(18),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.SHIPPER_REPORT" CType(Me._commandCollection(18),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(18),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(18),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Shipper", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(18),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Container", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(19) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(19),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(19),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.SHIPPER_SUMMARY" CType(Me._commandCollection(19),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(19),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(19),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Shipper", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(20) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(20),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(20),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.transferPOLine" CType(Me._commandCollection(20),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(20),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(20),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(20),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.NVarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(20),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@newPoNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(20),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@newPoLine", Global.System.Data.SqlDbType.NVarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(21) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(21),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(21),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.unpackPO" CType(Me._commandCollection(21),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(21),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(21),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(22) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(22),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(22),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.unpackPOLine" CType(Me._commandCollection(22),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(22),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(22),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poNumber", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(22),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@poLine", Global.System.Data.SqlDbType.NVarChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(23) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(23),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(23),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.WIP" CType(Me._commandCollection(23),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(23),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(24) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(24),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(24),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.WIPperFamily" CType(Me._commandCollection(24),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(24),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(24),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@modelFamily", Global.System.Data.SqlDbType.VarChar, 200, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(25) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(25),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(25),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.yield" CType(Me._commandCollection(25),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(25),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(25),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@batchno", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) Me._commandCollection(26) = New Global.System.Data.SqlClient.SqlCommand() CType(Me._commandCollection(26),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.Mounting_Sequence.My.MySettings.Default.EpsonConnectionString) CType(Me._commandCollection(26),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.getDANumber" CType(Me._commandCollection(26),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure CType(Me._commandCollection(26),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.ReturnValue, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) CType(Me._commandCollection(26),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@serialNo", Global.System.Data.SqlDbType.VarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) End Sub _ Public Overloads Overridable Function AeroMacEnd_Procedure(ByVal MacEndInput As Global.System.Nullable(Of Integer)) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(0),Global.System.Data.SqlClient.SqlCommand) If (MacEndInput.HasValue = true) Then command.Parameters(1).Value = CType(MacEndInput.Value,Integer) Else command.Parameters(1).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function AeroMacRange(ByVal MacStartInput As Global.System.Nullable(Of Integer), ByVal MacEndInput As Global.System.Nullable(Of Integer), ByVal i As Global.System.Nullable(Of Integer)) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(1),Global.System.Data.SqlClient.SqlCommand) If (MacStartInput.HasValue = true) Then command.Parameters(1).Value = CType(MacStartInput.Value,Integer) Else command.Parameters(1).Value = Global.System.DBNull.Value End If If (MacEndInput.HasValue = true) Then command.Parameters(2).Value = CType(MacEndInput.Value,Integer) Else command.Parameters(2).Value = Global.System.DBNull.Value End If If (i.HasValue = true) Then command.Parameters(3).Value = CType(i.Value,Integer) Else command.Parameters(3).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function AeroMacStart_Procedure(ByVal MacStartInput As Global.System.Nullable(Of Integer)) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(2),Global.System.Data.SqlClient.SqlCommand) If (MacStartInput.HasValue = true) Then command.Parameters(1).Value = CType(MacStartInput.Value,Integer) Else command.Parameters(1).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function AeroModel_Procedure(ByVal AeroFamily As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(3),Global.System.Data.SqlClient.SqlCommand) If (AeroFamily Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(AeroFamily,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function ARS_FAR(ByVal dateStart As Global.System.Nullable(Of Date), ByVal dateEnd As Global.System.Nullable(Of Date), ByVal choice As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(4),Global.System.Data.SqlClient.SqlCommand) If (dateStart.HasValue = true) Then command.Parameters(1).Value = CType(dateStart.Value,Date) Else command.Parameters(1).Value = Global.System.DBNull.Value End If If (dateEnd.HasValue = true) Then command.Parameters(2).Value = CType(dateEnd.Value,Date) Else command.Parameters(2).Value = Global.System.DBNull.Value End If If (choice Is Nothing) Then command.Parameters(3).Value = Global.System.DBNull.Value Else command.Parameters(3).Value = CType(choice,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function ARS_WIP(ByVal dateStart As Global.System.Nullable(Of Date), ByVal dateEnd As Global.System.Nullable(Of Date)) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(5),Global.System.Data.SqlClient.SqlCommand) If (dateStart.HasValue = true) Then command.Parameters(1).Value = CType(dateStart.Value,Date) Else command.Parameters(1).Value = Global.System.DBNull.Value End If If (dateEnd.HasValue = true) Then command.Parameters(2).Value = CType(dateEnd.Value,Date) Else command.Parameters(2).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function batchYield(ByVal batchno As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(6),Global.System.Data.SqlClient.SqlCommand) If (batchno Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(batchno,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function buybackPOLine(ByVal poNumber As String, ByVal poLine As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(7),Global.System.Data.SqlClient.SqlCommand) If (poNumber Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(poNumber,String) End If If (poLine Is Nothing) Then command.Parameters(2).Value = Global.System.DBNull.Value Else command.Parameters(2).Value = CType(poLine,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function CancelledShipper(ByVal shipNumber As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(8),Global.System.Data.SqlClient.SqlCommand) If (shipNumber Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(shipNumber,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function DorinaWIP() As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(9),Global.System.Data.SqlClient.SqlCommand) Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function FPY(ByVal batchno As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(10),Global.System.Data.SqlClient.SqlCommand) If (batchno Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(batchno,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function FTY(ByVal batchno As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(11),Global.System.Data.SqlClient.SqlCommand) If (batchno Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(batchno,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function packingInfo(ByVal serialno As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(12),Global.System.Data.SqlClient.SqlCommand) If (serialno Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(serialno,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function po_update() As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(13),Global.System.Data.SqlClient.SqlCommand) Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function prodOutput(ByVal start As Global.System.Nullable(Of Date), ByVal _end As Global.System.Nullable(Of Date), ByVal station As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(14),Global.System.Data.SqlClient.SqlCommand) If (start.HasValue = true) Then command.Parameters(1).Value = CType(start.Value,Date) Else command.Parameters(1).Value = Global.System.DBNull.Value End If If (_end.HasValue = true) Then command.Parameters(2).Value = CType(_end.Value,Date) Else command.Parameters(2).Value = Global.System.DBNull.Value End If If (station Is Nothing) Then command.Parameters(3).Value = Global.System.DBNull.Value Else command.Parameters(3).Value = CType(station,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function prodOutputDorina(ByVal start As Global.System.Nullable(Of Date), ByVal _end As Global.System.Nullable(Of Date)) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(15),Global.System.Data.SqlClient.SqlCommand) If (start.HasValue = true) Then command.Parameters(1).Value = CType(start.Value,Date) Else command.Parameters(1).Value = Global.System.DBNull.Value End If If (_end.HasValue = true) Then command.Parameters(2).Value = CType(_end.Value,Date) Else command.Parameters(2).Value = Global.System.DBNull.Value End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function repairDetails(ByVal batchno As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(16),Global.System.Data.SqlClient.SqlCommand) If (batchno Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(batchno,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function repairDetailsPerDate(ByVal StartDate As String, ByVal EndDate As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(17),Global.System.Data.SqlClient.SqlCommand) If (StartDate Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(StartDate,String) End If If (EndDate Is Nothing) Then command.Parameters(2).Value = Global.System.DBNull.Value Else command.Parameters(2).Value = CType(EndDate,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function SHIPPER_REPORT(ByVal Shipper As String, ByVal Container As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(18),Global.System.Data.SqlClient.SqlCommand) If (Shipper Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(Shipper,String) End If If (Container Is Nothing) Then command.Parameters(2).Value = Global.System.DBNull.Value Else command.Parameters(2).Value = CType(Container,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function SHIPPER_SUMMARY(ByVal Shipper As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(19),Global.System.Data.SqlClient.SqlCommand) If (Shipper Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(Shipper,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function transferPOLine(ByVal poNumber As String, ByVal poLine As String, ByVal newPoNumber As String, ByVal newPoLine As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(20),Global.System.Data.SqlClient.SqlCommand) If (poNumber Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(poNumber,String) End If If (poLine Is Nothing) Then command.Parameters(2).Value = Global.System.DBNull.Value Else command.Parameters(2).Value = CType(poLine,String) End If If (newPoNumber Is Nothing) Then command.Parameters(3).Value = Global.System.DBNull.Value Else command.Parameters(3).Value = CType(newPoNumber,String) End If If (newPoLine Is Nothing) Then command.Parameters(4).Value = Global.System.DBNull.Value Else command.Parameters(4).Value = CType(newPoLine,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function unpackPO(ByVal poNumber As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(21),Global.System.Data.SqlClient.SqlCommand) If (poNumber Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(poNumber,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function unpackPOLine(ByVal poNumber As String, ByVal poLine As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(22),Global.System.Data.SqlClient.SqlCommand) If (poNumber Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(poNumber,String) End If If (poLine Is Nothing) Then command.Parameters(2).Value = Global.System.DBNull.Value Else command.Parameters(2).Value = CType(poLine,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function WIP() As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(23),Global.System.Data.SqlClient.SqlCommand) Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function WIPperFamily(ByVal modelFamily As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(24),Global.System.Data.SqlClient.SqlCommand) If (modelFamily Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(modelFamily,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function yield(ByVal batchno As String) As Integer Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(25),Global.System.Data.SqlClient.SqlCommand) If (batchno Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(batchno,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Dim returnValue As Integer Try returnValue = command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try Return returnValue End Function _ Public Overloads Overridable Function getDANumber(ByVal serialNo As String) As String Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(26),Global.System.Data.SqlClient.SqlCommand) If (serialNo Is Nothing) Then command.Parameters(1).Value = Global.System.DBNull.Value Else command.Parameters(1).Value = CType(serialNo,String) End If Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _ <> Global.System.Data.ConnectionState.Open) Then command.Connection.Open End If Try command.ExecuteNonQuery Finally If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then command.Connection.Close End If End Try If ((command.Parameters(0).Value Is Nothing) _ OrElse (command.Parameters(0).Value.GetType Is GetType(Global.System.DBNull))) Then Return Nothing Else Return CType(command.Parameters(0).Value,String) End If End Function End Class ''' '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios ''' _ Partial Public Class TableAdapterManager Inherits Global.System.ComponentModel.Component Private _updateOrder As UpdateOrderOption Private _aOIQ_TempTableAdapter As AOIQ_TempTableAdapter Private _batchTableAdapter As batchTableAdapter Private _cardTableAdapter As cardTableAdapter Private _card_backupTableAdapter As card_backupTableAdapter Private _card_HistTableAdapter As card_HistTableAdapter Private _cardHistTableAdapter As cardHistTableAdapter Private _component_partsTableAdapter As component_partsTableAdapter Private _cTSTableAdapter As CTSTableAdapter Private _defectCatProdTableAdapter As defectCatProdTableAdapter Private _defectCatProdHistTableAdapter As defectCatProdHistTableAdapter Private _defectCatQCTableAdapter As defectCatQCTableAdapter Private _defectCatQCHistTableAdapter As defectCatQCHistTableAdapter Private _defectProdTableAdapter As defectProdTableAdapter Private _defectProdHistTableAdapter As defectProdHistTableAdapter Private _defectQCTableAdapter As defectQCTableAdapter Private _defectQCHistTableAdapter As defectQCHistTableAdapter Private _fA_NewPTTableAdapter As FA_NewPTTableAdapter Private _faNoTableAdapter As faNoTableAdapter Private _kITTINGTableAdapter As KITTINGTableAdapter Private _kMOUNTINGTableAdapter As KMOUNTINGTableAdapter Private _kSEQUENCE_DETAILTableAdapter As KSEQUENCE_DETAILTableAdapter Private _kSEQUENCE_HEADERTableAdapter As KSEQUENCE_HEADERTableAdapter Private _kSETTINGSTableAdapter As KSETTINGSTableAdapter Private _labelDefTableAdapter As LabelDefTableAdapter Private _labelDefHistTableAdapter As LabelDefHistTableAdapter Private _log_actionTableAdapter As log_actionTableAdapter Private _log_alvarion_serialTableAdapter As log_alvarion_serialTableAdapter Private _log_ATE_errorTableAdapter As log_ATE_errorTableAdapter Private _log_BL_DetailTableAdapter As log_BL_DetailTableAdapter Private _log_BL_Detail_HistTableAdapter As log_BL_Detail_HistTableAdapter Private _log_BL_HeaderTableAdapter As log_BL_HeaderTableAdapter Private _log_BL_Header_HistTableAdapter As log_BL_Header_HistTableAdapter Private _log_CAPATableAdapter As log_CAPATableAdapter Private _log_cardTableAdapter As log_cardTableAdapter Private _log_CT_DetailTableAdapter As log_CT_DetailTableAdapter Private _log_CT_Detail_HistTableAdapter As log_CT_Detail_HistTableAdapter Private _log_CT_HeaderTableAdapter As log_CT_HeaderTableAdapter Private _log_CT_Header_HistTableAdapter As log_CT_Header_HistTableAdapter Private _log_ct_header_tempTableAdapter As log_ct_header_tempTableAdapter Private _log_DATableAdapter As log_DATableAdapter Private _log_labelTableAdapter As log_labelTableAdapter Private _log_labelHistTableAdapter As log_labelHistTableAdapter Private _log_linkTableAdapter As log_linkTableAdapter Private _log_linkHistTableAdapter As log_linkHistTableAdapter Private _log_lotTableAdapter As log_lotTableAdapter Private _log_passTableAdapter As log_passTableAdapter Private _log_pass_serialTableAdapter As log_pass_serialTableAdapter Private _log_PreTest_DetailTableAdapter As log_PreTest_DetailTableAdapter Private _log_repairTableAdapter As log_repairTableAdapter Private _log_repair_faTableAdapter As log_repair_faTableAdapter Private _log_repair_serialTableAdapter As log_repair_serialTableAdapter Private _log_serialTableAdapter As log_serialTableAdapter Private _log_SH_DetailTableAdapter As log_SH_DetailTableAdapter Private _log_SH_Detail_HistTableAdapter As log_SH_Detail_HistTableAdapter Private _log_SH_HeaderTableAdapter As log_SH_HeaderTableAdapter Private _log_SH_Header_HistTableAdapter As log_SH_Header_HistTableAdapter Private _lotNoTableAdapter As lotNoTableAdapter Private _lotNumberTableAdapter As LotNumberTableAdapter Private _machineTableAdapter As machineTableAdapter Private _machineHistTableAdapter As machineHistTableAdapter Private _modelTableAdapter As modelTableAdapter Private _modelBackupTableAdapter As modelBackupTableAdapter Private _modelDimTableAdapter As modelDimTableAdapter Private _modelDimHistTableAdapter As modelDimHistTableAdapter Private _modelFamilyTableAdapter As modelFamilyTableAdapter Private _modelFamilyHistTableAdapter As modelFamilyHistTableAdapter Private _modelHierarchyTableAdapter As modelHierarchyTableAdapter Private _modelHierarchyHistTableAdapter As modelHierarchyHistTableAdapter Private _modelHistTableAdapter As modelHistTableAdapter Private _modelRouteTableAdapter As modelRouteTableAdapter Private _modelRoute_backup_1TableAdapter As modelRoute_backup_1TableAdapter Private _modelRouteHistTableAdapter As modelRouteHistTableAdapter Private _modelTempTableAdapter As modelTempTableAdapter Private _modelTypeTableAdapter As modelTypeTableAdapter Private _modelTypeHistTableAdapter As modelTypeHistTableAdapter Private _parts_ListTableAdapter As Parts_ListTableAdapter Private _partsCodeTableAdapter As partsCodeTableAdapter Private _partsModelTableAdapter As PartsModelTableAdapter Private _partsPrepTableAdapter As PartsPrepTableAdapter Private _partsRecordsTableAdapter As PartsRecordsTableAdapter Private _partsStationTableAdapter As partsStationTableAdapter Private _partsSupplierTableAdapter As partsSupplierTableAdapter Private _po_detailTableAdapter As po_detailTableAdapter Private _po_detail_backupTableAdapter As po_detail_backupTableAdapter Private _po_detail_tempTableAdapter As po_detail_tempTableAdapter Private _po_headerTableAdapter As po_headerTableAdapter Private _po_header_backupTableAdapter As po_header_backupTableAdapter Private _po_history_detailTableAdapter As po_history_detailTableAdapter Private _po_orig_detailTableAdapter As po_orig_detailTableAdapter Private _po_orig_headerTableAdapter As po_orig_headerTableAdapter Private _printerTableAdapter As printerTableAdapter Private _ptTableAdapter As ptTableAdapter Private _pt_HistTableAdapter As pt_HistTableAdapter Private _serialAlvarisetTableAdapter As serialAlvarisetTableAdapter Private _serialMacTableAdapter As serialMacTableAdapter Private _sHIPPER_REPORT_TABLETableAdapter As SHIPPER_REPORT_TABLETableAdapter Private _sHIPPER_STATUSTableAdapter As SHIPPER_STATUSTableAdapter Private _sHIPPER_SUMMARY_TABLETableAdapter As SHIPPER_SUMMARY_TABLETableAdapter Private _stationTableAdapter As stationTableAdapter Private _station_convertTableAdapter As station_convertTableAdapter Private _stationHistTableAdapter As stationHistTableAdapter Private _usersTableAdapter As usersTableAdapter Private _usersHistTableAdapter As usersHistTableAdapter Private _wIP_TEMPTableAdapter As WIP_TEMPTableAdapter Private _backupDataSetBeforeUpdate As Boolean Private _connection As Global.System.Data.IDbConnection _ Public Property UpdateOrder() As UpdateOrderOption Get Return Me._updateOrder End Get Set Me._updateOrder = value End Set End Property _ Public Property AOIQ_TempTableAdapter() As AOIQ_TempTableAdapter Get Return Me._aOIQ_TempTableAdapter End Get Set Me._aOIQ_TempTableAdapter = value End Set End Property _ Public Property batchTableAdapter() As batchTableAdapter Get Return Me._batchTableAdapter End Get Set Me._batchTableAdapter = value End Set End Property _ Public Property cardTableAdapter() As cardTableAdapter Get Return Me._cardTableAdapter End Get Set Me._cardTableAdapter = value End Set End Property _ Public Property card_backupTableAdapter() As card_backupTableAdapter Get Return Me._card_backupTableAdapter End Get Set Me._card_backupTableAdapter = value End Set End Property _ Public Property card_HistTableAdapter() As card_HistTableAdapter Get Return Me._card_HistTableAdapter End Get Set Me._card_HistTableAdapter = value End Set End Property _ Public Property cardHistTableAdapter() As cardHistTableAdapter Get Return Me._cardHistTableAdapter End Get Set Me._cardHistTableAdapter = value End Set End Property _ Public Property component_partsTableAdapter() As component_partsTableAdapter Get Return Me._component_partsTableAdapter End Get Set Me._component_partsTableAdapter = value End Set End Property _ Public Property CTSTableAdapter() As CTSTableAdapter Get Return Me._cTSTableAdapter End Get Set Me._cTSTableAdapter = value End Set End Property _ Public Property defectCatProdTableAdapter() As defectCatProdTableAdapter Get Return Me._defectCatProdTableAdapter End Get Set Me._defectCatProdTableAdapter = value End Set End Property _ Public Property defectCatProdHistTableAdapter() As defectCatProdHistTableAdapter Get Return Me._defectCatProdHistTableAdapter End Get Set Me._defectCatProdHistTableAdapter = value End Set End Property _ Public Property defectCatQCTableAdapter() As defectCatQCTableAdapter Get Return Me._defectCatQCTableAdapter End Get Set Me._defectCatQCTableAdapter = value End Set End Property _ Public Property defectCatQCHistTableAdapter() As defectCatQCHistTableAdapter Get Return Me._defectCatQCHistTableAdapter End Get Set Me._defectCatQCHistTableAdapter = value End Set End Property _ Public Property defectProdTableAdapter() As defectProdTableAdapter Get Return Me._defectProdTableAdapter End Get Set Me._defectProdTableAdapter = value End Set End Property _ Public Property defectProdHistTableAdapter() As defectProdHistTableAdapter Get Return Me._defectProdHistTableAdapter End Get Set Me._defectProdHistTableAdapter = value End Set End Property _ Public Property defectQCTableAdapter() As defectQCTableAdapter Get Return Me._defectQCTableAdapter End Get Set Me._defectQCTableAdapter = value End Set End Property _ Public Property defectQCHistTableAdapter() As defectQCHistTableAdapter Get Return Me._defectQCHistTableAdapter End Get Set Me._defectQCHistTableAdapter = value End Set End Property _ Public Property FA_NewPTTableAdapter() As FA_NewPTTableAdapter Get Return Me._fA_NewPTTableAdapter End Get Set Me._fA_NewPTTableAdapter = value End Set End Property _ Public Property faNoTableAdapter() As faNoTableAdapter Get Return Me._faNoTableAdapter End Get Set Me._faNoTableAdapter = value End Set End Property _ Public Property KITTINGTableAdapter() As KITTINGTableAdapter Get Return Me._kITTINGTableAdapter End Get Set Me._kITTINGTableAdapter = value End Set End Property _ Public Property KMOUNTINGTableAdapter() As KMOUNTINGTableAdapter Get Return Me._kMOUNTINGTableAdapter End Get Set Me._kMOUNTINGTableAdapter = value End Set End Property _ Public Property KSEQUENCE_DETAILTableAdapter() As KSEQUENCE_DETAILTableAdapter Get Return Me._kSEQUENCE_DETAILTableAdapter End Get Set Me._kSEQUENCE_DETAILTableAdapter = value End Set End Property _ Public Property KSEQUENCE_HEADERTableAdapter() As KSEQUENCE_HEADERTableAdapter Get Return Me._kSEQUENCE_HEADERTableAdapter End Get Set Me._kSEQUENCE_HEADERTableAdapter = value End Set End Property _ Public Property KSETTINGSTableAdapter() As KSETTINGSTableAdapter Get Return Me._kSETTINGSTableAdapter End Get Set Me._kSETTINGSTableAdapter = value End Set End Property _ Public Property LabelDefTableAdapter() As LabelDefTableAdapter Get Return Me._labelDefTableAdapter End Get Set Me._labelDefTableAdapter = value End Set End Property _ Public Property LabelDefHistTableAdapter() As LabelDefHistTableAdapter Get Return Me._labelDefHistTableAdapter End Get Set Me._labelDefHistTableAdapter = value End Set End Property _ Public Property log_actionTableAdapter() As log_actionTableAdapter Get Return Me._log_actionTableAdapter End Get Set Me._log_actionTableAdapter = value End Set End Property _ Public Property log_alvarion_serialTableAdapter() As log_alvarion_serialTableAdapter Get Return Me._log_alvarion_serialTableAdapter End Get Set Me._log_alvarion_serialTableAdapter = value End Set End Property _ Public Property log_ATE_errorTableAdapter() As log_ATE_errorTableAdapter Get Return Me._log_ATE_errorTableAdapter End Get Set Me._log_ATE_errorTableAdapter = value End Set End Property _ Public Property log_BL_DetailTableAdapter() As log_BL_DetailTableAdapter Get Return Me._log_BL_DetailTableAdapter End Get Set Me._log_BL_DetailTableAdapter = value End Set End Property _ Public Property log_BL_Detail_HistTableAdapter() As log_BL_Detail_HistTableAdapter Get Return Me._log_BL_Detail_HistTableAdapter End Get Set Me._log_BL_Detail_HistTableAdapter = value End Set End Property _ Public Property log_BL_HeaderTableAdapter() As log_BL_HeaderTableAdapter Get Return Me._log_BL_HeaderTableAdapter End Get Set Me._log_BL_HeaderTableAdapter = value End Set End Property _ Public Property log_BL_Header_HistTableAdapter() As log_BL_Header_HistTableAdapter Get Return Me._log_BL_Header_HistTableAdapter End Get Set Me._log_BL_Header_HistTableAdapter = value End Set End Property _ Public Property log_CAPATableAdapter() As log_CAPATableAdapter Get Return Me._log_CAPATableAdapter End Get Set Me._log_CAPATableAdapter = value End Set End Property _ Public Property log_cardTableAdapter() As log_cardTableAdapter Get Return Me._log_cardTableAdapter End Get Set Me._log_cardTableAdapter = value End Set End Property _ Public Property log_CT_DetailTableAdapter() As log_CT_DetailTableAdapter Get Return Me._log_CT_DetailTableAdapter End Get Set Me._log_CT_DetailTableAdapter = value End Set End Property _ Public Property log_CT_Detail_HistTableAdapter() As log_CT_Detail_HistTableAdapter Get Return Me._log_CT_Detail_HistTableAdapter End Get Set Me._log_CT_Detail_HistTableAdapter = value End Set End Property _ Public Property log_CT_HeaderTableAdapter() As log_CT_HeaderTableAdapter Get Return Me._log_CT_HeaderTableAdapter End Get Set Me._log_CT_HeaderTableAdapter = value End Set End Property _ Public Property log_CT_Header_HistTableAdapter() As log_CT_Header_HistTableAdapter Get Return Me._log_CT_Header_HistTableAdapter End Get Set Me._log_CT_Header_HistTableAdapter = value End Set End Property _ Public Property log_ct_header_tempTableAdapter() As log_ct_header_tempTableAdapter Get Return Me._log_ct_header_tempTableAdapter End Get Set Me._log_ct_header_tempTableAdapter = value End Set End Property _ Public Property log_DATableAdapter() As log_DATableAdapter Get Return Me._log_DATableAdapter End Get Set Me._log_DATableAdapter = value End Set End Property _ Public Property log_labelTableAdapter() As log_labelTableAdapter Get Return Me._log_labelTableAdapter End Get Set Me._log_labelTableAdapter = value End Set End Property _ Public Property log_labelHistTableAdapter() As log_labelHistTableAdapter Get Return Me._log_labelHistTableAdapter End Get Set Me._log_labelHistTableAdapter = value End Set End Property _ Public Property log_linkTableAdapter() As log_linkTableAdapter Get Return Me._log_linkTableAdapter End Get Set Me._log_linkTableAdapter = value End Set End Property _ Public Property log_linkHistTableAdapter() As log_linkHistTableAdapter Get Return Me._log_linkHistTableAdapter End Get Set Me._log_linkHistTableAdapter = value End Set End Property _ Public Property log_lotTableAdapter() As log_lotTableAdapter Get Return Me._log_lotTableAdapter End Get Set Me._log_lotTableAdapter = value End Set End Property _ Public Property log_passTableAdapter() As log_passTableAdapter Get Return Me._log_passTableAdapter End Get Set Me._log_passTableAdapter = value End Set End Property _ Public Property log_pass_serialTableAdapter() As log_pass_serialTableAdapter Get Return Me._log_pass_serialTableAdapter End Get Set Me._log_pass_serialTableAdapter = value End Set End Property _ Public Property log_PreTest_DetailTableAdapter() As log_PreTest_DetailTableAdapter Get Return Me._log_PreTest_DetailTableAdapter End Get Set Me._log_PreTest_DetailTableAdapter = value End Set End Property _ Public Property log_repairTableAdapter() As log_repairTableAdapter Get Return Me._log_repairTableAdapter End Get Set Me._log_repairTableAdapter = value End Set End Property _ Public Property log_repair_faTableAdapter() As log_repair_faTableAdapter Get Return Me._log_repair_faTableAdapter End Get Set Me._log_repair_faTableAdapter = value End Set End Property _ Public Property log_repair_serialTableAdapter() As log_repair_serialTableAdapter Get Return Me._log_repair_serialTableAdapter End Get Set Me._log_repair_serialTableAdapter = value End Set End Property _ Public Property log_serialTableAdapter() As log_serialTableAdapter Get Return Me._log_serialTableAdapter End Get Set Me._log_serialTableAdapter = value End Set End Property _ Public Property log_SH_DetailTableAdapter() As log_SH_DetailTableAdapter Get Return Me._log_SH_DetailTableAdapter End Get Set Me._log_SH_DetailTableAdapter = value End Set End Property _ Public Property log_SH_Detail_HistTableAdapter() As log_SH_Detail_HistTableAdapter Get Return Me._log_SH_Detail_HistTableAdapter End Get Set Me._log_SH_Detail_HistTableAdapter = value End Set End Property _ Public Property log_SH_HeaderTableAdapter() As log_SH_HeaderTableAdapter Get Return Me._log_SH_HeaderTableAdapter End Get Set Me._log_SH_HeaderTableAdapter = value End Set End Property _ Public Property log_SH_Header_HistTableAdapter() As log_SH_Header_HistTableAdapter Get Return Me._log_SH_Header_HistTableAdapter End Get Set Me._log_SH_Header_HistTableAdapter = value End Set End Property _ Public Property lotNoTableAdapter() As lotNoTableAdapter Get Return Me._lotNoTableAdapter End Get Set Me._lotNoTableAdapter = value End Set End Property _ Public Property LotNumberTableAdapter() As LotNumberTableAdapter Get Return Me._lotNumberTableAdapter End Get Set Me._lotNumberTableAdapter = value End Set End Property _ Public Property machineTableAdapter() As machineTableAdapter Get Return Me._machineTableAdapter End Get Set Me._machineTableAdapter = value End Set End Property _ Public Property machineHistTableAdapter() As machineHistTableAdapter Get Return Me._machineHistTableAdapter End Get Set Me._machineHistTableAdapter = value End Set End Property _ Public Property modelTableAdapter() As modelTableAdapter Get Return Me._modelTableAdapter End Get Set Me._modelTableAdapter = value End Set End Property _ Public Property modelBackupTableAdapter() As modelBackupTableAdapter Get Return Me._modelBackupTableAdapter End Get Set Me._modelBackupTableAdapter = value End Set End Property _ Public Property modelDimTableAdapter() As modelDimTableAdapter Get Return Me._modelDimTableAdapter End Get Set Me._modelDimTableAdapter = value End Set End Property _ Public Property modelDimHistTableAdapter() As modelDimHistTableAdapter Get Return Me._modelDimHistTableAdapter End Get Set Me._modelDimHistTableAdapter = value End Set End Property _ Public Property modelFamilyTableAdapter() As modelFamilyTableAdapter Get Return Me._modelFamilyTableAdapter End Get Set Me._modelFamilyTableAdapter = value End Set End Property _ Public Property modelFamilyHistTableAdapter() As modelFamilyHistTableAdapter Get Return Me._modelFamilyHistTableAdapter End Get Set Me._modelFamilyHistTableAdapter = value End Set End Property _ Public Property modelHierarchyTableAdapter() As modelHierarchyTableAdapter Get Return Me._modelHierarchyTableAdapter End Get Set Me._modelHierarchyTableAdapter = value End Set End Property _ Public Property modelHierarchyHistTableAdapter() As modelHierarchyHistTableAdapter Get Return Me._modelHierarchyHistTableAdapter End Get Set Me._modelHierarchyHistTableAdapter = value End Set End Property _ Public Property modelHistTableAdapter() As modelHistTableAdapter Get Return Me._modelHistTableAdapter End Get Set Me._modelHistTableAdapter = value End Set End Property _ Public Property modelRouteTableAdapter() As modelRouteTableAdapter Get Return Me._modelRouteTableAdapter End Get Set Me._modelRouteTableAdapter = value End Set End Property _ Public Property modelRoute_backup_1TableAdapter() As modelRoute_backup_1TableAdapter Get Return Me._modelRoute_backup_1TableAdapter End Get Set Me._modelRoute_backup_1TableAdapter = value End Set End Property _ Public Property modelRouteHistTableAdapter() As modelRouteHistTableAdapter Get Return Me._modelRouteHistTableAdapter End Get Set Me._modelRouteHistTableAdapter = value End Set End Property _ Public Property modelTempTableAdapter() As modelTempTableAdapter Get Return Me._modelTempTableAdapter End Get Set Me._modelTempTableAdapter = value End Set End Property _ Public Property modelTypeTableAdapter() As modelTypeTableAdapter Get Return Me._modelTypeTableAdapter End Get Set Me._modelTypeTableAdapter = value End Set End Property _ Public Property modelTypeHistTableAdapter() As modelTypeHistTableAdapter Get Return Me._modelTypeHistTableAdapter End Get Set Me._modelTypeHistTableAdapter = value End Set End Property _ Public Property Parts_ListTableAdapter() As Parts_ListTableAdapter Get Return Me._parts_ListTableAdapter End Get Set Me._parts_ListTableAdapter = value End Set End Property _ Public Property partsCodeTableAdapter() As partsCodeTableAdapter Get Return Me._partsCodeTableAdapter End Get Set Me._partsCodeTableAdapter = value End Set End Property _ Public Property PartsModelTableAdapter() As PartsModelTableAdapter Get Return Me._partsModelTableAdapter End Get Set Me._partsModelTableAdapter = value End Set End Property _ Public Property PartsPrepTableAdapter() As PartsPrepTableAdapter Get Return Me._partsPrepTableAdapter End Get Set Me._partsPrepTableAdapter = value End Set End Property _ Public Property PartsRecordsTableAdapter() As PartsRecordsTableAdapter Get Return Me._partsRecordsTableAdapter End Get Set Me._partsRecordsTableAdapter = value End Set End Property _ Public Property partsStationTableAdapter() As partsStationTableAdapter Get Return Me._partsStationTableAdapter End Get Set Me._partsStationTableAdapter = value End Set End Property _ Public Property partsSupplierTableAdapter() As partsSupplierTableAdapter Get Return Me._partsSupplierTableAdapter End Get Set Me._partsSupplierTableAdapter = value End Set End Property _ Public Property po_detailTableAdapter() As po_detailTableAdapter Get Return Me._po_detailTableAdapter End Get Set Me._po_detailTableAdapter = value End Set End Property _ Public Property po_detail_backupTableAdapter() As po_detail_backupTableAdapter Get Return Me._po_detail_backupTableAdapter End Get Set Me._po_detail_backupTableAdapter = value End Set End Property _ Public Property po_detail_tempTableAdapter() As po_detail_tempTableAdapter Get Return Me._po_detail_tempTableAdapter End Get Set Me._po_detail_tempTableAdapter = value End Set End Property _ Public Property po_headerTableAdapter() As po_headerTableAdapter Get Return Me._po_headerTableAdapter End Get Set Me._po_headerTableAdapter = value End Set End Property _ Public Property po_header_backupTableAdapter() As po_header_backupTableAdapter Get Return Me._po_header_backupTableAdapter End Get Set Me._po_header_backupTableAdapter = value End Set End Property _ Public Property po_history_detailTableAdapter() As po_history_detailTableAdapter Get Return Me._po_history_detailTableAdapter End Get Set Me._po_history_detailTableAdapter = value End Set End Property _ Public Property po_orig_detailTableAdapter() As po_orig_detailTableAdapter Get Return Me._po_orig_detailTableAdapter End Get Set Me._po_orig_detailTableAdapter = value End Set End Property _ Public Property po_orig_headerTableAdapter() As po_orig_headerTableAdapter Get Return Me._po_orig_headerTableAdapter End Get Set Me._po_orig_headerTableAdapter = value End Set End Property _ Public Property printerTableAdapter() As printerTableAdapter Get Return Me._printerTableAdapter End Get Set Me._printerTableAdapter = value End Set End Property _ Public Property ptTableAdapter() As ptTableAdapter Get Return Me._ptTableAdapter End Get Set Me._ptTableAdapter = value End Set End Property _ Public Property pt_HistTableAdapter() As pt_HistTableAdapter Get Return Me._pt_HistTableAdapter End Get Set Me._pt_HistTableAdapter = value End Set End Property _ Public Property serialAlvarisetTableAdapter() As serialAlvarisetTableAdapter Get Return Me._serialAlvarisetTableAdapter End Get Set Me._serialAlvarisetTableAdapter = value End Set End Property _ Public Property serialMacTableAdapter() As serialMacTableAdapter Get Return Me._serialMacTableAdapter End Get Set Me._serialMacTableAdapter = value End Set End Property _ Public Property SHIPPER_REPORT_TABLETableAdapter() As SHIPPER_REPORT_TABLETableAdapter Get Return Me._sHIPPER_REPORT_TABLETableAdapter End Get Set Me._sHIPPER_REPORT_TABLETableAdapter = value End Set End Property _ Public Property SHIPPER_STATUSTableAdapter() As SHIPPER_STATUSTableAdapter Get Return Me._sHIPPER_STATUSTableAdapter End Get Set Me._sHIPPER_STATUSTableAdapter = value End Set End Property _ Public Property SHIPPER_SUMMARY_TABLETableAdapter() As SHIPPER_SUMMARY_TABLETableAdapter Get Return Me._sHIPPER_SUMMARY_TABLETableAdapter End Get Set Me._sHIPPER_SUMMARY_TABLETableAdapter = value End Set End Property _ Public Property stationTableAdapter() As stationTableAdapter Get Return Me._stationTableAdapter End Get Set Me._stationTableAdapter = value End Set End Property _ Public Property station_convertTableAdapter() As station_convertTableAdapter Get Return Me._station_convertTableAdapter End Get Set Me._station_convertTableAdapter = value End Set End Property _ Public Property stationHistTableAdapter() As stationHistTableAdapter Get Return Me._stationHistTableAdapter End Get Set Me._stationHistTableAdapter = value End Set End Property _ Public Property usersTableAdapter() As usersTableAdapter Get Return Me._usersTableAdapter End Get Set Me._usersTableAdapter = value End Set End Property _ Public Property usersHistTableAdapter() As usersHistTableAdapter Get Return Me._usersHistTableAdapter End Get Set Me._usersHistTableAdapter = value End Set End Property _ Public Property WIP_TEMPTableAdapter() As WIP_TEMPTableAdapter Get Return Me._wIP_TEMPTableAdapter End Get Set Me._wIP_TEMPTableAdapter = value End Set End Property _ Public Property BackupDataSetBeforeUpdate() As Boolean Get Return Me._backupDataSetBeforeUpdate End Get Set Me._backupDataSetBeforeUpdate = value End Set End Property _ Public Property Connection() As Global.System.Data.IDbConnection Get If (Not (Me._connection) Is Nothing) Then Return Me._connection End If If ((Not (Me._aOIQ_TempTableAdapter) Is Nothing) _ AndAlso (Not (Me._aOIQ_TempTableAdapter.Connection) Is Nothing)) Then Return Me._aOIQ_TempTableAdapter.Connection End If If ((Not (Me._batchTableAdapter) Is Nothing) _ AndAlso (Not (Me._batchTableAdapter.Connection) Is Nothing)) Then Return Me._batchTableAdapter.Connection End If If ((Not (Me._cardTableAdapter) Is Nothing) _ AndAlso (Not (Me._cardTableAdapter.Connection) Is Nothing)) Then Return Me._cardTableAdapter.Connection End If If ((Not (Me._card_backupTableAdapter) Is Nothing) _ AndAlso (Not (Me._card_backupTableAdapter.Connection) Is Nothing)) Then Return Me._card_backupTableAdapter.Connection End If If ((Not (Me._card_HistTableAdapter) Is Nothing) _ AndAlso (Not (Me._card_HistTableAdapter.Connection) Is Nothing)) Then Return Me._card_HistTableAdapter.Connection End If If ((Not (Me._cardHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._cardHistTableAdapter.Connection) Is Nothing)) Then Return Me._cardHistTableAdapter.Connection End If If ((Not (Me._component_partsTableAdapter) Is Nothing) _ AndAlso (Not (Me._component_partsTableAdapter.Connection) Is Nothing)) Then Return Me._component_partsTableAdapter.Connection End If If ((Not (Me._cTSTableAdapter) Is Nothing) _ AndAlso (Not (Me._cTSTableAdapter.Connection) Is Nothing)) Then Return Me._cTSTableAdapter.Connection End If If ((Not (Me._defectCatProdTableAdapter) Is Nothing) _ AndAlso (Not (Me._defectCatProdTableAdapter.Connection) Is Nothing)) Then Return Me._defectCatProdTableAdapter.Connection End If If ((Not (Me._defectCatProdHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._defectCatProdHistTableAdapter.Connection) Is Nothing)) Then Return Me._defectCatProdHistTableAdapter.Connection End If If ((Not (Me._defectCatQCTableAdapter) Is Nothing) _ AndAlso (Not (Me._defectCatQCTableAdapter.Connection) Is Nothing)) Then Return Me._defectCatQCTableAdapter.Connection End If If ((Not (Me._defectCatQCHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._defectCatQCHistTableAdapter.Connection) Is Nothing)) Then Return Me._defectCatQCHistTableAdapter.Connection End If If ((Not (Me._defectProdTableAdapter) Is Nothing) _ AndAlso (Not (Me._defectProdTableAdapter.Connection) Is Nothing)) Then Return Me._defectProdTableAdapter.Connection End If If ((Not (Me._defectProdHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._defectProdHistTableAdapter.Connection) Is Nothing)) Then Return Me._defectProdHistTableAdapter.Connection End If If ((Not (Me._defectQCTableAdapter) Is Nothing) _ AndAlso (Not (Me._defectQCTableAdapter.Connection) Is Nothing)) Then Return Me._defectQCTableAdapter.Connection End If If ((Not (Me._defectQCHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._defectQCHistTableAdapter.Connection) Is Nothing)) Then Return Me._defectQCHistTableAdapter.Connection End If If ((Not (Me._fA_NewPTTableAdapter) Is Nothing) _ AndAlso (Not (Me._fA_NewPTTableAdapter.Connection) Is Nothing)) Then Return Me._fA_NewPTTableAdapter.Connection End If If ((Not (Me._faNoTableAdapter) Is Nothing) _ AndAlso (Not (Me._faNoTableAdapter.Connection) Is Nothing)) Then Return Me._faNoTableAdapter.Connection End If If ((Not (Me._kITTINGTableAdapter) Is Nothing) _ AndAlso (Not (Me._kITTINGTableAdapter.Connection) Is Nothing)) Then Return Me._kITTINGTableAdapter.Connection End If If ((Not (Me._kMOUNTINGTableAdapter) Is Nothing) _ AndAlso (Not (Me._kMOUNTINGTableAdapter.Connection) Is Nothing)) Then Return Me._kMOUNTINGTableAdapter.Connection End If If ((Not (Me._kSEQUENCE_DETAILTableAdapter) Is Nothing) _ AndAlso (Not (Me._kSEQUENCE_DETAILTableAdapter.Connection) Is Nothing)) Then Return Me._kSEQUENCE_DETAILTableAdapter.Connection End If If ((Not (Me._kSEQUENCE_HEADERTableAdapter) Is Nothing) _ AndAlso (Not (Me._kSEQUENCE_HEADERTableAdapter.Connection) Is Nothing)) Then Return Me._kSEQUENCE_HEADERTableAdapter.Connection End If If ((Not (Me._kSETTINGSTableAdapter) Is Nothing) _ AndAlso (Not (Me._kSETTINGSTableAdapter.Connection) Is Nothing)) Then Return Me._kSETTINGSTableAdapter.Connection End If If ((Not (Me._labelDefTableAdapter) Is Nothing) _ AndAlso (Not (Me._labelDefTableAdapter.Connection) Is Nothing)) Then Return Me._labelDefTableAdapter.Connection End If If ((Not (Me._labelDefHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._labelDefHistTableAdapter.Connection) Is Nothing)) Then Return Me._labelDefHistTableAdapter.Connection End If If ((Not (Me._log_actionTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_actionTableAdapter.Connection) Is Nothing)) Then Return Me._log_actionTableAdapter.Connection End If If ((Not (Me._log_alvarion_serialTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_alvarion_serialTableAdapter.Connection) Is Nothing)) Then Return Me._log_alvarion_serialTableAdapter.Connection End If If ((Not (Me._log_ATE_errorTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_ATE_errorTableAdapter.Connection) Is Nothing)) Then Return Me._log_ATE_errorTableAdapter.Connection End If If ((Not (Me._log_BL_DetailTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_BL_DetailTableAdapter.Connection) Is Nothing)) Then Return Me._log_BL_DetailTableAdapter.Connection End If If ((Not (Me._log_BL_Detail_HistTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_BL_Detail_HistTableAdapter.Connection) Is Nothing)) Then Return Me._log_BL_Detail_HistTableAdapter.Connection End If If ((Not (Me._log_BL_HeaderTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_BL_HeaderTableAdapter.Connection) Is Nothing)) Then Return Me._log_BL_HeaderTableAdapter.Connection End If If ((Not (Me._log_BL_Header_HistTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_BL_Header_HistTableAdapter.Connection) Is Nothing)) Then Return Me._log_BL_Header_HistTableAdapter.Connection End If If ((Not (Me._log_CAPATableAdapter) Is Nothing) _ AndAlso (Not (Me._log_CAPATableAdapter.Connection) Is Nothing)) Then Return Me._log_CAPATableAdapter.Connection End If If ((Not (Me._log_cardTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_cardTableAdapter.Connection) Is Nothing)) Then Return Me._log_cardTableAdapter.Connection End If If ((Not (Me._log_CT_DetailTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_CT_DetailTableAdapter.Connection) Is Nothing)) Then Return Me._log_CT_DetailTableAdapter.Connection End If If ((Not (Me._log_CT_Detail_HistTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_CT_Detail_HistTableAdapter.Connection) Is Nothing)) Then Return Me._log_CT_Detail_HistTableAdapter.Connection End If If ((Not (Me._log_CT_HeaderTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_CT_HeaderTableAdapter.Connection) Is Nothing)) Then Return Me._log_CT_HeaderTableAdapter.Connection End If If ((Not (Me._log_CT_Header_HistTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_CT_Header_HistTableAdapter.Connection) Is Nothing)) Then Return Me._log_CT_Header_HistTableAdapter.Connection End If If ((Not (Me._log_ct_header_tempTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_ct_header_tempTableAdapter.Connection) Is Nothing)) Then Return Me._log_ct_header_tempTableAdapter.Connection End If If ((Not (Me._log_DATableAdapter) Is Nothing) _ AndAlso (Not (Me._log_DATableAdapter.Connection) Is Nothing)) Then Return Me._log_DATableAdapter.Connection End If If ((Not (Me._log_labelTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_labelTableAdapter.Connection) Is Nothing)) Then Return Me._log_labelTableAdapter.Connection End If If ((Not (Me._log_labelHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_labelHistTableAdapter.Connection) Is Nothing)) Then Return Me._log_labelHistTableAdapter.Connection End If If ((Not (Me._log_linkTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_linkTableAdapter.Connection) Is Nothing)) Then Return Me._log_linkTableAdapter.Connection End If If ((Not (Me._log_linkHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_linkHistTableAdapter.Connection) Is Nothing)) Then Return Me._log_linkHistTableAdapter.Connection End If If ((Not (Me._log_lotTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_lotTableAdapter.Connection) Is Nothing)) Then Return Me._log_lotTableAdapter.Connection End If If ((Not (Me._log_passTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_passTableAdapter.Connection) Is Nothing)) Then Return Me._log_passTableAdapter.Connection End If If ((Not (Me._log_pass_serialTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_pass_serialTableAdapter.Connection) Is Nothing)) Then Return Me._log_pass_serialTableAdapter.Connection End If If ((Not (Me._log_PreTest_DetailTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_PreTest_DetailTableAdapter.Connection) Is Nothing)) Then Return Me._log_PreTest_DetailTableAdapter.Connection End If If ((Not (Me._log_repairTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_repairTableAdapter.Connection) Is Nothing)) Then Return Me._log_repairTableAdapter.Connection End If If ((Not (Me._log_repair_faTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_repair_faTableAdapter.Connection) Is Nothing)) Then Return Me._log_repair_faTableAdapter.Connection End If If ((Not (Me._log_repair_serialTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_repair_serialTableAdapter.Connection) Is Nothing)) Then Return Me._log_repair_serialTableAdapter.Connection End If If ((Not (Me._log_serialTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_serialTableAdapter.Connection) Is Nothing)) Then Return Me._log_serialTableAdapter.Connection End If If ((Not (Me._log_SH_DetailTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_SH_DetailTableAdapter.Connection) Is Nothing)) Then Return Me._log_SH_DetailTableAdapter.Connection End If If ((Not (Me._log_SH_Detail_HistTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_SH_Detail_HistTableAdapter.Connection) Is Nothing)) Then Return Me._log_SH_Detail_HistTableAdapter.Connection End If If ((Not (Me._log_SH_HeaderTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_SH_HeaderTableAdapter.Connection) Is Nothing)) Then Return Me._log_SH_HeaderTableAdapter.Connection End If If ((Not (Me._log_SH_Header_HistTableAdapter) Is Nothing) _ AndAlso (Not (Me._log_SH_Header_HistTableAdapter.Connection) Is Nothing)) Then Return Me._log_SH_Header_HistTableAdapter.Connection End If If ((Not (Me._lotNoTableAdapter) Is Nothing) _ AndAlso (Not (Me._lotNoTableAdapter.Connection) Is Nothing)) Then Return Me._lotNoTableAdapter.Connection End If If ((Not (Me._lotNumberTableAdapter) Is Nothing) _ AndAlso (Not (Me._lotNumberTableAdapter.Connection) Is Nothing)) Then Return Me._lotNumberTableAdapter.Connection End If If ((Not (Me._machineTableAdapter) Is Nothing) _ AndAlso (Not (Me._machineTableAdapter.Connection) Is Nothing)) Then Return Me._machineTableAdapter.Connection End If If ((Not (Me._machineHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._machineHistTableAdapter.Connection) Is Nothing)) Then Return Me._machineHistTableAdapter.Connection End If If ((Not (Me._modelTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelTableAdapter.Connection) Is Nothing)) Then Return Me._modelTableAdapter.Connection End If If ((Not (Me._modelBackupTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelBackupTableAdapter.Connection) Is Nothing)) Then Return Me._modelBackupTableAdapter.Connection End If If ((Not (Me._modelDimTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelDimTableAdapter.Connection) Is Nothing)) Then Return Me._modelDimTableAdapter.Connection End If If ((Not (Me._modelDimHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelDimHistTableAdapter.Connection) Is Nothing)) Then Return Me._modelDimHistTableAdapter.Connection End If If ((Not (Me._modelFamilyTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelFamilyTableAdapter.Connection) Is Nothing)) Then Return Me._modelFamilyTableAdapter.Connection End If If ((Not (Me._modelFamilyHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelFamilyHistTableAdapter.Connection) Is Nothing)) Then Return Me._modelFamilyHistTableAdapter.Connection End If If ((Not (Me._modelHierarchyTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelHierarchyTableAdapter.Connection) Is Nothing)) Then Return Me._modelHierarchyTableAdapter.Connection End If If ((Not (Me._modelHierarchyHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelHierarchyHistTableAdapter.Connection) Is Nothing)) Then Return Me._modelHierarchyHistTableAdapter.Connection End If If ((Not (Me._modelHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelHistTableAdapter.Connection) Is Nothing)) Then Return Me._modelHistTableAdapter.Connection End If If ((Not (Me._modelRouteTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelRouteTableAdapter.Connection) Is Nothing)) Then Return Me._modelRouteTableAdapter.Connection End If If ((Not (Me._modelRoute_backup_1TableAdapter) Is Nothing) _ AndAlso (Not (Me._modelRoute_backup_1TableAdapter.Connection) Is Nothing)) Then Return Me._modelRoute_backup_1TableAdapter.Connection End If If ((Not (Me._modelRouteHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelRouteHistTableAdapter.Connection) Is Nothing)) Then Return Me._modelRouteHistTableAdapter.Connection End If If ((Not (Me._modelTempTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelTempTableAdapter.Connection) Is Nothing)) Then Return Me._modelTempTableAdapter.Connection End If If ((Not (Me._modelTypeTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelTypeTableAdapter.Connection) Is Nothing)) Then Return Me._modelTypeTableAdapter.Connection End If If ((Not (Me._modelTypeHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._modelTypeHistTableAdapter.Connection) Is Nothing)) Then Return Me._modelTypeHistTableAdapter.Connection End If If ((Not (Me._parts_ListTableAdapter) Is Nothing) _ AndAlso (Not (Me._parts_ListTableAdapter.Connection) Is Nothing)) Then Return Me._parts_ListTableAdapter.Connection End If If ((Not (Me._partsCodeTableAdapter) Is Nothing) _ AndAlso (Not (Me._partsCodeTableAdapter.Connection) Is Nothing)) Then Return Me._partsCodeTableAdapter.Connection End If If ((Not (Me._partsModelTableAdapter) Is Nothing) _ AndAlso (Not (Me._partsModelTableAdapter.Connection) Is Nothing)) Then Return Me._partsModelTableAdapter.Connection End If If ((Not (Me._partsPrepTableAdapter) Is Nothing) _ AndAlso (Not (Me._partsPrepTableAdapter.Connection) Is Nothing)) Then Return Me._partsPrepTableAdapter.Connection End If If ((Not (Me._partsRecordsTableAdapter) Is Nothing) _ AndAlso (Not (Me._partsRecordsTableAdapter.Connection) Is Nothing)) Then Return Me._partsRecordsTableAdapter.Connection End If If ((Not (Me._partsStationTableAdapter) Is Nothing) _ AndAlso (Not (Me._partsStationTableAdapter.Connection) Is Nothing)) Then Return Me._partsStationTableAdapter.Connection End If If ((Not (Me._partsSupplierTableAdapter) Is Nothing) _ AndAlso (Not (Me._partsSupplierTableAdapter.Connection) Is Nothing)) Then Return Me._partsSupplierTableAdapter.Connection End If If ((Not (Me._po_detailTableAdapter) Is Nothing) _ AndAlso (Not (Me._po_detailTableAdapter.Connection) Is Nothing)) Then Return Me._po_detailTableAdapter.Connection End If If ((Not (Me._po_detail_backupTableAdapter) Is Nothing) _ AndAlso (Not (Me._po_detail_backupTableAdapter.Connection) Is Nothing)) Then Return Me._po_detail_backupTableAdapter.Connection End If If ((Not (Me._po_detail_tempTableAdapter) Is Nothing) _ AndAlso (Not (Me._po_detail_tempTableAdapter.Connection) Is Nothing)) Then Return Me._po_detail_tempTableAdapter.Connection End If If ((Not (Me._po_headerTableAdapter) Is Nothing) _ AndAlso (Not (Me._po_headerTableAdapter.Connection) Is Nothing)) Then Return Me._po_headerTableAdapter.Connection End If If ((Not (Me._po_header_backupTableAdapter) Is Nothing) _ AndAlso (Not (Me._po_header_backupTableAdapter.Connection) Is Nothing)) Then Return Me._po_header_backupTableAdapter.Connection End If If ((Not (Me._po_history_detailTableAdapter) Is Nothing) _ AndAlso (Not (Me._po_history_detailTableAdapter.Connection) Is Nothing)) Then Return Me._po_history_detailTableAdapter.Connection End If If ((Not (Me._po_orig_detailTableAdapter) Is Nothing) _ AndAlso (Not (Me._po_orig_detailTableAdapter.Connection) Is Nothing)) Then Return Me._po_orig_detailTableAdapter.Connection End If If ((Not (Me._po_orig_headerTableAdapter) Is Nothing) _ AndAlso (Not (Me._po_orig_headerTableAdapter.Connection) Is Nothing)) Then Return Me._po_orig_headerTableAdapter.Connection End If If ((Not (Me._printerTableAdapter) Is Nothing) _ AndAlso (Not (Me._printerTableAdapter.Connection) Is Nothing)) Then Return Me._printerTableAdapter.Connection End If If ((Not (Me._ptTableAdapter) Is Nothing) _ AndAlso (Not (Me._ptTableAdapter.Connection) Is Nothing)) Then Return Me._ptTableAdapter.Connection End If If ((Not (Me._pt_HistTableAdapter) Is Nothing) _ AndAlso (Not (Me._pt_HistTableAdapter.Connection) Is Nothing)) Then Return Me._pt_HistTableAdapter.Connection End If If ((Not (Me._serialAlvarisetTableAdapter) Is Nothing) _ AndAlso (Not (Me._serialAlvarisetTableAdapter.Connection) Is Nothing)) Then Return Me._serialAlvarisetTableAdapter.Connection End If If ((Not (Me._serialMacTableAdapter) Is Nothing) _ AndAlso (Not (Me._serialMacTableAdapter.Connection) Is Nothing)) Then Return Me._serialMacTableAdapter.Connection End If If ((Not (Me._sHIPPER_REPORT_TABLETableAdapter) Is Nothing) _ AndAlso (Not (Me._sHIPPER_REPORT_TABLETableAdapter.Connection) Is Nothing)) Then Return Me._sHIPPER_REPORT_TABLETableAdapter.Connection End If If ((Not (Me._sHIPPER_STATUSTableAdapter) Is Nothing) _ AndAlso (Not (Me._sHIPPER_STATUSTableAdapter.Connection) Is Nothing)) Then Return Me._sHIPPER_STATUSTableAdapter.Connection End If If ((Not (Me._sHIPPER_SUMMARY_TABLETableAdapter) Is Nothing) _ AndAlso (Not (Me._sHIPPER_SUMMARY_TABLETableAdapter.Connection) Is Nothing)) Then Return Me._sHIPPER_SUMMARY_TABLETableAdapter.Connection End If If ((Not (Me._stationTableAdapter) Is Nothing) _ AndAlso (Not (Me._stationTableAdapter.Connection) Is Nothing)) Then Return Me._stationTableAdapter.Connection End If If ((Not (Me._station_convertTableAdapter) Is Nothing) _ AndAlso (Not (Me._station_convertTableAdapter.Connection) Is Nothing)) Then Return Me._station_convertTableAdapter.Connection End If If ((Not (Me._stationHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._stationHistTableAdapter.Connection) Is Nothing)) Then Return Me._stationHistTableAdapter.Connection End If If ((Not (Me._usersTableAdapter) Is Nothing) _ AndAlso (Not (Me._usersTableAdapter.Connection) Is Nothing)) Then Return Me._usersTableAdapter.Connection End If If ((Not (Me._usersHistTableAdapter) Is Nothing) _ AndAlso (Not (Me._usersHistTableAdapter.Connection) Is Nothing)) Then Return Me._usersHistTableAdapter.Connection End If If ((Not (Me._wIP_TEMPTableAdapter) Is Nothing) _ AndAlso (Not (Me._wIP_TEMPTableAdapter.Connection) Is Nothing)) Then Return Me._wIP_TEMPTableAdapter.Connection End If Return Nothing End Get Set Me._connection = value End Set End Property _ Public ReadOnly Property TableAdapterInstanceCount() As Integer Get Dim count As Integer = 0 If (Not (Me._aOIQ_TempTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._batchTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._cardTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._card_backupTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._card_HistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._cardHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._component_partsTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._cTSTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._defectCatProdTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._defectCatProdHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._defectCatQCTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._defectCatQCHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._defectProdTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._defectProdHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._defectQCTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._defectQCHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._fA_NewPTTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._faNoTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._kITTINGTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._kMOUNTINGTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._kSEQUENCE_DETAILTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._kSEQUENCE_HEADERTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._kSETTINGSTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._labelDefTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._labelDefHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_actionTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_alvarion_serialTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_ATE_errorTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_BL_DetailTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_BL_Detail_HistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_BL_HeaderTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_BL_Header_HistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_CAPATableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_cardTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_CT_DetailTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_CT_Detail_HistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_CT_HeaderTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_CT_Header_HistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_ct_header_tempTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_DATableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_labelTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_labelHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_linkTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_linkHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_lotTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_passTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_pass_serialTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_PreTest_DetailTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_repairTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_repair_faTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_repair_serialTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_serialTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_SH_DetailTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_SH_Detail_HistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_SH_HeaderTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._log_SH_Header_HistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._lotNoTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._lotNumberTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._machineTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._machineHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelBackupTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelDimTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelDimHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelFamilyTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelFamilyHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelHierarchyTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelHierarchyHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelRouteTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelRoute_backup_1TableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelRouteHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelTempTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelTypeTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._modelTypeHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._parts_ListTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._partsCodeTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._partsModelTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._partsPrepTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._partsRecordsTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._partsStationTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._partsSupplierTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._po_detailTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._po_detail_backupTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._po_detail_tempTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._po_headerTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._po_header_backupTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._po_history_detailTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._po_orig_detailTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._po_orig_headerTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._printerTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._ptTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._pt_HistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._serialAlvarisetTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._serialMacTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._sHIPPER_REPORT_TABLETableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._sHIPPER_STATUSTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._sHIPPER_SUMMARY_TABLETableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._stationTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._station_convertTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._stationHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._usersTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._usersHistTableAdapter) Is Nothing) Then count = (count + 1) End If If (Not (Me._wIP_TEMPTableAdapter) Is Nothing) Then count = (count + 1) End If Return count End Get End Property ''' '''Update rows in top-down order. ''' _ Private Function UpdateUpdatedRows(ByVal dataSet As EpsonDataSet1, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 If (Not (Me._partsRecordsTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.PartsRecords.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._partsRecordsTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._partsStationTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.partsStation.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._partsStationTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._partsSupplierTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.partsSupplier.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._partsSupplierTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._partsPrepTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.PartsPrep.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._partsPrepTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._parts_ListTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.Parts_List.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._parts_ListTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._partsCodeTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.partsCode.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._partsCodeTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._partsModelTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.PartsModel.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._partsModelTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._po_detailTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.po_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._po_detailTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._po_history_detailTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.po_history_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._po_history_detailTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._po_orig_detailTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.po_orig_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._po_orig_detailTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._po_orig_headerTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.po_orig_header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._po_orig_headerTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._po_header_backupTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.po_header_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._po_header_backupTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._po_detail_backupTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.po_detail_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._po_detail_backupTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._po_detail_tempTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.po_detail_temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._po_detail_tempTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._po_headerTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.po_header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._po_headerTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelFamilyTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelFamily.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelFamilyTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelFamilyHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelFamilyHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelFamilyHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelHierarchyTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelHierarchy.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelHierarchyTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelDimHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelDimHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelDimHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.model.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelBackupTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelBackup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelBackupTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelDimTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelDim.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelDimTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelHierarchyHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelHierarchyHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelHierarchyHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelTempTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelTemp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelTempTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelTypeTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelType.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelTypeTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelTypeHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelTypeHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelTypeHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelRouteHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelRouteHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelRouteHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelRouteTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelRoute.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelRouteTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._modelRoute_backup_1TableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.modelRoute_backup_1.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._modelRoute_backup_1TableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._serialMacTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.serialMac.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._serialMacTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._sHIPPER_REPORT_TABLETableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_REPORT_TABLE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._sHIPPER_REPORT_TABLETableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._sHIPPER_STATUSTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_STATUS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._sHIPPER_STATUSTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._serialAlvarisetTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.serialAlvariset.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._serialAlvarisetTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._printerTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.printer.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._printerTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._ptTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.pt.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._ptTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._pt_HistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.pt_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._pt_HistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._sHIPPER_SUMMARY_TABLETableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_SUMMARY_TABLE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._sHIPPER_SUMMARY_TABLETableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._usersHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.usersHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._usersHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._wIP_TEMPTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.WIP_TEMP.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._wIP_TEMPTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._usersTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._usersTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._stationTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.station.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._stationTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._station_convertTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.station_convert.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._station_convertTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._stationHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.stationHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._stationHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._kMOUNTINGTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.KMOUNTING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._kMOUNTINGTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._kSEQUENCE_DETAILTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.KSEQUENCE_DETAIL.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._kSEQUENCE_DETAILTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._kSEQUENCE_HEADERTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.KSEQUENCE_HEADER.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._kSEQUENCE_HEADERTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._kITTINGTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.KITTING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._kITTINGTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._defectQCHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.defectQCHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._defectQCHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._fA_NewPTTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.FA_NewPT.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._fA_NewPTTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._faNoTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.faNo.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._faNoTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._kSETTINGSTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.KSETTINGS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._kSETTINGSTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_ATE_errorTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_ATE_error.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_ATE_errorTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_BL_DetailTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_BL_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_BL_DetailTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_BL_Detail_HistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_BL_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_BL_Detail_HistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_alvarion_serialTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_alvarion_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_alvarion_serialTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._labelDefTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.LabelDef.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._labelDefTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._labelDefHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.LabelDefHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._labelDefHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_actionTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_action.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_actionTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._card_HistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.card_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._card_HistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._cardHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.cardHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._cardHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._component_partsTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.component_parts.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._component_partsTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._card_backupTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.card_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._card_backupTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._aOIQ_TempTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.AOIQ_Temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._aOIQ_TempTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._batchTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.batch.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._batchTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._cardTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.card.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._cardTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._cTSTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.CTS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._cTSTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._defectProdTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.defectProd.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._defectProdTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._defectProdHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.defectProdHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._defectProdHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._defectQCTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.defectQC.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._defectQCTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._defectCatQCHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.defectCatQCHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._defectCatQCHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._defectCatProdTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.defectCatProd.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._defectCatProdTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._defectCatProdHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.defectCatProdHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._defectCatProdHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._defectCatQCTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.defectCatQC.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._defectCatQCTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_repair_faTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_repair_fa.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_repair_faTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_repair_serialTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_repair_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_repair_serialTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_serialTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_serialTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_repairTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_repair.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_repairTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_passTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_pass.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_passTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_pass_serialTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_pass_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_pass_serialTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_PreTest_DetailTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_PreTest_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_PreTest_DetailTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_SH_DetailTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_SH_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_SH_DetailTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._lotNumberTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.LotNumber.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._lotNumberTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._machineTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.machine.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._machineTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._machineHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.machineHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._machineHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._lotNoTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.lotNo.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._lotNoTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_SH_Detail_HistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_SH_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_SH_Detail_HistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_SH_HeaderTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_SH_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_SH_HeaderTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_SH_Header_HistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_SH_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_SH_Header_HistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_CT_DetailTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_CT_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_CT_DetailTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_CT_Detail_HistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_CT_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_CT_Detail_HistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_CT_HeaderTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_CT_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_CT_HeaderTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_cardTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_card.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_cardTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_BL_HeaderTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_BL_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_BL_HeaderTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_BL_Header_HistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_BL_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_BL_Header_HistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_CAPATableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_CAPA.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_CAPATableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_CT_Header_HistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_CT_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_CT_Header_HistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_linkTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_link.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_linkTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_linkHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_linkHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_linkHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_lotTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_lot.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_lotTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_labelHistTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_labelHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_labelHistTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_ct_header_tempTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_ct_header_temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_ct_header_tempTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_DATableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_DA.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_DATableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If If (Not (Me._log_labelTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.log_label.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) If ((Not (updatedRows) Is Nothing) _ AndAlso (0 < updatedRows.Length)) Then result = (result + Me._log_labelTableAdapter.Update(updatedRows)) allChangedRows.AddRange(updatedRows) End If End If Return result End Function ''' '''Insert rows in top-down order. ''' _ Private Function UpdateInsertedRows(ByVal dataSet As EpsonDataSet1, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 If (Not (Me._partsRecordsTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.PartsRecords.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._partsRecordsTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._partsStationTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.partsStation.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._partsStationTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._partsSupplierTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.partsSupplier.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._partsSupplierTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._partsPrepTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.PartsPrep.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._partsPrepTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._parts_ListTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.Parts_List.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._parts_ListTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._partsCodeTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.partsCode.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._partsCodeTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._partsModelTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.PartsModel.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._partsModelTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._po_detailTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.po_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._po_detailTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._po_history_detailTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.po_history_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._po_history_detailTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._po_orig_detailTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.po_orig_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._po_orig_detailTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._po_orig_headerTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.po_orig_header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._po_orig_headerTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._po_header_backupTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.po_header_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._po_header_backupTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._po_detail_backupTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.po_detail_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._po_detail_backupTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._po_detail_tempTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.po_detail_temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._po_detail_tempTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._po_headerTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.po_header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._po_headerTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelFamilyTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelFamily.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelFamilyTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelFamilyHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelFamilyHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelFamilyHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelHierarchyTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelHierarchy.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelHierarchyTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelDimHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelDimHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelDimHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.model.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelBackupTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelBackup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelBackupTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelDimTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelDim.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelDimTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelHierarchyHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelHierarchyHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelHierarchyHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelTempTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelTemp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelTempTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelTypeTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelType.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelTypeTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelTypeHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelTypeHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelTypeHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelRouteHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelRouteHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelRouteHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelRouteTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelRoute.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelRouteTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._modelRoute_backup_1TableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.modelRoute_backup_1.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._modelRoute_backup_1TableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._serialMacTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.serialMac.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._serialMacTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._sHIPPER_REPORT_TABLETableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_REPORT_TABLE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._sHIPPER_REPORT_TABLETableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._sHIPPER_STATUSTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_STATUS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._sHIPPER_STATUSTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._serialAlvarisetTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.serialAlvariset.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._serialAlvarisetTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._printerTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.printer.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._printerTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._ptTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.pt.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._ptTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._pt_HistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.pt_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._pt_HistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._sHIPPER_SUMMARY_TABLETableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_SUMMARY_TABLE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._sHIPPER_SUMMARY_TABLETableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._usersHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.usersHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._usersHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._wIP_TEMPTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.WIP_TEMP.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._wIP_TEMPTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._usersTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._usersTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._stationTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.station.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._stationTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._station_convertTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.station_convert.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._station_convertTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._stationHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.stationHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._stationHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._kMOUNTINGTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.KMOUNTING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._kMOUNTINGTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._kSEQUENCE_DETAILTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.KSEQUENCE_DETAIL.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._kSEQUENCE_DETAILTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._kSEQUENCE_HEADERTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.KSEQUENCE_HEADER.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._kSEQUENCE_HEADERTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._kITTINGTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.KITTING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._kITTINGTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._defectQCHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.defectQCHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._defectQCHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._fA_NewPTTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.FA_NewPT.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._fA_NewPTTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._faNoTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.faNo.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._faNoTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._kSETTINGSTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.KSETTINGS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._kSETTINGSTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_ATE_errorTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_ATE_error.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_ATE_errorTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_BL_DetailTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_BL_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_BL_DetailTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_BL_Detail_HistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_BL_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_BL_Detail_HistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_alvarion_serialTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_alvarion_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_alvarion_serialTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._labelDefTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.LabelDef.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._labelDefTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._labelDefHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.LabelDefHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._labelDefHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_actionTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_action.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_actionTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._card_HistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.card_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._card_HistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._cardHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.cardHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._cardHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._component_partsTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.component_parts.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._component_partsTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._card_backupTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.card_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._card_backupTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._aOIQ_TempTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.AOIQ_Temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._aOIQ_TempTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._batchTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.batch.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._batchTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._cardTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.card.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._cardTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._cTSTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.CTS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._cTSTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._defectProdTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.defectProd.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._defectProdTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._defectProdHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.defectProdHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._defectProdHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._defectQCTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.defectQC.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._defectQCTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._defectCatQCHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.defectCatQCHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._defectCatQCHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._defectCatProdTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.defectCatProd.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._defectCatProdTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._defectCatProdHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.defectCatProdHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._defectCatProdHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._defectCatQCTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.defectCatQC.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._defectCatQCTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_repair_faTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_repair_fa.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_repair_faTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_repair_serialTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_repair_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_repair_serialTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_serialTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_serialTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_repairTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_repair.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_repairTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_passTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_pass.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_passTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_pass_serialTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_pass_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_pass_serialTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_PreTest_DetailTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_PreTest_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_PreTest_DetailTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_SH_DetailTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_SH_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_SH_DetailTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._lotNumberTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.LotNumber.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._lotNumberTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._machineTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.machine.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._machineTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._machineHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.machineHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._machineHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._lotNoTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.lotNo.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._lotNoTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_SH_Detail_HistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_SH_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_SH_Detail_HistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_SH_HeaderTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_SH_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_SH_HeaderTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_SH_Header_HistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_SH_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_SH_Header_HistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_CT_DetailTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_CT_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_CT_DetailTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_CT_Detail_HistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_CT_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_CT_Detail_HistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_CT_HeaderTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_CT_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_CT_HeaderTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_cardTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_card.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_cardTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_BL_HeaderTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_BL_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_BL_HeaderTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_BL_Header_HistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_BL_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_BL_Header_HistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_CAPATableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_CAPA.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_CAPATableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_CT_Header_HistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_CT_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_CT_Header_HistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_linkTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_link.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_linkTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_linkHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_linkHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_linkHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_lotTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_lot.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_lotTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_labelHistTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_labelHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_labelHistTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_ct_header_tempTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_ct_header_temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_ct_header_tempTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_DATableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_DA.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_DATableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If If (Not (Me._log_labelTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.log_label.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ AndAlso (0 < addedRows.Length)) Then result = (result + Me._log_labelTableAdapter.Update(addedRows)) allAddedRows.AddRange(addedRows) End If End If Return result End Function ''' '''Delete rows in bottom-up order. ''' _ Private Function UpdateDeletedRows(ByVal dataSet As EpsonDataSet1, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 If (Not (Me._log_labelTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_label.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_labelTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_DATableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_DA.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_DATableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_ct_header_tempTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_ct_header_temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_ct_header_tempTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_labelHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_labelHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_labelHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_lotTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_lot.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_lotTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_linkHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_linkHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_linkHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_linkTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_link.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_linkTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_CT_Header_HistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_CT_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_CT_Header_HistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_CAPATableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_CAPA.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_CAPATableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_BL_Header_HistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_BL_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_BL_Header_HistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_BL_HeaderTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_BL_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_BL_HeaderTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_cardTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_card.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_cardTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_CT_HeaderTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_CT_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_CT_HeaderTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_CT_Detail_HistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_CT_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_CT_Detail_HistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_CT_DetailTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_CT_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_CT_DetailTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_SH_Header_HistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_SH_Header_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_SH_Header_HistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_SH_HeaderTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_SH_Header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_SH_HeaderTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_SH_Detail_HistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_SH_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_SH_Detail_HistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._lotNoTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.lotNo.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._lotNoTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._machineHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.machineHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._machineHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._machineTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.machine.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._machineTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._lotNumberTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.LotNumber.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._lotNumberTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_SH_DetailTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_SH_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_SH_DetailTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_PreTest_DetailTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_PreTest_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_PreTest_DetailTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_pass_serialTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_pass_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_pass_serialTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_passTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_pass.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_passTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_repairTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_repair.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_repairTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_serialTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_serialTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_repair_serialTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_repair_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_repair_serialTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_repair_faTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_repair_fa.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_repair_faTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._defectCatQCTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.defectCatQC.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._defectCatQCTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._defectCatProdHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.defectCatProdHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._defectCatProdHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._defectCatProdTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.defectCatProd.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._defectCatProdTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._defectCatQCHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.defectCatQCHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._defectCatQCHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._defectQCTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.defectQC.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._defectQCTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._defectProdHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.defectProdHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._defectProdHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._defectProdTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.defectProd.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._defectProdTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._cTSTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.CTS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._cTSTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._cardTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.card.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._cardTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._batchTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.batch.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._batchTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._aOIQ_TempTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.AOIQ_Temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._aOIQ_TempTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._card_backupTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.card_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._card_backupTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._component_partsTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.component_parts.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._component_partsTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._cardHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.cardHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._cardHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._card_HistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.card_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._card_HistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_actionTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_action.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_actionTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._labelDefHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.LabelDefHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._labelDefHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._labelDefTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.LabelDef.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._labelDefTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_alvarion_serialTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_alvarion_serial.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_alvarion_serialTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_BL_Detail_HistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_BL_Detail_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_BL_Detail_HistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_BL_DetailTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_BL_Detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_BL_DetailTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._log_ATE_errorTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.log_ATE_error.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._log_ATE_errorTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._kSETTINGSTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.KSETTINGS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._kSETTINGSTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._faNoTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.faNo.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._faNoTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._fA_NewPTTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.FA_NewPT.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._fA_NewPTTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._defectQCHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.defectQCHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._defectQCHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._kITTINGTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.KITTING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._kITTINGTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._kSEQUENCE_HEADERTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.KSEQUENCE_HEADER.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._kSEQUENCE_HEADERTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._kSEQUENCE_DETAILTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.KSEQUENCE_DETAIL.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._kSEQUENCE_DETAILTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._kMOUNTINGTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.KMOUNTING.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._kMOUNTINGTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._stationHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.stationHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._stationHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._station_convertTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.station_convert.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._station_convertTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._stationTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.station.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._stationTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._usersTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.users.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._usersTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._wIP_TEMPTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.WIP_TEMP.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._wIP_TEMPTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._usersHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.usersHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._usersHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._sHIPPER_SUMMARY_TABLETableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_SUMMARY_TABLE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._sHIPPER_SUMMARY_TABLETableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._pt_HistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.pt_Hist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._pt_HistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._ptTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.pt.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._ptTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._printerTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.printer.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._printerTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._serialAlvarisetTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.serialAlvariset.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._serialAlvarisetTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._sHIPPER_STATUSTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_STATUS.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._sHIPPER_STATUSTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._sHIPPER_REPORT_TABLETableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.SHIPPER_REPORT_TABLE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._sHIPPER_REPORT_TABLETableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._serialMacTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.serialMac.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._serialMacTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelRoute_backup_1TableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelRoute_backup_1.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelRoute_backup_1TableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelRouteTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelRoute.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelRouteTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelRouteHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelRouteHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelRouteHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelTypeHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelTypeHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelTypeHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelTypeTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelType.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelTypeTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelTempTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelTemp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelTempTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelHierarchyHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelHierarchyHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelHierarchyHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelDimTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelDim.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelDimTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelBackupTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelBackup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelBackupTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.model.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelDimHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelDimHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelDimHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelHierarchyTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelHierarchy.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelHierarchyTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelFamilyHistTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelFamilyHist.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelFamilyHistTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._modelFamilyTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.modelFamily.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._modelFamilyTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._po_headerTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.po_header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._po_headerTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._po_detail_tempTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.po_detail_temp.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._po_detail_tempTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._po_detail_backupTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.po_detail_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._po_detail_backupTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._po_header_backupTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.po_header_backup.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._po_header_backupTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._po_orig_headerTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.po_orig_header.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._po_orig_headerTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._po_orig_detailTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.po_orig_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._po_orig_detailTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._po_history_detailTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.po_history_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._po_history_detailTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._po_detailTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.po_detail.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._po_detailTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._partsModelTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.PartsModel.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._partsModelTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._partsCodeTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.partsCode.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._partsCodeTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._parts_ListTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.Parts_List.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._parts_ListTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._partsPrepTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.PartsPrep.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._partsPrepTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._partsSupplierTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.partsSupplier.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._partsSupplierTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._partsStationTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.partsStation.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._partsStationTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If If (Not (Me._partsRecordsTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.PartsRecords.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ AndAlso (0 < deletedRows.Length)) Then result = (result + Me._partsRecordsTableAdapter.Update(deletedRows)) allChangedRows.AddRange(deletedRows) End If End If Return result End Function ''' '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first ''' _ Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow() If ((updatedRows Is Nothing) _ OrElse (updatedRows.Length < 1)) Then Return updatedRows End If If ((allAddedRows Is Nothing) _ OrElse (allAddedRows.Count < 1)) Then Return updatedRows End If Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim i As Integer = 0 Do While (i < updatedRows.Length) Dim row As Global.System.Data.DataRow = updatedRows(i) If (allAddedRows.Contains(row) = false) Then realUpdatedRows.Add(row) End If i = (i + 1) Loop Return realUpdatedRows.ToArray End Function ''' '''Update all changes to the dataset. ''' _ Public Overridable Function UpdateAll(ByVal dataSet As EpsonDataSet1) As Integer If (dataSet Is Nothing) Then Throw New Global.System.ArgumentNullException("dataSet") End If If (dataSet.HasChanges = false) Then Return 0 End If If ((Not (Me._aOIQ_TempTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._aOIQ_TempTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._batchTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._batchTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._cardTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._cardTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._card_backupTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._card_backupTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._card_HistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._card_HistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._cardHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._cardHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._component_partsTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._component_partsTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._cTSTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._cTSTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._defectCatProdTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._defectCatProdTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._defectCatProdHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._defectCatProdHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._defectCatQCTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._defectCatQCTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._defectCatQCHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._defectCatQCHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._defectProdTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._defectProdTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._defectProdHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._defectProdHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._defectQCTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._defectQCTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._defectQCHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._defectQCHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._fA_NewPTTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._fA_NewPTTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._faNoTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._faNoTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._kITTINGTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._kITTINGTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._kMOUNTINGTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._kMOUNTINGTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._kSEQUENCE_DETAILTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._kSEQUENCE_DETAILTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._kSEQUENCE_HEADERTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._kSEQUENCE_HEADERTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._kSETTINGSTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._kSETTINGSTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._labelDefTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._labelDefTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._labelDefHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._labelDefHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_actionTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_actionTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_alvarion_serialTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_alvarion_serialTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_ATE_errorTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_ATE_errorTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_BL_DetailTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_BL_DetailTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_BL_Detail_HistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_BL_Detail_HistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_BL_HeaderTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_BL_HeaderTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_BL_Header_HistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_BL_Header_HistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_CAPATableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_CAPATableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_cardTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_cardTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_CT_DetailTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_CT_DetailTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_CT_Detail_HistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_CT_Detail_HistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_CT_HeaderTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_CT_HeaderTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_CT_Header_HistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_CT_Header_HistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_ct_header_tempTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_ct_header_tempTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_DATableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_DATableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_labelTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_labelTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_labelHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_labelHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_linkTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_linkTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_linkHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_linkHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_lotTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_lotTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_passTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_passTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_pass_serialTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_pass_serialTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_PreTest_DetailTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_PreTest_DetailTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_repairTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_repairTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_repair_faTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_repair_faTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_repair_serialTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_repair_serialTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_serialTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_serialTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_SH_DetailTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_SH_DetailTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_SH_Detail_HistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_SH_Detail_HistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_SH_HeaderTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_SH_HeaderTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._log_SH_Header_HistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._log_SH_Header_HistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._lotNoTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._lotNoTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._lotNumberTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._lotNumberTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._machineTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._machineTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._machineHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._machineHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelBackupTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelBackupTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelDimTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelDimTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelDimHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelDimHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelFamilyTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelFamilyTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelFamilyHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelFamilyHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelHierarchyTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelHierarchyTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelHierarchyHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelHierarchyHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelRouteTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelRouteTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelRoute_backup_1TableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelRoute_backup_1TableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelRouteHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelRouteHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelTempTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelTempTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelTypeTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelTypeTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._modelTypeHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._modelTypeHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._parts_ListTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._parts_ListTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._partsCodeTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._partsCodeTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._partsModelTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._partsModelTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._partsPrepTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._partsPrepTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._partsRecordsTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._partsRecordsTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._partsStationTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._partsStationTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._partsSupplierTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._partsSupplierTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._po_detailTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._po_detailTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._po_detail_backupTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._po_detail_backupTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._po_detail_tempTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._po_detail_tempTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._po_headerTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._po_headerTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._po_header_backupTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._po_header_backupTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._po_history_detailTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._po_history_detailTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._po_orig_detailTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._po_orig_detailTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._po_orig_headerTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._po_orig_headerTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._printerTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._printerTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._ptTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._ptTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._pt_HistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._pt_HistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._serialAlvarisetTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._serialAlvarisetTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._serialMacTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._serialMacTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._sHIPPER_REPORT_TABLETableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._sHIPPER_REPORT_TABLETableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._sHIPPER_STATUSTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._sHIPPER_STATUSTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._sHIPPER_SUMMARY_TABLETableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._sHIPPER_SUMMARY_TABLETableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._stationTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._stationTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._station_convertTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._station_convertTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._stationHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._stationHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._usersTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._usersTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._usersHistTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._usersHistTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If If ((Not (Me._wIP_TEMPTableAdapter) Is Nothing) _ AndAlso (Me.MatchTableAdapterConnection(Me._wIP_TEMPTableAdapter.Connection) = false)) Then Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _ "tring.") End If Dim workConnection As Global.System.Data.IDbConnection = Me.Connection If (workConnection Is Nothing) Then Throw New Global.System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana"& _ "ger TableAdapter property to a valid TableAdapter instance.") End If Dim workConnOpened As Boolean = false If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _ = Global.System.Data.ConnectionState.Broken) Then workConnection.Close End If If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then workConnection.Open workConnOpened = true End If Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction If (workTransaction Is Nothing) Then Throw New Global.System.ApplicationException("The transaction cannot begin. The current data connection does not support transa"& _ "ctions or the current state is not allowing the transaction to begin.") End If Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)() Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)() Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)() Dim result As Integer = 0 Dim backupDataSet As Global.System.Data.DataSet = Nothing If Me.BackupDataSetBeforeUpdate Then backupDataSet = New Global.System.Data.DataSet() backupDataSet.Merge(dataSet) End If Try '---- Prepare for update ----------- ' If (Not (Me._aOIQ_TempTableAdapter) Is Nothing) Then revertConnections.Add(Me._aOIQ_TempTableAdapter, Me._aOIQ_TempTableAdapter.Connection) Me._aOIQ_TempTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._aOIQ_TempTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._aOIQ_TempTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._aOIQ_TempTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._aOIQ_TempTableAdapter.Adapter) End If End If If (Not (Me._batchTableAdapter) Is Nothing) Then revertConnections.Add(Me._batchTableAdapter, Me._batchTableAdapter.Connection) Me._batchTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._batchTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._batchTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._batchTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._batchTableAdapter.Adapter) End If End If If (Not (Me._cardTableAdapter) Is Nothing) Then revertConnections.Add(Me._cardTableAdapter, Me._cardTableAdapter.Connection) Me._cardTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._cardTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._cardTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._cardTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._cardTableAdapter.Adapter) End If End If If (Not (Me._card_backupTableAdapter) Is Nothing) Then revertConnections.Add(Me._card_backupTableAdapter, Me._card_backupTableAdapter.Connection) Me._card_backupTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._card_backupTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._card_backupTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._card_backupTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._card_backupTableAdapter.Adapter) End If End If If (Not (Me._card_HistTableAdapter) Is Nothing) Then revertConnections.Add(Me._card_HistTableAdapter, Me._card_HistTableAdapter.Connection) Me._card_HistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._card_HistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._card_HistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._card_HistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._card_HistTableAdapter.Adapter) End If End If If (Not (Me._cardHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._cardHistTableAdapter, Me._cardHistTableAdapter.Connection) Me._cardHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._cardHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._cardHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._cardHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._cardHistTableAdapter.Adapter) End If End If If (Not (Me._component_partsTableAdapter) Is Nothing) Then revertConnections.Add(Me._component_partsTableAdapter, Me._component_partsTableAdapter.Connection) Me._component_partsTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._component_partsTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._component_partsTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._component_partsTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._component_partsTableAdapter.Adapter) End If End If If (Not (Me._cTSTableAdapter) Is Nothing) Then revertConnections.Add(Me._cTSTableAdapter, Me._cTSTableAdapter.Connection) Me._cTSTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._cTSTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._cTSTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._cTSTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._cTSTableAdapter.Adapter) End If End If If (Not (Me._defectCatProdTableAdapter) Is Nothing) Then revertConnections.Add(Me._defectCatProdTableAdapter, Me._defectCatProdTableAdapter.Connection) Me._defectCatProdTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._defectCatProdTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._defectCatProdTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._defectCatProdTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._defectCatProdTableAdapter.Adapter) End If End If If (Not (Me._defectCatProdHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._defectCatProdHistTableAdapter, Me._defectCatProdHistTableAdapter.Connection) Me._defectCatProdHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._defectCatProdHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._defectCatProdHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._defectCatProdHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._defectCatProdHistTableAdapter.Adapter) End If End If If (Not (Me._defectCatQCTableAdapter) Is Nothing) Then revertConnections.Add(Me._defectCatQCTableAdapter, Me._defectCatQCTableAdapter.Connection) Me._defectCatQCTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._defectCatQCTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._defectCatQCTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._defectCatQCTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._defectCatQCTableAdapter.Adapter) End If End If If (Not (Me._defectCatQCHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._defectCatQCHistTableAdapter, Me._defectCatQCHistTableAdapter.Connection) Me._defectCatQCHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._defectCatQCHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._defectCatQCHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._defectCatQCHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._defectCatQCHistTableAdapter.Adapter) End If End If If (Not (Me._defectProdTableAdapter) Is Nothing) Then revertConnections.Add(Me._defectProdTableAdapter, Me._defectProdTableAdapter.Connection) Me._defectProdTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._defectProdTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._defectProdTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._defectProdTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._defectProdTableAdapter.Adapter) End If End If If (Not (Me._defectProdHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._defectProdHistTableAdapter, Me._defectProdHistTableAdapter.Connection) Me._defectProdHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._defectProdHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._defectProdHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._defectProdHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._defectProdHistTableAdapter.Adapter) End If End If If (Not (Me._defectQCTableAdapter) Is Nothing) Then revertConnections.Add(Me._defectQCTableAdapter, Me._defectQCTableAdapter.Connection) Me._defectQCTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._defectQCTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._defectQCTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._defectQCTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._defectQCTableAdapter.Adapter) End If End If If (Not (Me._defectQCHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._defectQCHistTableAdapter, Me._defectQCHistTableAdapter.Connection) Me._defectQCHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._defectQCHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._defectQCHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._defectQCHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._defectQCHistTableAdapter.Adapter) End If End If If (Not (Me._fA_NewPTTableAdapter) Is Nothing) Then revertConnections.Add(Me._fA_NewPTTableAdapter, Me._fA_NewPTTableAdapter.Connection) Me._fA_NewPTTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._fA_NewPTTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._fA_NewPTTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._fA_NewPTTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._fA_NewPTTableAdapter.Adapter) End If End If If (Not (Me._faNoTableAdapter) Is Nothing) Then revertConnections.Add(Me._faNoTableAdapter, Me._faNoTableAdapter.Connection) Me._faNoTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._faNoTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._faNoTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._faNoTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._faNoTableAdapter.Adapter) End If End If If (Not (Me._kITTINGTableAdapter) Is Nothing) Then revertConnections.Add(Me._kITTINGTableAdapter, Me._kITTINGTableAdapter.Connection) Me._kITTINGTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._kITTINGTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._kITTINGTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._kITTINGTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._kITTINGTableAdapter.Adapter) End If End If If (Not (Me._kMOUNTINGTableAdapter) Is Nothing) Then revertConnections.Add(Me._kMOUNTINGTableAdapter, Me._kMOUNTINGTableAdapter.Connection) Me._kMOUNTINGTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._kMOUNTINGTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._kMOUNTINGTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._kMOUNTINGTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._kMOUNTINGTableAdapter.Adapter) End If End If If (Not (Me._kSEQUENCE_DETAILTableAdapter) Is Nothing) Then revertConnections.Add(Me._kSEQUENCE_DETAILTableAdapter, Me._kSEQUENCE_DETAILTableAdapter.Connection) Me._kSEQUENCE_DETAILTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._kSEQUENCE_DETAILTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._kSEQUENCE_DETAILTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._kSEQUENCE_DETAILTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._kSEQUENCE_DETAILTableAdapter.Adapter) End If End If If (Not (Me._kSEQUENCE_HEADERTableAdapter) Is Nothing) Then revertConnections.Add(Me._kSEQUENCE_HEADERTableAdapter, Me._kSEQUENCE_HEADERTableAdapter.Connection) Me._kSEQUENCE_HEADERTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._kSEQUENCE_HEADERTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._kSEQUENCE_HEADERTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._kSEQUENCE_HEADERTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._kSEQUENCE_HEADERTableAdapter.Adapter) End If End If If (Not (Me._kSETTINGSTableAdapter) Is Nothing) Then revertConnections.Add(Me._kSETTINGSTableAdapter, Me._kSETTINGSTableAdapter.Connection) Me._kSETTINGSTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._kSETTINGSTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._kSETTINGSTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._kSETTINGSTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._kSETTINGSTableAdapter.Adapter) End If End If If (Not (Me._labelDefTableAdapter) Is Nothing) Then revertConnections.Add(Me._labelDefTableAdapter, Me._labelDefTableAdapter.Connection) Me._labelDefTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._labelDefTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._labelDefTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._labelDefTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._labelDefTableAdapter.Adapter) End If End If If (Not (Me._labelDefHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._labelDefHistTableAdapter, Me._labelDefHistTableAdapter.Connection) Me._labelDefHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._labelDefHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._labelDefHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._labelDefHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._labelDefHistTableAdapter.Adapter) End If End If If (Not (Me._log_actionTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_actionTableAdapter, Me._log_actionTableAdapter.Connection) Me._log_actionTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_actionTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_actionTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_actionTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_actionTableAdapter.Adapter) End If End If If (Not (Me._log_alvarion_serialTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_alvarion_serialTableAdapter, Me._log_alvarion_serialTableAdapter.Connection) Me._log_alvarion_serialTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_alvarion_serialTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_alvarion_serialTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_alvarion_serialTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_alvarion_serialTableAdapter.Adapter) End If End If If (Not (Me._log_ATE_errorTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_ATE_errorTableAdapter, Me._log_ATE_errorTableAdapter.Connection) Me._log_ATE_errorTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_ATE_errorTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_ATE_errorTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_ATE_errorTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_ATE_errorTableAdapter.Adapter) End If End If If (Not (Me._log_BL_DetailTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_BL_DetailTableAdapter, Me._log_BL_DetailTableAdapter.Connection) Me._log_BL_DetailTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_BL_DetailTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_BL_DetailTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_BL_DetailTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_BL_DetailTableAdapter.Adapter) End If End If If (Not (Me._log_BL_Detail_HistTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_BL_Detail_HistTableAdapter, Me._log_BL_Detail_HistTableAdapter.Connection) Me._log_BL_Detail_HistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_BL_Detail_HistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_BL_Detail_HistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_BL_Detail_HistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_BL_Detail_HistTableAdapter.Adapter) End If End If If (Not (Me._log_BL_HeaderTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_BL_HeaderTableAdapter, Me._log_BL_HeaderTableAdapter.Connection) Me._log_BL_HeaderTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_BL_HeaderTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_BL_HeaderTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_BL_HeaderTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_BL_HeaderTableAdapter.Adapter) End If End If If (Not (Me._log_BL_Header_HistTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_BL_Header_HistTableAdapter, Me._log_BL_Header_HistTableAdapter.Connection) Me._log_BL_Header_HistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_BL_Header_HistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_BL_Header_HistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_BL_Header_HistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_BL_Header_HistTableAdapter.Adapter) End If End If If (Not (Me._log_CAPATableAdapter) Is Nothing) Then revertConnections.Add(Me._log_CAPATableAdapter, Me._log_CAPATableAdapter.Connection) Me._log_CAPATableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_CAPATableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_CAPATableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_CAPATableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_CAPATableAdapter.Adapter) End If End If If (Not (Me._log_cardTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_cardTableAdapter, Me._log_cardTableAdapter.Connection) Me._log_cardTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_cardTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_cardTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_cardTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_cardTableAdapter.Adapter) End If End If If (Not (Me._log_CT_DetailTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_CT_DetailTableAdapter, Me._log_CT_DetailTableAdapter.Connection) Me._log_CT_DetailTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_CT_DetailTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_CT_DetailTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_CT_DetailTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_CT_DetailTableAdapter.Adapter) End If End If If (Not (Me._log_CT_Detail_HistTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_CT_Detail_HistTableAdapter, Me._log_CT_Detail_HistTableAdapter.Connection) Me._log_CT_Detail_HistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_CT_Detail_HistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_CT_Detail_HistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_CT_Detail_HistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_CT_Detail_HistTableAdapter.Adapter) End If End If If (Not (Me._log_CT_HeaderTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_CT_HeaderTableAdapter, Me._log_CT_HeaderTableAdapter.Connection) Me._log_CT_HeaderTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_CT_HeaderTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_CT_HeaderTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_CT_HeaderTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_CT_HeaderTableAdapter.Adapter) End If End If If (Not (Me._log_CT_Header_HistTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_CT_Header_HistTableAdapter, Me._log_CT_Header_HistTableAdapter.Connection) Me._log_CT_Header_HistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_CT_Header_HistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_CT_Header_HistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_CT_Header_HistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_CT_Header_HistTableAdapter.Adapter) End If End If If (Not (Me._log_ct_header_tempTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_ct_header_tempTableAdapter, Me._log_ct_header_tempTableAdapter.Connection) Me._log_ct_header_tempTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_ct_header_tempTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_ct_header_tempTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_ct_header_tempTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_ct_header_tempTableAdapter.Adapter) End If End If If (Not (Me._log_DATableAdapter) Is Nothing) Then revertConnections.Add(Me._log_DATableAdapter, Me._log_DATableAdapter.Connection) Me._log_DATableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_DATableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_DATableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_DATableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_DATableAdapter.Adapter) End If End If If (Not (Me._log_labelTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_labelTableAdapter, Me._log_labelTableAdapter.Connection) Me._log_labelTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_labelTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_labelTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_labelTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_labelTableAdapter.Adapter) End If End If If (Not (Me._log_labelHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_labelHistTableAdapter, Me._log_labelHistTableAdapter.Connection) Me._log_labelHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_labelHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_labelHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_labelHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_labelHistTableAdapter.Adapter) End If End If If (Not (Me._log_linkTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_linkTableAdapter, Me._log_linkTableAdapter.Connection) Me._log_linkTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_linkTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_linkTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_linkTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_linkTableAdapter.Adapter) End If End If If (Not (Me._log_linkHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_linkHistTableAdapter, Me._log_linkHistTableAdapter.Connection) Me._log_linkHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_linkHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_linkHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_linkHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_linkHistTableAdapter.Adapter) End If End If If (Not (Me._log_lotTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_lotTableAdapter, Me._log_lotTableAdapter.Connection) Me._log_lotTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_lotTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_lotTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_lotTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_lotTableAdapter.Adapter) End If End If If (Not (Me._log_passTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_passTableAdapter, Me._log_passTableAdapter.Connection) Me._log_passTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_passTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_passTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_passTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_passTableAdapter.Adapter) End If End If If (Not (Me._log_pass_serialTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_pass_serialTableAdapter, Me._log_pass_serialTableAdapter.Connection) Me._log_pass_serialTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_pass_serialTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_pass_serialTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_pass_serialTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_pass_serialTableAdapter.Adapter) End If End If If (Not (Me._log_PreTest_DetailTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_PreTest_DetailTableAdapter, Me._log_PreTest_DetailTableAdapter.Connection) Me._log_PreTest_DetailTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_PreTest_DetailTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_PreTest_DetailTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_PreTest_DetailTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_PreTest_DetailTableAdapter.Adapter) End If End If If (Not (Me._log_repairTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_repairTableAdapter, Me._log_repairTableAdapter.Connection) Me._log_repairTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_repairTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_repairTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_repairTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_repairTableAdapter.Adapter) End If End If If (Not (Me._log_repair_faTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_repair_faTableAdapter, Me._log_repair_faTableAdapter.Connection) Me._log_repair_faTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_repair_faTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_repair_faTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_repair_faTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_repair_faTableAdapter.Adapter) End If End If If (Not (Me._log_repair_serialTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_repair_serialTableAdapter, Me._log_repair_serialTableAdapter.Connection) Me._log_repair_serialTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_repair_serialTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_repair_serialTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_repair_serialTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_repair_serialTableAdapter.Adapter) End If End If If (Not (Me._log_serialTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_serialTableAdapter, Me._log_serialTableAdapter.Connection) Me._log_serialTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_serialTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_serialTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_serialTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_serialTableAdapter.Adapter) End If End If If (Not (Me._log_SH_DetailTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_SH_DetailTableAdapter, Me._log_SH_DetailTableAdapter.Connection) Me._log_SH_DetailTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_SH_DetailTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_SH_DetailTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_SH_DetailTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_SH_DetailTableAdapter.Adapter) End If End If If (Not (Me._log_SH_Detail_HistTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_SH_Detail_HistTableAdapter, Me._log_SH_Detail_HistTableAdapter.Connection) Me._log_SH_Detail_HistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_SH_Detail_HistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_SH_Detail_HistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_SH_Detail_HistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_SH_Detail_HistTableAdapter.Adapter) End If End If If (Not (Me._log_SH_HeaderTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_SH_HeaderTableAdapter, Me._log_SH_HeaderTableAdapter.Connection) Me._log_SH_HeaderTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_SH_HeaderTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_SH_HeaderTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_SH_HeaderTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_SH_HeaderTableAdapter.Adapter) End If End If If (Not (Me._log_SH_Header_HistTableAdapter) Is Nothing) Then revertConnections.Add(Me._log_SH_Header_HistTableAdapter, Me._log_SH_Header_HistTableAdapter.Connection) Me._log_SH_Header_HistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._log_SH_Header_HistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._log_SH_Header_HistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._log_SH_Header_HistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._log_SH_Header_HistTableAdapter.Adapter) End If End If If (Not (Me._lotNoTableAdapter) Is Nothing) Then revertConnections.Add(Me._lotNoTableAdapter, Me._lotNoTableAdapter.Connection) Me._lotNoTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._lotNoTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._lotNoTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._lotNoTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._lotNoTableAdapter.Adapter) End If End If If (Not (Me._lotNumberTableAdapter) Is Nothing) Then revertConnections.Add(Me._lotNumberTableAdapter, Me._lotNumberTableAdapter.Connection) Me._lotNumberTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._lotNumberTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._lotNumberTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._lotNumberTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._lotNumberTableAdapter.Adapter) End If End If If (Not (Me._machineTableAdapter) Is Nothing) Then revertConnections.Add(Me._machineTableAdapter, Me._machineTableAdapter.Connection) Me._machineTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._machineTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._machineTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._machineTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._machineTableAdapter.Adapter) End If End If If (Not (Me._machineHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._machineHistTableAdapter, Me._machineHistTableAdapter.Connection) Me._machineHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._machineHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._machineHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._machineHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._machineHistTableAdapter.Adapter) End If End If If (Not (Me._modelTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelTableAdapter, Me._modelTableAdapter.Connection) Me._modelTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelTableAdapter.Adapter) End If End If If (Not (Me._modelBackupTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelBackupTableAdapter, Me._modelBackupTableAdapter.Connection) Me._modelBackupTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelBackupTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelBackupTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelBackupTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelBackupTableAdapter.Adapter) End If End If If (Not (Me._modelDimTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelDimTableAdapter, Me._modelDimTableAdapter.Connection) Me._modelDimTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelDimTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelDimTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelDimTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelDimTableAdapter.Adapter) End If End If If (Not (Me._modelDimHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelDimHistTableAdapter, Me._modelDimHistTableAdapter.Connection) Me._modelDimHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelDimHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelDimHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelDimHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelDimHistTableAdapter.Adapter) End If End If If (Not (Me._modelFamilyTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelFamilyTableAdapter, Me._modelFamilyTableAdapter.Connection) Me._modelFamilyTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelFamilyTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelFamilyTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelFamilyTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelFamilyTableAdapter.Adapter) End If End If If (Not (Me._modelFamilyHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelFamilyHistTableAdapter, Me._modelFamilyHistTableAdapter.Connection) Me._modelFamilyHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelFamilyHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelFamilyHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelFamilyHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelFamilyHistTableAdapter.Adapter) End If End If If (Not (Me._modelHierarchyTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelHierarchyTableAdapter, Me._modelHierarchyTableAdapter.Connection) Me._modelHierarchyTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelHierarchyTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelHierarchyTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelHierarchyTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelHierarchyTableAdapter.Adapter) End If End If If (Not (Me._modelHierarchyHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelHierarchyHistTableAdapter, Me._modelHierarchyHistTableAdapter.Connection) Me._modelHierarchyHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelHierarchyHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelHierarchyHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelHierarchyHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelHierarchyHistTableAdapter.Adapter) End If End If If (Not (Me._modelHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelHistTableAdapter, Me._modelHistTableAdapter.Connection) Me._modelHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelHistTableAdapter.Adapter) End If End If If (Not (Me._modelRouteTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelRouteTableAdapter, Me._modelRouteTableAdapter.Connection) Me._modelRouteTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelRouteTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelRouteTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelRouteTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelRouteTableAdapter.Adapter) End If End If If (Not (Me._modelRoute_backup_1TableAdapter) Is Nothing) Then revertConnections.Add(Me._modelRoute_backup_1TableAdapter, Me._modelRoute_backup_1TableAdapter.Connection) Me._modelRoute_backup_1TableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelRoute_backup_1TableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelRoute_backup_1TableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelRoute_backup_1TableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelRoute_backup_1TableAdapter.Adapter) End If End If If (Not (Me._modelRouteHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelRouteHistTableAdapter, Me._modelRouteHistTableAdapter.Connection) Me._modelRouteHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelRouteHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelRouteHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelRouteHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelRouteHistTableAdapter.Adapter) End If End If If (Not (Me._modelTempTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelTempTableAdapter, Me._modelTempTableAdapter.Connection) Me._modelTempTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelTempTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelTempTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelTempTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelTempTableAdapter.Adapter) End If End If If (Not (Me._modelTypeTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelTypeTableAdapter, Me._modelTypeTableAdapter.Connection) Me._modelTypeTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelTypeTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelTypeTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelTypeTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelTypeTableAdapter.Adapter) End If End If If (Not (Me._modelTypeHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._modelTypeHistTableAdapter, Me._modelTypeHistTableAdapter.Connection) Me._modelTypeHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._modelTypeHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._modelTypeHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._modelTypeHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._modelTypeHistTableAdapter.Adapter) End If End If If (Not (Me._parts_ListTableAdapter) Is Nothing) Then revertConnections.Add(Me._parts_ListTableAdapter, Me._parts_ListTableAdapter.Connection) Me._parts_ListTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._parts_ListTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._parts_ListTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._parts_ListTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._parts_ListTableAdapter.Adapter) End If End If If (Not (Me._partsCodeTableAdapter) Is Nothing) Then revertConnections.Add(Me._partsCodeTableAdapter, Me._partsCodeTableAdapter.Connection) Me._partsCodeTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._partsCodeTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._partsCodeTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._partsCodeTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._partsCodeTableAdapter.Adapter) End If End If If (Not (Me._partsModelTableAdapter) Is Nothing) Then revertConnections.Add(Me._partsModelTableAdapter, Me._partsModelTableAdapter.Connection) Me._partsModelTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._partsModelTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._partsModelTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._partsModelTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._partsModelTableAdapter.Adapter) End If End If If (Not (Me._partsPrepTableAdapter) Is Nothing) Then revertConnections.Add(Me._partsPrepTableAdapter, Me._partsPrepTableAdapter.Connection) Me._partsPrepTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._partsPrepTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._partsPrepTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._partsPrepTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._partsPrepTableAdapter.Adapter) End If End If If (Not (Me._partsRecordsTableAdapter) Is Nothing) Then revertConnections.Add(Me._partsRecordsTableAdapter, Me._partsRecordsTableAdapter.Connection) Me._partsRecordsTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._partsRecordsTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._partsRecordsTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._partsRecordsTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._partsRecordsTableAdapter.Adapter) End If End If If (Not (Me._partsStationTableAdapter) Is Nothing) Then revertConnections.Add(Me._partsStationTableAdapter, Me._partsStationTableAdapter.Connection) Me._partsStationTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._partsStationTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._partsStationTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._partsStationTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._partsStationTableAdapter.Adapter) End If End If If (Not (Me._partsSupplierTableAdapter) Is Nothing) Then revertConnections.Add(Me._partsSupplierTableAdapter, Me._partsSupplierTableAdapter.Connection) Me._partsSupplierTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._partsSupplierTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._partsSupplierTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._partsSupplierTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._partsSupplierTableAdapter.Adapter) End If End If If (Not (Me._po_detailTableAdapter) Is Nothing) Then revertConnections.Add(Me._po_detailTableAdapter, Me._po_detailTableAdapter.Connection) Me._po_detailTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._po_detailTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._po_detailTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._po_detailTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._po_detailTableAdapter.Adapter) End If End If If (Not (Me._po_detail_backupTableAdapter) Is Nothing) Then revertConnections.Add(Me._po_detail_backupTableAdapter, Me._po_detail_backupTableAdapter.Connection) Me._po_detail_backupTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._po_detail_backupTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._po_detail_backupTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._po_detail_backupTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._po_detail_backupTableAdapter.Adapter) End If End If If (Not (Me._po_detail_tempTableAdapter) Is Nothing) Then revertConnections.Add(Me._po_detail_tempTableAdapter, Me._po_detail_tempTableAdapter.Connection) Me._po_detail_tempTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._po_detail_tempTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._po_detail_tempTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._po_detail_tempTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._po_detail_tempTableAdapter.Adapter) End If End If If (Not (Me._po_headerTableAdapter) Is Nothing) Then revertConnections.Add(Me._po_headerTableAdapter, Me._po_headerTableAdapter.Connection) Me._po_headerTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._po_headerTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._po_headerTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._po_headerTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._po_headerTableAdapter.Adapter) End If End If If (Not (Me._po_header_backupTableAdapter) Is Nothing) Then revertConnections.Add(Me._po_header_backupTableAdapter, Me._po_header_backupTableAdapter.Connection) Me._po_header_backupTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._po_header_backupTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._po_header_backupTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._po_header_backupTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._po_header_backupTableAdapter.Adapter) End If End If If (Not (Me._po_history_detailTableAdapter) Is Nothing) Then revertConnections.Add(Me._po_history_detailTableAdapter, Me._po_history_detailTableAdapter.Connection) Me._po_history_detailTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._po_history_detailTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._po_history_detailTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._po_history_detailTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._po_history_detailTableAdapter.Adapter) End If End If If (Not (Me._po_orig_detailTableAdapter) Is Nothing) Then revertConnections.Add(Me._po_orig_detailTableAdapter, Me._po_orig_detailTableAdapter.Connection) Me._po_orig_detailTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._po_orig_detailTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._po_orig_detailTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._po_orig_detailTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._po_orig_detailTableAdapter.Adapter) End If End If If (Not (Me._po_orig_headerTableAdapter) Is Nothing) Then revertConnections.Add(Me._po_orig_headerTableAdapter, Me._po_orig_headerTableAdapter.Connection) Me._po_orig_headerTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._po_orig_headerTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._po_orig_headerTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._po_orig_headerTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._po_orig_headerTableAdapter.Adapter) End If End If If (Not (Me._printerTableAdapter) Is Nothing) Then revertConnections.Add(Me._printerTableAdapter, Me._printerTableAdapter.Connection) Me._printerTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._printerTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._printerTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._printerTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._printerTableAdapter.Adapter) End If End If If (Not (Me._ptTableAdapter) Is Nothing) Then revertConnections.Add(Me._ptTableAdapter, Me._ptTableAdapter.Connection) Me._ptTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._ptTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._ptTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._ptTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._ptTableAdapter.Adapter) End If End If If (Not (Me._pt_HistTableAdapter) Is Nothing) Then revertConnections.Add(Me._pt_HistTableAdapter, Me._pt_HistTableAdapter.Connection) Me._pt_HistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._pt_HistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._pt_HistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._pt_HistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._pt_HistTableAdapter.Adapter) End If End If If (Not (Me._serialAlvarisetTableAdapter) Is Nothing) Then revertConnections.Add(Me._serialAlvarisetTableAdapter, Me._serialAlvarisetTableAdapter.Connection) Me._serialAlvarisetTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._serialAlvarisetTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._serialAlvarisetTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._serialAlvarisetTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._serialAlvarisetTableAdapter.Adapter) End If End If If (Not (Me._serialMacTableAdapter) Is Nothing) Then revertConnections.Add(Me._serialMacTableAdapter, Me._serialMacTableAdapter.Connection) Me._serialMacTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._serialMacTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._serialMacTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._serialMacTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._serialMacTableAdapter.Adapter) End If End If If (Not (Me._sHIPPER_REPORT_TABLETableAdapter) Is Nothing) Then revertConnections.Add(Me._sHIPPER_REPORT_TABLETableAdapter, Me._sHIPPER_REPORT_TABLETableAdapter.Connection) Me._sHIPPER_REPORT_TABLETableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._sHIPPER_REPORT_TABLETableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._sHIPPER_REPORT_TABLETableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._sHIPPER_REPORT_TABLETableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._sHIPPER_REPORT_TABLETableAdapter.Adapter) End If End If If (Not (Me._sHIPPER_STATUSTableAdapter) Is Nothing) Then revertConnections.Add(Me._sHIPPER_STATUSTableAdapter, Me._sHIPPER_STATUSTableAdapter.Connection) Me._sHIPPER_STATUSTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._sHIPPER_STATUSTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._sHIPPER_STATUSTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._sHIPPER_STATUSTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._sHIPPER_STATUSTableAdapter.Adapter) End If End If If (Not (Me._sHIPPER_SUMMARY_TABLETableAdapter) Is Nothing) Then revertConnections.Add(Me._sHIPPER_SUMMARY_TABLETableAdapter, Me._sHIPPER_SUMMARY_TABLETableAdapter.Connection) Me._sHIPPER_SUMMARY_TABLETableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._sHIPPER_SUMMARY_TABLETableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._sHIPPER_SUMMARY_TABLETableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._sHIPPER_SUMMARY_TABLETableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._sHIPPER_SUMMARY_TABLETableAdapter.Adapter) End If End If If (Not (Me._stationTableAdapter) Is Nothing) Then revertConnections.Add(Me._stationTableAdapter, Me._stationTableAdapter.Connection) Me._stationTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._stationTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._stationTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._stationTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._stationTableAdapter.Adapter) End If End If If (Not (Me._station_convertTableAdapter) Is Nothing) Then revertConnections.Add(Me._station_convertTableAdapter, Me._station_convertTableAdapter.Connection) Me._station_convertTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._station_convertTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._station_convertTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._station_convertTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._station_convertTableAdapter.Adapter) End If End If If (Not (Me._stationHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._stationHistTableAdapter, Me._stationHistTableAdapter.Connection) Me._stationHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._stationHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._stationHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._stationHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._stationHistTableAdapter.Adapter) End If End If If (Not (Me._usersTableAdapter) Is Nothing) Then revertConnections.Add(Me._usersTableAdapter, Me._usersTableAdapter.Connection) Me._usersTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._usersTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._usersTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._usersTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._usersTableAdapter.Adapter) End If End If If (Not (Me._usersHistTableAdapter) Is Nothing) Then revertConnections.Add(Me._usersHistTableAdapter, Me._usersHistTableAdapter.Connection) Me._usersHistTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._usersHistTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._usersHistTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._usersHistTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._usersHistTableAdapter.Adapter) End If End If If (Not (Me._wIP_TEMPTableAdapter) Is Nothing) Then revertConnections.Add(Me._wIP_TEMPTableAdapter, Me._wIP_TEMPTableAdapter.Connection) Me._wIP_TEMPTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) Me._wIP_TEMPTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) If Me._wIP_TEMPTableAdapter.Adapter.AcceptChangesDuringUpdate Then Me._wIP_TEMPTableAdapter.Adapter.AcceptChangesDuringUpdate = false adaptersWithAcceptChangesDuringUpdate.Add(Me._wIP_TEMPTableAdapter.Adapter) End If End If ' '---- Perform updates ----------- ' If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)) result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows)) Else result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows)) result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)) End If result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows)) ' '---- Commit updates ----------- ' workTransaction.Commit If (0 < allAddedRows.Count) Then Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow allAddedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges i = (i + 1) Loop End If If (0 < allChangedRows.Count) Then Dim rows((allChangedRows.Count) - 1) As Global.System.Data.DataRow allChangedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges i = (i + 1) Loop End If Catch ex As Global.System.Exception workTransaction.Rollback '---- Restore the dataset ----------- If Me.BackupDataSetBeforeUpdate Then Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing)) dataSet.Clear dataSet.Merge(backupDataSet) Else If (0 < allAddedRows.Count) Then Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow allAddedRows.CopyTo(rows) Dim i As Integer = 0 Do While (i < rows.Length) Dim row As Global.System.Data.DataRow = rows(i) row.AcceptChanges row.SetAdded i = (i + 1) Loop End If End If Throw ex Finally If workConnOpened Then workConnection.Close End If If (Not (Me._aOIQ_TempTableAdapter) Is Nothing) Then Me._aOIQ_TempTableAdapter.Connection = CType(revertConnections(Me._aOIQ_TempTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._aOIQ_TempTableAdapter.Transaction = Nothing End If If (Not (Me._batchTableAdapter) Is Nothing) Then Me._batchTableAdapter.Connection = CType(revertConnections(Me._batchTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._batchTableAdapter.Transaction = Nothing End If If (Not (Me._cardTableAdapter) Is Nothing) Then Me._cardTableAdapter.Connection = CType(revertConnections(Me._cardTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._cardTableAdapter.Transaction = Nothing End If If (Not (Me._card_backupTableAdapter) Is Nothing) Then Me._card_backupTableAdapter.Connection = CType(revertConnections(Me._card_backupTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._card_backupTableAdapter.Transaction = Nothing End If If (Not (Me._card_HistTableAdapter) Is Nothing) Then Me._card_HistTableAdapter.Connection = CType(revertConnections(Me._card_HistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._card_HistTableAdapter.Transaction = Nothing End If If (Not (Me._cardHistTableAdapter) Is Nothing) Then Me._cardHistTableAdapter.Connection = CType(revertConnections(Me._cardHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._cardHistTableAdapter.Transaction = Nothing End If If (Not (Me._component_partsTableAdapter) Is Nothing) Then Me._component_partsTableAdapter.Connection = CType(revertConnections(Me._component_partsTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._component_partsTableAdapter.Transaction = Nothing End If If (Not (Me._cTSTableAdapter) Is Nothing) Then Me._cTSTableAdapter.Connection = CType(revertConnections(Me._cTSTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._cTSTableAdapter.Transaction = Nothing End If If (Not (Me._defectCatProdTableAdapter) Is Nothing) Then Me._defectCatProdTableAdapter.Connection = CType(revertConnections(Me._defectCatProdTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._defectCatProdTableAdapter.Transaction = Nothing End If If (Not (Me._defectCatProdHistTableAdapter) Is Nothing) Then Me._defectCatProdHistTableAdapter.Connection = CType(revertConnections(Me._defectCatProdHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._defectCatProdHistTableAdapter.Transaction = Nothing End If If (Not (Me._defectCatQCTableAdapter) Is Nothing) Then Me._defectCatQCTableAdapter.Connection = CType(revertConnections(Me._defectCatQCTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._defectCatQCTableAdapter.Transaction = Nothing End If If (Not (Me._defectCatQCHistTableAdapter) Is Nothing) Then Me._defectCatQCHistTableAdapter.Connection = CType(revertConnections(Me._defectCatQCHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._defectCatQCHistTableAdapter.Transaction = Nothing End If If (Not (Me._defectProdTableAdapter) Is Nothing) Then Me._defectProdTableAdapter.Connection = CType(revertConnections(Me._defectProdTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._defectProdTableAdapter.Transaction = Nothing End If If (Not (Me._defectProdHistTableAdapter) Is Nothing) Then Me._defectProdHistTableAdapter.Connection = CType(revertConnections(Me._defectProdHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._defectProdHistTableAdapter.Transaction = Nothing End If If (Not (Me._defectQCTableAdapter) Is Nothing) Then Me._defectQCTableAdapter.Connection = CType(revertConnections(Me._defectQCTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._defectQCTableAdapter.Transaction = Nothing End If If (Not (Me._defectQCHistTableAdapter) Is Nothing) Then Me._defectQCHistTableAdapter.Connection = CType(revertConnections(Me._defectQCHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._defectQCHistTableAdapter.Transaction = Nothing End If If (Not (Me._fA_NewPTTableAdapter) Is Nothing) Then Me._fA_NewPTTableAdapter.Connection = CType(revertConnections(Me._fA_NewPTTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._fA_NewPTTableAdapter.Transaction = Nothing End If If (Not (Me._faNoTableAdapter) Is Nothing) Then Me._faNoTableAdapter.Connection = CType(revertConnections(Me._faNoTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._faNoTableAdapter.Transaction = Nothing End If If (Not (Me._kITTINGTableAdapter) Is Nothing) Then Me._kITTINGTableAdapter.Connection = CType(revertConnections(Me._kITTINGTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._kITTINGTableAdapter.Transaction = Nothing End If If (Not (Me._kMOUNTINGTableAdapter) Is Nothing) Then Me._kMOUNTINGTableAdapter.Connection = CType(revertConnections(Me._kMOUNTINGTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._kMOUNTINGTableAdapter.Transaction = Nothing End If If (Not (Me._kSEQUENCE_DETAILTableAdapter) Is Nothing) Then Me._kSEQUENCE_DETAILTableAdapter.Connection = CType(revertConnections(Me._kSEQUENCE_DETAILTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._kSEQUENCE_DETAILTableAdapter.Transaction = Nothing End If If (Not (Me._kSEQUENCE_HEADERTableAdapter) Is Nothing) Then Me._kSEQUENCE_HEADERTableAdapter.Connection = CType(revertConnections(Me._kSEQUENCE_HEADERTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._kSEQUENCE_HEADERTableAdapter.Transaction = Nothing End If If (Not (Me._kSETTINGSTableAdapter) Is Nothing) Then Me._kSETTINGSTableAdapter.Connection = CType(revertConnections(Me._kSETTINGSTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._kSETTINGSTableAdapter.Transaction = Nothing End If If (Not (Me._labelDefTableAdapter) Is Nothing) Then Me._labelDefTableAdapter.Connection = CType(revertConnections(Me._labelDefTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._labelDefTableAdapter.Transaction = Nothing End If If (Not (Me._labelDefHistTableAdapter) Is Nothing) Then Me._labelDefHistTableAdapter.Connection = CType(revertConnections(Me._labelDefHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._labelDefHistTableAdapter.Transaction = Nothing End If If (Not (Me._log_actionTableAdapter) Is Nothing) Then Me._log_actionTableAdapter.Connection = CType(revertConnections(Me._log_actionTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_actionTableAdapter.Transaction = Nothing End If If (Not (Me._log_alvarion_serialTableAdapter) Is Nothing) Then Me._log_alvarion_serialTableAdapter.Connection = CType(revertConnections(Me._log_alvarion_serialTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_alvarion_serialTableAdapter.Transaction = Nothing End If If (Not (Me._log_ATE_errorTableAdapter) Is Nothing) Then Me._log_ATE_errorTableAdapter.Connection = CType(revertConnections(Me._log_ATE_errorTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_ATE_errorTableAdapter.Transaction = Nothing End If If (Not (Me._log_BL_DetailTableAdapter) Is Nothing) Then Me._log_BL_DetailTableAdapter.Connection = CType(revertConnections(Me._log_BL_DetailTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_BL_DetailTableAdapter.Transaction = Nothing End If If (Not (Me._log_BL_Detail_HistTableAdapter) Is Nothing) Then Me._log_BL_Detail_HistTableAdapter.Connection = CType(revertConnections(Me._log_BL_Detail_HistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_BL_Detail_HistTableAdapter.Transaction = Nothing End If If (Not (Me._log_BL_HeaderTableAdapter) Is Nothing) Then Me._log_BL_HeaderTableAdapter.Connection = CType(revertConnections(Me._log_BL_HeaderTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_BL_HeaderTableAdapter.Transaction = Nothing End If If (Not (Me._log_BL_Header_HistTableAdapter) Is Nothing) Then Me._log_BL_Header_HistTableAdapter.Connection = CType(revertConnections(Me._log_BL_Header_HistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_BL_Header_HistTableAdapter.Transaction = Nothing End If If (Not (Me._log_CAPATableAdapter) Is Nothing) Then Me._log_CAPATableAdapter.Connection = CType(revertConnections(Me._log_CAPATableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_CAPATableAdapter.Transaction = Nothing End If If (Not (Me._log_cardTableAdapter) Is Nothing) Then Me._log_cardTableAdapter.Connection = CType(revertConnections(Me._log_cardTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_cardTableAdapter.Transaction = Nothing End If If (Not (Me._log_CT_DetailTableAdapter) Is Nothing) Then Me._log_CT_DetailTableAdapter.Connection = CType(revertConnections(Me._log_CT_DetailTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_CT_DetailTableAdapter.Transaction = Nothing End If If (Not (Me._log_CT_Detail_HistTableAdapter) Is Nothing) Then Me._log_CT_Detail_HistTableAdapter.Connection = CType(revertConnections(Me._log_CT_Detail_HistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_CT_Detail_HistTableAdapter.Transaction = Nothing End If If (Not (Me._log_CT_HeaderTableAdapter) Is Nothing) Then Me._log_CT_HeaderTableAdapter.Connection = CType(revertConnections(Me._log_CT_HeaderTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_CT_HeaderTableAdapter.Transaction = Nothing End If If (Not (Me._log_CT_Header_HistTableAdapter) Is Nothing) Then Me._log_CT_Header_HistTableAdapter.Connection = CType(revertConnections(Me._log_CT_Header_HistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_CT_Header_HistTableAdapter.Transaction = Nothing End If If (Not (Me._log_ct_header_tempTableAdapter) Is Nothing) Then Me._log_ct_header_tempTableAdapter.Connection = CType(revertConnections(Me._log_ct_header_tempTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_ct_header_tempTableAdapter.Transaction = Nothing End If If (Not (Me._log_DATableAdapter) Is Nothing) Then Me._log_DATableAdapter.Connection = CType(revertConnections(Me._log_DATableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_DATableAdapter.Transaction = Nothing End If If (Not (Me._log_labelTableAdapter) Is Nothing) Then Me._log_labelTableAdapter.Connection = CType(revertConnections(Me._log_labelTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_labelTableAdapter.Transaction = Nothing End If If (Not (Me._log_labelHistTableAdapter) Is Nothing) Then Me._log_labelHistTableAdapter.Connection = CType(revertConnections(Me._log_labelHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_labelHistTableAdapter.Transaction = Nothing End If If (Not (Me._log_linkTableAdapter) Is Nothing) Then Me._log_linkTableAdapter.Connection = CType(revertConnections(Me._log_linkTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_linkTableAdapter.Transaction = Nothing End If If (Not (Me._log_linkHistTableAdapter) Is Nothing) Then Me._log_linkHistTableAdapter.Connection = CType(revertConnections(Me._log_linkHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_linkHistTableAdapter.Transaction = Nothing End If If (Not (Me._log_lotTableAdapter) Is Nothing) Then Me._log_lotTableAdapter.Connection = CType(revertConnections(Me._log_lotTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_lotTableAdapter.Transaction = Nothing End If If (Not (Me._log_passTableAdapter) Is Nothing) Then Me._log_passTableAdapter.Connection = CType(revertConnections(Me._log_passTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_passTableAdapter.Transaction = Nothing End If If (Not (Me._log_pass_serialTableAdapter) Is Nothing) Then Me._log_pass_serialTableAdapter.Connection = CType(revertConnections(Me._log_pass_serialTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_pass_serialTableAdapter.Transaction = Nothing End If If (Not (Me._log_PreTest_DetailTableAdapter) Is Nothing) Then Me._log_PreTest_DetailTableAdapter.Connection = CType(revertConnections(Me._log_PreTest_DetailTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_PreTest_DetailTableAdapter.Transaction = Nothing End If If (Not (Me._log_repairTableAdapter) Is Nothing) Then Me._log_repairTableAdapter.Connection = CType(revertConnections(Me._log_repairTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_repairTableAdapter.Transaction = Nothing End If If (Not (Me._log_repair_faTableAdapter) Is Nothing) Then Me._log_repair_faTableAdapter.Connection = CType(revertConnections(Me._log_repair_faTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_repair_faTableAdapter.Transaction = Nothing End If If (Not (Me._log_repair_serialTableAdapter) Is Nothing) Then Me._log_repair_serialTableAdapter.Connection = CType(revertConnections(Me._log_repair_serialTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_repair_serialTableAdapter.Transaction = Nothing End If If (Not (Me._log_serialTableAdapter) Is Nothing) Then Me._log_serialTableAdapter.Connection = CType(revertConnections(Me._log_serialTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_serialTableAdapter.Transaction = Nothing End If If (Not (Me._log_SH_DetailTableAdapter) Is Nothing) Then Me._log_SH_DetailTableAdapter.Connection = CType(revertConnections(Me._log_SH_DetailTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_SH_DetailTableAdapter.Transaction = Nothing End If If (Not (Me._log_SH_Detail_HistTableAdapter) Is Nothing) Then Me._log_SH_Detail_HistTableAdapter.Connection = CType(revertConnections(Me._log_SH_Detail_HistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_SH_Detail_HistTableAdapter.Transaction = Nothing End If If (Not (Me._log_SH_HeaderTableAdapter) Is Nothing) Then Me._log_SH_HeaderTableAdapter.Connection = CType(revertConnections(Me._log_SH_HeaderTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_SH_HeaderTableAdapter.Transaction = Nothing End If If (Not (Me._log_SH_Header_HistTableAdapter) Is Nothing) Then Me._log_SH_Header_HistTableAdapter.Connection = CType(revertConnections(Me._log_SH_Header_HistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._log_SH_Header_HistTableAdapter.Transaction = Nothing End If If (Not (Me._lotNoTableAdapter) Is Nothing) Then Me._lotNoTableAdapter.Connection = CType(revertConnections(Me._lotNoTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._lotNoTableAdapter.Transaction = Nothing End If If (Not (Me._lotNumberTableAdapter) Is Nothing) Then Me._lotNumberTableAdapter.Connection = CType(revertConnections(Me._lotNumberTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._lotNumberTableAdapter.Transaction = Nothing End If If (Not (Me._machineTableAdapter) Is Nothing) Then Me._machineTableAdapter.Connection = CType(revertConnections(Me._machineTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._machineTableAdapter.Transaction = Nothing End If If (Not (Me._machineHistTableAdapter) Is Nothing) Then Me._machineHistTableAdapter.Connection = CType(revertConnections(Me._machineHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._machineHistTableAdapter.Transaction = Nothing End If If (Not (Me._modelTableAdapter) Is Nothing) Then Me._modelTableAdapter.Connection = CType(revertConnections(Me._modelTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelTableAdapter.Transaction = Nothing End If If (Not (Me._modelBackupTableAdapter) Is Nothing) Then Me._modelBackupTableAdapter.Connection = CType(revertConnections(Me._modelBackupTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelBackupTableAdapter.Transaction = Nothing End If If (Not (Me._modelDimTableAdapter) Is Nothing) Then Me._modelDimTableAdapter.Connection = CType(revertConnections(Me._modelDimTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelDimTableAdapter.Transaction = Nothing End If If (Not (Me._modelDimHistTableAdapter) Is Nothing) Then Me._modelDimHistTableAdapter.Connection = CType(revertConnections(Me._modelDimHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelDimHistTableAdapter.Transaction = Nothing End If If (Not (Me._modelFamilyTableAdapter) Is Nothing) Then Me._modelFamilyTableAdapter.Connection = CType(revertConnections(Me._modelFamilyTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelFamilyTableAdapter.Transaction = Nothing End If If (Not (Me._modelFamilyHistTableAdapter) Is Nothing) Then Me._modelFamilyHistTableAdapter.Connection = CType(revertConnections(Me._modelFamilyHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelFamilyHistTableAdapter.Transaction = Nothing End If If (Not (Me._modelHierarchyTableAdapter) Is Nothing) Then Me._modelHierarchyTableAdapter.Connection = CType(revertConnections(Me._modelHierarchyTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelHierarchyTableAdapter.Transaction = Nothing End If If (Not (Me._modelHierarchyHistTableAdapter) Is Nothing) Then Me._modelHierarchyHistTableAdapter.Connection = CType(revertConnections(Me._modelHierarchyHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelHierarchyHistTableAdapter.Transaction = Nothing End If If (Not (Me._modelHistTableAdapter) Is Nothing) Then Me._modelHistTableAdapter.Connection = CType(revertConnections(Me._modelHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelHistTableAdapter.Transaction = Nothing End If If (Not (Me._modelRouteTableAdapter) Is Nothing) Then Me._modelRouteTableAdapter.Connection = CType(revertConnections(Me._modelRouteTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelRouteTableAdapter.Transaction = Nothing End If If (Not (Me._modelRoute_backup_1TableAdapter) Is Nothing) Then Me._modelRoute_backup_1TableAdapter.Connection = CType(revertConnections(Me._modelRoute_backup_1TableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelRoute_backup_1TableAdapter.Transaction = Nothing End If If (Not (Me._modelRouteHistTableAdapter) Is Nothing) Then Me._modelRouteHistTableAdapter.Connection = CType(revertConnections(Me._modelRouteHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelRouteHistTableAdapter.Transaction = Nothing End If If (Not (Me._modelTempTableAdapter) Is Nothing) Then Me._modelTempTableAdapter.Connection = CType(revertConnections(Me._modelTempTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelTempTableAdapter.Transaction = Nothing End If If (Not (Me._modelTypeTableAdapter) Is Nothing) Then Me._modelTypeTableAdapter.Connection = CType(revertConnections(Me._modelTypeTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelTypeTableAdapter.Transaction = Nothing End If If (Not (Me._modelTypeHistTableAdapter) Is Nothing) Then Me._modelTypeHistTableAdapter.Connection = CType(revertConnections(Me._modelTypeHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._modelTypeHistTableAdapter.Transaction = Nothing End If If (Not (Me._parts_ListTableAdapter) Is Nothing) Then Me._parts_ListTableAdapter.Connection = CType(revertConnections(Me._parts_ListTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._parts_ListTableAdapter.Transaction = Nothing End If If (Not (Me._partsCodeTableAdapter) Is Nothing) Then Me._partsCodeTableAdapter.Connection = CType(revertConnections(Me._partsCodeTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._partsCodeTableAdapter.Transaction = Nothing End If If (Not (Me._partsModelTableAdapter) Is Nothing) Then Me._partsModelTableAdapter.Connection = CType(revertConnections(Me._partsModelTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._partsModelTableAdapter.Transaction = Nothing End If If (Not (Me._partsPrepTableAdapter) Is Nothing) Then Me._partsPrepTableAdapter.Connection = CType(revertConnections(Me._partsPrepTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._partsPrepTableAdapter.Transaction = Nothing End If If (Not (Me._partsRecordsTableAdapter) Is Nothing) Then Me._partsRecordsTableAdapter.Connection = CType(revertConnections(Me._partsRecordsTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._partsRecordsTableAdapter.Transaction = Nothing End If If (Not (Me._partsStationTableAdapter) Is Nothing) Then Me._partsStationTableAdapter.Connection = CType(revertConnections(Me._partsStationTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._partsStationTableAdapter.Transaction = Nothing End If If (Not (Me._partsSupplierTableAdapter) Is Nothing) Then Me._partsSupplierTableAdapter.Connection = CType(revertConnections(Me._partsSupplierTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._partsSupplierTableAdapter.Transaction = Nothing End If If (Not (Me._po_detailTableAdapter) Is Nothing) Then Me._po_detailTableAdapter.Connection = CType(revertConnections(Me._po_detailTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._po_detailTableAdapter.Transaction = Nothing End If If (Not (Me._po_detail_backupTableAdapter) Is Nothing) Then Me._po_detail_backupTableAdapter.Connection = CType(revertConnections(Me._po_detail_backupTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._po_detail_backupTableAdapter.Transaction = Nothing End If If (Not (Me._po_detail_tempTableAdapter) Is Nothing) Then Me._po_detail_tempTableAdapter.Connection = CType(revertConnections(Me._po_detail_tempTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._po_detail_tempTableAdapter.Transaction = Nothing End If If (Not (Me._po_headerTableAdapter) Is Nothing) Then Me._po_headerTableAdapter.Connection = CType(revertConnections(Me._po_headerTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._po_headerTableAdapter.Transaction = Nothing End If If (Not (Me._po_header_backupTableAdapter) Is Nothing) Then Me._po_header_backupTableAdapter.Connection = CType(revertConnections(Me._po_header_backupTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._po_header_backupTableAdapter.Transaction = Nothing End If If (Not (Me._po_history_detailTableAdapter) Is Nothing) Then Me._po_history_detailTableAdapter.Connection = CType(revertConnections(Me._po_history_detailTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._po_history_detailTableAdapter.Transaction = Nothing End If If (Not (Me._po_orig_detailTableAdapter) Is Nothing) Then Me._po_orig_detailTableAdapter.Connection = CType(revertConnections(Me._po_orig_detailTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._po_orig_detailTableAdapter.Transaction = Nothing End If If (Not (Me._po_orig_headerTableAdapter) Is Nothing) Then Me._po_orig_headerTableAdapter.Connection = CType(revertConnections(Me._po_orig_headerTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._po_orig_headerTableAdapter.Transaction = Nothing End If If (Not (Me._printerTableAdapter) Is Nothing) Then Me._printerTableAdapter.Connection = CType(revertConnections(Me._printerTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._printerTableAdapter.Transaction = Nothing End If If (Not (Me._ptTableAdapter) Is Nothing) Then Me._ptTableAdapter.Connection = CType(revertConnections(Me._ptTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._ptTableAdapter.Transaction = Nothing End If If (Not (Me._pt_HistTableAdapter) Is Nothing) Then Me._pt_HistTableAdapter.Connection = CType(revertConnections(Me._pt_HistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._pt_HistTableAdapter.Transaction = Nothing End If If (Not (Me._serialAlvarisetTableAdapter) Is Nothing) Then Me._serialAlvarisetTableAdapter.Connection = CType(revertConnections(Me._serialAlvarisetTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._serialAlvarisetTableAdapter.Transaction = Nothing End If If (Not (Me._serialMacTableAdapter) Is Nothing) Then Me._serialMacTableAdapter.Connection = CType(revertConnections(Me._serialMacTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._serialMacTableAdapter.Transaction = Nothing End If If (Not (Me._sHIPPER_REPORT_TABLETableAdapter) Is Nothing) Then Me._sHIPPER_REPORT_TABLETableAdapter.Connection = CType(revertConnections(Me._sHIPPER_REPORT_TABLETableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._sHIPPER_REPORT_TABLETableAdapter.Transaction = Nothing End If If (Not (Me._sHIPPER_STATUSTableAdapter) Is Nothing) Then Me._sHIPPER_STATUSTableAdapter.Connection = CType(revertConnections(Me._sHIPPER_STATUSTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._sHIPPER_STATUSTableAdapter.Transaction = Nothing End If If (Not (Me._sHIPPER_SUMMARY_TABLETableAdapter) Is Nothing) Then Me._sHIPPER_SUMMARY_TABLETableAdapter.Connection = CType(revertConnections(Me._sHIPPER_SUMMARY_TABLETableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._sHIPPER_SUMMARY_TABLETableAdapter.Transaction = Nothing End If If (Not (Me._stationTableAdapter) Is Nothing) Then Me._stationTableAdapter.Connection = CType(revertConnections(Me._stationTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._stationTableAdapter.Transaction = Nothing End If If (Not (Me._station_convertTableAdapter) Is Nothing) Then Me._station_convertTableAdapter.Connection = CType(revertConnections(Me._station_convertTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._station_convertTableAdapter.Transaction = Nothing End If If (Not (Me._stationHistTableAdapter) Is Nothing) Then Me._stationHistTableAdapter.Connection = CType(revertConnections(Me._stationHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._stationHistTableAdapter.Transaction = Nothing End If If (Not (Me._usersTableAdapter) Is Nothing) Then Me._usersTableAdapter.Connection = CType(revertConnections(Me._usersTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._usersTableAdapter.Transaction = Nothing End If If (Not (Me._usersHistTableAdapter) Is Nothing) Then Me._usersHistTableAdapter.Connection = CType(revertConnections(Me._usersHistTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._usersHistTableAdapter.Transaction = Nothing End If If (Not (Me._wIP_TEMPTableAdapter) Is Nothing) Then Me._wIP_TEMPTableAdapter.Connection = CType(revertConnections(Me._wIP_TEMPTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._wIP_TEMPTableAdapter.Transaction = Nothing End If If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters) Dim i As Integer = 0 Do While (i < adapters.Length) Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i) adapter.AcceptChangesDuringUpdate = true i = (i + 1) Loop End If End Try Return result End Function _ Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean) Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst)) End Sub _ Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean If (Not (Me._connection) Is Nothing) Then Return true End If If ((Me.Connection Is Nothing) _ OrElse (inputConnection Is Nothing)) Then Return true End If If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then Return true End If Return false End Function ''' '''Update Order Option ''' _ Public Enum UpdateOrderOption InsertUpdateDelete = 0 UpdateInsertDelete = 1 End Enum ''' '''Used to sort self-referenced table's rows ''' _ Private Class SelfReferenceComparer Inherits Object Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow) Private _relation As Global.System.Data.DataRelation Private _childFirst As Integer _ Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean) MyBase.New Me._relation = relation If childFirst Then Me._childFirst = -1 Else Me._childFirst = 1 End If End Sub _ Private Function GetRoot(ByVal row As Global.System.Data.DataRow, ByRef distance As Integer) As Global.System.Data.DataRow Global.System.Diagnostics.Debug.Assert((Not (row) Is Nothing)) Dim root As Global.System.Data.DataRow = row distance = 0 Dim traversedRows As Global.System.Collections.Generic.IDictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow) = New Global.System.Collections.Generic.Dictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow)() traversedRows(row) = row Dim parent As Global.System.Data.DataRow = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default]) Do While ((Not (parent) Is Nothing) _ AndAlso (traversedRows.ContainsKey(parent) = false)) distance = (distance + 1) root = parent traversedRows(parent) = parent parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default]) Loop If (distance = 0) Then traversedRows.Clear traversedRows(row) = row parent = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original) Do While ((Not (parent) Is Nothing) _ AndAlso (traversedRows.ContainsKey(parent) = false)) distance = (distance + 1) root = parent traversedRows(parent) = parent parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original) Loop End If Return root End Function _ Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare If Object.ReferenceEquals(row1, row2) Then Return 0 End If If (row1 Is Nothing) Then Return -1 End If If (row2 Is Nothing) Then Return 1 End If Dim distance1 As Integer = 0 Dim root1 As Global.System.Data.DataRow = Me.GetRoot(row1, distance1) Dim distance2 As Integer = 0 Dim root2 As Global.System.Data.DataRow = Me.GetRoot(row2, distance2) If Object.ReferenceEquals(root1, root2) Then Return (Me._childFirst * distance1.CompareTo(distance2)) Else Global.System.Diagnostics.Debug.Assert(((Not (root1.Table) Is Nothing) _ AndAlso (Not (root2.Table) Is Nothing))) If (root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2)) Then Return -1 Else Return 1 End If End If End Function End Class End Class End Namespace