diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.sln b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.sln new file mode 100644 index 0000000..0446495 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.sln @@ -0,0 +1,42 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BR_L_CI_GEN", "BR_L_CI_GEN.vbproj", "{0FD97C44-56DD-44B2-AA3E-351935F5AC9C}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Test", "..\..\Test\Test.vbproj", "{C4A48E3F-38E4-4E88-A47D-FA5510686E57}" + ProjectSection(ProjectDependencies) = postProject + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C} = {0FD97C44-56DD-44B2-AA3E-351935F5AC9C} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C}.Debug|x86.ActiveCfg = Debug|x86 + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C}.Debug|x86.Build.0 = Debug|x86 + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C}.Release|x86.ActiveCfg = Release|x86 + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C}.Release|x86.Build.0 = Release|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Debug|x86.ActiveCfg = Debug|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Debug|x86.Build.0 = Debug|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Release|x86.ActiveCfg = Release|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(TeamFoundationVersionControl) = preSolution + SccNumberOfProjects = 3 + SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} + SccTeamFoundationServer = http://tfs.imestech.com:8080/tfs/messeries6 + SccLocalPath0 = . + SccProjectUniqueName1 = ..\\..\\Test\\Test.vbproj + SccProjectName1 = ../../Test + SccLocalPath1 = ..\\..\\Test + SccProjectUniqueName2 = BR_L_CI_GEN.vbproj + SccLocalPath2 = . + EndGlobalSection +EndGlobal diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.vbproj b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.vbproj new file mode 100644 index 0000000..d3ca9ff --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.vbproj @@ -0,0 +1,275 @@ + + + + + Debug + x86 + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C} + Library + BR_L_CI_GEN + BR_L_CI_GEN + 512 + Windows + v4.6.2 + + SAK + SAK + SAK + SAK + + + true + full + true + true + ..\..\..\MESClient\ + BR_L_CI_GEN.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 0 + false + + + pdbonly + false + true + true + bin\Release\ + BR_L_CI_GEN.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 0 + false + + + On + + + Binary + + + Off + + + On + + + true + true + true + ..\..\..\MESClient\ + BR_L_CI_GEN.xml + 0 + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + full + x86 + MinimumRecommendedRules.ruleset + false + + + true + ..\..\..\MESClient\ + BR_L_CI_GEN.xml + true + 0 + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + pdbonly + x86 + MinimumRecommendedRules.ruleset + false + + + true + + + iMES.snk + + + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinTabControl.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinGrid.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinEditors.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.Misc.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Shared.v19.1.dll + False + + + False + ..\..\..\MESClient\COM_ERP.dll + False + + + ..\..\..\MESClient\COM_Kit.dll + False + + + False + ..\..\..\MESClient\COM_Search.dll + False + + + False + ..\..\..\MESClient\COM_Utility.dll + False + + + ..\..\..\MES_C_DLL\iMESException.dll + False + + + ..\..\..\MES_C_DLL\iMESExceptionManager.dll + False + + + ..\..\..\MES_C_DLL\iMESUltraGrid.dll + False + + + False + ..\..\..\MES_S_DLL\Newtonsoft.Json.dll + + + + + + + + + + + + + False + ..\..\..\MESClient\WP_Kit.dll + False + + + + + + + + + + + + + + + + + + + + + + + modConstant.vb + + + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + True + True + Reference.map + + + + + frmBR_L_CI_GEN.vb + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + MSDiscoCodeGenerator + Reference.vb + + + + + + + + + + + + Dynamic + Web References\wsEAI\ + http://localhost/EAI/wsEAI.asmx + + + + + MySettings + BR_L_CI_GEN_localhost_wsEAI + + + + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.vbproj.vspscc b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.vbproj.vspscc new file mode 100644 index 0000000..b6d3289 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/BR_L_CI_GEN.vbproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Application.Designer.vb b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Application.Designer.vb new file mode 100644 index 0000000..4f9342a --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Application.myapp b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Application.myapp new file mode 100644 index 0000000..758895d --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/AssemblyInfo.vb b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..a9527e4 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' 組件的一般資訊是由下列的屬性集控制。 +' 變更這些屬性的值即可修改組件的相關 +' 資訊。 + +' 檢閱組件屬性的值 + + + + + + + + + + +'下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID + + +' 組件的版本資訊由下列四個值所組成: +' +' 主要版本 +' 次要版本 +' 組建編號 +' 修訂編號 +' +' 您可以指定所有的值,也可以依照以下的方式,使用 '*' 將組建和修訂編號 +' 指定為預設值: +' + + + diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/BuildIncrementVersionInfo.vb b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/BuildIncrementVersionInfo.vb new file mode 100644 index 0000000..5b9b9b2 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/BuildIncrementVersionInfo.vb @@ -0,0 +1 @@ + diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Resources.Designer.vb b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Resources.Designer.vb new file mode 100644 index 0000000..9d3d2ae --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + '這個類別是自動產生的,是利用 StronglyTypedResourceBuilder + '類別透過 ResGen 或 Visual Studio 這類工具。 + '若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen + '(利用 /str 選項),或重建您的 VS 專案。 + ''' + ''' 用於查詢當地語系化字串等的強類型資源類別。 + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' 傳回這個類別使用的快取的 ResourceManager 執行個體。 + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BR_L_CI_GEN.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有 + ''' 使用這個強類型資源類別的資源查閱。 + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Resources.resx b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Settings.Designer.vb b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Settings.Designer.vb new file mode 100644 index 0000000..3c750b7 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Settings.Designer.vb @@ -0,0 +1,83 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings 自動儲存功能" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + + _ + Public ReadOnly Property BR_L_CI_GEN_localhost_wsEAI() As String + Get + Return CType(Me("BR_L_CI_GEN_localhost_wsEAI"),String) + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.BR_L_CI_GEN.My.MySettings + Get + Return Global.BR_L_CI_GEN.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Settings.settings b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Settings.settings new file mode 100644 index 0000000..dfc3b51 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/Settings.settings @@ -0,0 +1,9 @@ + + + + + + http://localhost/EAI/wsEAI.asmx + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/licenses.licx b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/licenses.licx new file mode 100644 index 0000000..e3af333 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/My Project/licenses.licx @@ -0,0 +1,7 @@ +Infragistics.Win.Misc.UltraExpandableGroupBox, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraSplitter, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraPanel, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraButton, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.UltraWinDataSource.UltraDataSource, Infragistics4.Win.UltraWinDataSource.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.UltraWinTabControl.UltraTabControl, Infragistics4.Win.UltraWinTabControl.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.UltraWinEditors.UltraTextEditor, Infragistics4.Win.UltraWinEditors.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/Reference.map b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/Reference.map new file mode 100644 index 0000000..3b10ad2 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/Reference.map @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/Reference.vb b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/Reference.vb new file mode 100644 index 0000000..855cb6d --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/Reference.vb @@ -0,0 +1,503 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict Off +Option Explicit On + +Imports System +Imports System.ComponentModel +Imports System.Diagnostics +Imports System.Web.Services +Imports System.Web.Services.Protocols +Imports System.Xml.Serialization + +' +'原始程式碼已由 Microsoft.VSDesigner 自動產生,版本 4.0.30319.42000。 +' +Namespace wsEAI + + ''' + _ + Partial Public Class wsEAI + Inherits System.Web.Services.Protocols.SoapHttpClientProtocol + + Private InvokeSrv_metajsonOperationCompleted As System.Threading.SendOrPostCallback + + Private InvokeSrv_jsonOperationCompleted As System.Threading.SendOrPostCallback + + Private invokeSrvOperationCompleted As System.Threading.SendOrPostCallback + + Private invokeSrv_ResolvedXMLOperationCompleted As System.Threading.SendOrPostCallback + + Private callbackSrvOperationCompleted As System.Threading.SendOrPostCallback + + Private syncProdOperationCompleted As System.Threading.SendOrPostCallback + + Private GeteSOPInfo_APIOperationCompleted As System.Threading.SendOrPostCallback + + Private useDefaultCredentialsSetExplicitly As Boolean + + ''' + Public Sub New() + MyBase.New + Me.Url = Global.BR_L_CI_GEN.My.MySettings.Default.BR_L_CI_GEN_localhost_wsEAI + If (Me.IsLocalFileSystemWebService(Me.Url) = true) Then + Me.UseDefaultCredentials = true + Me.useDefaultCredentialsSetExplicitly = false + Else + Me.useDefaultCredentialsSetExplicitly = true + End If + End Sub + + Public Shadows Property Url() As String + Get + Return MyBase.Url + End Get + Set + If (((Me.IsLocalFileSystemWebService(MyBase.Url) = true) _ + AndAlso (Me.useDefaultCredentialsSetExplicitly = false)) _ + AndAlso (Me.IsLocalFileSystemWebService(value) = false)) Then + MyBase.UseDefaultCredentials = false + End If + MyBase.Url = value + End Set + End Property + + Public Shadows Property UseDefaultCredentials() As Boolean + Get + Return MyBase.UseDefaultCredentials + End Get + Set + MyBase.UseDefaultCredentials = value + Me.useDefaultCredentialsSetExplicitly = true + End Set + End Property + + ''' + Public Event InvokeSrv_metajsonCompleted As InvokeSrv_metajsonCompletedEventHandler + + ''' + Public Event InvokeSrv_jsonCompleted As InvokeSrv_jsonCompletedEventHandler + + ''' + Public Event invokeSrvCompleted As invokeSrvCompletedEventHandler + + ''' + Public Event invokeSrv_ResolvedXMLCompleted As invokeSrv_ResolvedXMLCompletedEventHandler + + ''' + Public Event callbackSrvCompleted As callbackSrvCompletedEventHandler + + ''' + Public Event syncProdCompleted As syncProdCompletedEventHandler + + ''' + Public Event GeteSOPInfo_APICompleted As GeteSOPInfo_APICompletedEventHandler + + ''' + _ + Public Function InvokeSrv_metajson(ByVal metadata As String, ByVal content As String) As String + Dim results() As Object = Me.Invoke("InvokeSrv_metajson", New Object() {metadata, content}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub InvokeSrv_metajsonAsync(ByVal metadata As String, ByVal content As String) + Me.InvokeSrv_metajsonAsync(metadata, content, Nothing) + End Sub + + ''' + Public Overloads Sub InvokeSrv_metajsonAsync(ByVal metadata As String, ByVal content As String, ByVal userState As Object) + If (Me.InvokeSrv_metajsonOperationCompleted Is Nothing) Then + Me.InvokeSrv_metajsonOperationCompleted = AddressOf Me.OnInvokeSrv_metajsonOperationCompleted + End If + Me.InvokeAsync("InvokeSrv_metajson", New Object() {metadata, content}, Me.InvokeSrv_metajsonOperationCompleted, userState) + End Sub + + Private Sub OnInvokeSrv_metajsonOperationCompleted(ByVal arg As Object) + If (Not (Me.InvokeSrv_metajsonCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent InvokeSrv_metajsonCompleted(Me, New InvokeSrv_metajsonCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function InvokeSrv_json(ByVal uri As String, ByVal content As String) As String + Dim results() As Object = Me.Invoke("InvokeSrv_json", New Object() {uri, content}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub InvokeSrv_jsonAsync(ByVal uri As String, ByVal content As String) + Me.InvokeSrv_jsonAsync(uri, content, Nothing) + End Sub + + ''' + Public Overloads Sub InvokeSrv_jsonAsync(ByVal uri As String, ByVal content As String, ByVal userState As Object) + If (Me.InvokeSrv_jsonOperationCompleted Is Nothing) Then + Me.InvokeSrv_jsonOperationCompleted = AddressOf Me.OnInvokeSrv_jsonOperationCompleted + End If + Me.InvokeAsync("InvokeSrv_json", New Object() {uri, content}, Me.InvokeSrv_jsonOperationCompleted, userState) + End Sub + + Private Sub OnInvokeSrv_jsonOperationCompleted(ByVal arg As Object) + If (Not (Me.InvokeSrv_jsonCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent InvokeSrv_jsonCompleted(Me, New InvokeSrv_jsonCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function invokeSrv(ByVal InXml As String) As String + Dim results() As Object = Me.Invoke("invokeSrv", New Object() {InXml}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub invokeSrvAsync(ByVal InXml As String) + Me.invokeSrvAsync(InXml, Nothing) + End Sub + + ''' + Public Overloads Sub invokeSrvAsync(ByVal InXml As String, ByVal userState As Object) + If (Me.invokeSrvOperationCompleted Is Nothing) Then + Me.invokeSrvOperationCompleted = AddressOf Me.OninvokeSrvOperationCompleted + End If + Me.InvokeAsync("invokeSrv", New Object() {InXml}, Me.invokeSrvOperationCompleted, userState) + End Sub + + Private Sub OninvokeSrvOperationCompleted(ByVal arg As Object) + If (Not (Me.invokeSrvCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent invokeSrvCompleted(Me, New invokeSrvCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function invokeSrv_ResolvedXML(ByVal MethodName As String, ByVal InXml As String) As String + Dim results() As Object = Me.Invoke("invokeSrv_ResolvedXML", New Object() {MethodName, InXml}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub invokeSrv_ResolvedXMLAsync(ByVal MethodName As String, ByVal InXml As String) + Me.invokeSrv_ResolvedXMLAsync(MethodName, InXml, Nothing) + End Sub + + ''' + Public Overloads Sub invokeSrv_ResolvedXMLAsync(ByVal MethodName As String, ByVal InXml As String, ByVal userState As Object) + If (Me.invokeSrv_ResolvedXMLOperationCompleted Is Nothing) Then + Me.invokeSrv_ResolvedXMLOperationCompleted = AddressOf Me.OninvokeSrv_ResolvedXMLOperationCompleted + End If + Me.InvokeAsync("invokeSrv_ResolvedXML", New Object() {MethodName, InXml}, Me.invokeSrv_ResolvedXMLOperationCompleted, userState) + End Sub + + Private Sub OninvokeSrv_ResolvedXMLOperationCompleted(ByVal arg As Object) + If (Not (Me.invokeSrv_ResolvedXMLCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent invokeSrv_ResolvedXMLCompleted(Me, New invokeSrv_ResolvedXMLCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function callbackSrv(ByVal InXml As String) As String + Dim results() As Object = Me.Invoke("callbackSrv", New Object() {InXml}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub callbackSrvAsync(ByVal InXml As String) + Me.callbackSrvAsync(InXml, Nothing) + End Sub + + ''' + Public Overloads Sub callbackSrvAsync(ByVal InXml As String, ByVal userState As Object) + If (Me.callbackSrvOperationCompleted Is Nothing) Then + Me.callbackSrvOperationCompleted = AddressOf Me.OncallbackSrvOperationCompleted + End If + Me.InvokeAsync("callbackSrv", New Object() {InXml}, Me.callbackSrvOperationCompleted, userState) + End Sub + + Private Sub OncallbackSrvOperationCompleted(ByVal arg As Object) + If (Not (Me.callbackSrvCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent callbackSrvCompleted(Me, New callbackSrvCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function syncProd(ByVal InXml As String) As String + Dim results() As Object = Me.Invoke("syncProd", New Object() {InXml}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub syncProdAsync(ByVal InXml As String) + Me.syncProdAsync(InXml, Nothing) + End Sub + + ''' + Public Overloads Sub syncProdAsync(ByVal InXml As String, ByVal userState As Object) + If (Me.syncProdOperationCompleted Is Nothing) Then + Me.syncProdOperationCompleted = AddressOf Me.OnsyncProdOperationCompleted + End If + Me.InvokeAsync("syncProd", New Object() {InXml}, Me.syncProdOperationCompleted, userState) + End Sub + + Private Sub OnsyncProdOperationCompleted(ByVal arg As Object) + If (Not (Me.syncProdCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent syncProdCompleted(Me, New syncProdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function GeteSOPInfo_API(ByVal uri As String, ByVal content As String) As String + Dim results() As Object = Me.Invoke("GeteSOPInfo_API", New Object() {uri, content}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub GeteSOPInfo_APIAsync(ByVal uri As String, ByVal content As String) + Me.GeteSOPInfo_APIAsync(uri, content, Nothing) + End Sub + + ''' + Public Overloads Sub GeteSOPInfo_APIAsync(ByVal uri As String, ByVal content As String, ByVal userState As Object) + If (Me.GeteSOPInfo_APIOperationCompleted Is Nothing) Then + Me.GeteSOPInfo_APIOperationCompleted = AddressOf Me.OnGeteSOPInfo_APIOperationCompleted + End If + Me.InvokeAsync("GeteSOPInfo_API", New Object() {uri, content}, Me.GeteSOPInfo_APIOperationCompleted, userState) + End Sub + + Private Sub OnGeteSOPInfo_APIOperationCompleted(ByVal arg As Object) + If (Not (Me.GeteSOPInfo_APICompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent GeteSOPInfo_APICompleted(Me, New GeteSOPInfo_APICompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + Public Shadows Sub CancelAsync(ByVal userState As Object) + MyBase.CancelAsync(userState) + End Sub + + Private Function IsLocalFileSystemWebService(ByVal url As String) As Boolean + If ((url Is Nothing) _ + OrElse (url Is String.Empty)) Then + Return false + End If + Dim wsUri As System.Uri = New System.Uri(url) + If ((wsUri.Port >= 1024) _ + AndAlso (String.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) = 0)) Then + Return true + End If + Return false + End Function + End Class + + ''' + _ + Public Delegate Sub InvokeSrv_metajsonCompletedEventHandler(ByVal sender As Object, ByVal e As InvokeSrv_metajsonCompletedEventArgs) + + ''' + _ + Partial Public Class InvokeSrv_metajsonCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub InvokeSrv_jsonCompletedEventHandler(ByVal sender As Object, ByVal e As InvokeSrv_jsonCompletedEventArgs) + + ''' + _ + Partial Public Class InvokeSrv_jsonCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub invokeSrvCompletedEventHandler(ByVal sender As Object, ByVal e As invokeSrvCompletedEventArgs) + + ''' + _ + Partial Public Class invokeSrvCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub invokeSrv_ResolvedXMLCompletedEventHandler(ByVal sender As Object, ByVal e As invokeSrv_ResolvedXMLCompletedEventArgs) + + ''' + _ + Partial Public Class invokeSrv_ResolvedXMLCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub callbackSrvCompletedEventHandler(ByVal sender As Object, ByVal e As callbackSrvCompletedEventArgs) + + ''' + _ + Partial Public Class callbackSrvCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub syncProdCompletedEventHandler(ByVal sender As Object, ByVal e As syncProdCompletedEventArgs) + + ''' + _ + Partial Public Class syncProdCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub GeteSOPInfo_APICompletedEventHandler(ByVal sender As Object, ByVal e As GeteSOPInfo_APICompletedEventArgs) + + ''' + _ + Partial Public Class GeteSOPInfo_APICompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class +End Namespace diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/wsEAI.disco b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/wsEAI.disco new file mode 100644 index 0000000..09ebff9 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/wsEAI.disco @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/wsEAI.wsdl b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/wsEAI.wsdl new file mode 100644 index 0000000..74d084d --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/Web References/wsEAI/wsEAI.wsdl @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invoke Web Service Resolved metadata json + + + + + Invoke Web Service Resolved json + + + + + Invoke Web Service + + + + + Invoke Web Service for Resolved XML + + + + + Callback Service + + + + + sync Product + + + + + GeteSOPInfo_API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/app.config b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/app.config new file mode 100644 index 0000000..c63a97d --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/app.config @@ -0,0 +1,37 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + http://localhost/EAI/wsEAI.asmx + + + + diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/frmBR_L_CI_GEN.resx b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/frmBR_L_CI_GEN.resx new file mode 100644 index 0000000..aa20aaf --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/frmBR_L_CI_GEN.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 28, 11 + + + 131, 11 + + + 25 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/frmBR_L_CI_GEN.vb b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/frmBR_L_CI_GEN.vb new file mode 100644 index 0000000..b0e292e --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/frmBR_L_CI_GEN.vb @@ -0,0 +1,6801 @@ +Imports iMESExceptionManager +Imports Infragistics.Win.UltraWinGrid +Imports Infragistics.Win +Imports System.IO +Imports Newtonsoft.Json +Imports Newtonsoft.Json.Linq +Imports COM_ERP + +''' +''' 修改:2012/06/15,sammi.新增多人加工處理. +''' 2016/12/26 YF, 增加新制多人加工(btnOperator), 先將舊有的多人加工隱藏(btnMultiUser) +''' +Public Class frmBR_L_CI_GEN + Inherits System.Windows.Forms.Form + + '//Public Variables + Public LotNo As String = defString + Public UserId As String = defString + Public UserName As String = defString + + Public EquipmentNo As String = defString + Public LoadPort As Integer = defInteger + Public PrivFunNo As String = defString + + '//Web Service相關變數 + Dim tmpStringReader As System.IO.StringReader + Dim InXml, OutXml, strIdentity, strParameter, XmlData, XmlSchema As String + + '//資料表相關變數 + Dim dsWIP, dsTemp, dsINV, dsEQP As New DataSet + Dim dtKeyIn, dtTmpLoginState, dtTmpMTLLotNo As DataTable + Dim drAdd As DataRow + Dim tblLotState, tblTAttrib, tblTMaterial, tblStuInfo, tblAreaEquipment, tblLotLoginState, tblMaterialLotNo, + tblTmpMTLLotNo, tblMOMaterialState, tblWIPINVRaw, tblSubstituteMaterial, tblSWRJoinLog, + tblMaterialBasis, tblTLotState, tblMaterialProperty, tblOPBasis, tblEQPDispatchState, tblWIPINVSEMI As String + '2016-12-19 系統參數資料表 + Dim dsDefine As New DataSet + Dim tblSYSParam As String = "" + Dim Execute_eSOP As Integer = 0 '2016-12-14, 是否啟用eSOP(0:false,1:true) + + '//其他共用變數 + Dim RevLotSerial As String = defString + Dim LotSerial As String = defString + Dim LogGroupSerial As String = defString + Dim RevLotStamp As Long = defInteger + Dim PhaseNo As Integer + Dim datEventTime As DateTime = Now + Dim ugrRow As Infragistics.Win.UltraWinGrid.UltraGridRow + Dim blnGetAccessory As Boolean = True + Dim drSelE As DataRow() + Dim blnChamber As Boolean = False + '2019/02/12 Eric 特殊生產需求是否有資料 + Dim blnShowSWR As Boolean = False + + '20091006 Seam 新增作業工序 + Dim tblSubOP As String + + '2010/03/08,yumei,iugKeyIn區塊新增清單選擇 + Dim strDefaultValue As String + Dim editor As Infragistics.Win.DateTimeEditor + + ' 2016/08/30 YF, ObjectFile物件 + Dim ObjectFileHandler As COM_Utility.ObjectFileHandler + '2016-12-20 XIANG + Dim tblPRDeSOPBasis As String = "" + Friend WithEvents chkUpdCheckInTime As CheckBox + Friend WithEvents btnSWR As Infragistics.Win.Misc.UltraButton + '傳給eSOP,紀錄資料數(ROW欄位) + Dim intRow As Integer = 1 + Dim blnGumMaterialType As Boolean = False + Dim aryGumMaterialType As Array + Dim dtAllMTLLot As DataTable '所有可用料批資料 + Dim tblTMaterialLot As String + Friend WithEvents lblMaterialNo As Label + Friend WithEvents txtMaterialNo As UltraWinEditors.UltraTextEditor + Dim blnSelect As Boolean = False + Dim blnByEQP As Boolean = False + Dim blnCIMTLDBCheck As Boolean = False + Dim blnLock As Boolean = False + + Dim ACCMin As Decimal = defInteger + Dim ACCMax As Decimal = defInteger + Dim ReFrozenFlag As Integer = defInteger + Dim ReACCMin As Decimal = defInteger + Dim ReACCMax As Decimal = defInteger + Dim strTableName, strRaw As String + + Dim vlMaterialLevel As New ValueList + Dim vlStuInfoIsSelected As New ValueList + + Dim ckhEQPDispatchRule As String + + ''新设备上料 14278 + Dim dsOE As New DataSet '資料集:儲存取回之資料? + Friend WithEvents UltraTabPageControl3 As UltraWinTabControl.UltraTabPageControl + Friend WithEvents Label1 As Label + Friend WithEvents UltraTextEditor1 As UltraWinEditors.UltraTextEditor + Friend WithEvents Label2 As Label + Friend WithEvents UltraTextEditor2 As UltraWinEditors.UltraTextEditor + Friend WithEvents IMESUltraGridControl1 As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents UltraTabSharedControlsPage2 As UltraWinTabControl.UltraTabSharedControlsPage + Friend WithEvents UltraTabControl2 As UltraWinTabControl.UltraTabControl + Friend WithEvents iugStuInfo As UltraWinTabControl.UltraTabPageControl + Friend WithEvents UltraDataSource1 As UltraWinDataSource.UltraDataSource + Friend WithEvents iugStuBasis As iMESUltraGrid.iMESUltraGridControl + Dim strMOList As String '儲存取回資料表的名稱? +#Region " Windows Form 設計工具產生的程式碼 " + + Public Sub New() + MyBase.New() + + '此呼叫為 Windows Form 設計工具的必要項。 + + InitializeComponent() + + '在 InitializeComponent() 呼叫之後加入所有的初始設定 + ' 2016/08/30 YF, 開另一條執行緒建立會使用到的物件 + Threading.ThreadPool.QueueUserWorkItem(New Threading.WaitCallback( + Sub(pState As Object) + ' 呼叫COM_Utility.ObjectFileHandler建構子, 傳入要載入的ObjectID + Me.ObjectFileHandler = New COM_Utility.ObjectFileHandler("WP_OperatorLogIn_Lot", "WP_EQPConsumeReset", "WP_EQPCheckQCList", "WP_SWRBasisRead", "WP_MaterialQtyInput_Main") + End Sub)) + + End Sub + + 'Form 覆寫 Dispose 以清除元件清單。 + + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing Then + If Not (components Is Nothing) Then + components.Dispose() + End If + End If + MyBase.Dispose(disposing) + End Sub + + '為 Windows Form 設計工具的必要項 + Private components As System.ComponentModel.IContainer + + '注意: 以下為 Windows Form 設計工具所需的程序 + + '您可以使用 Windows Form 設計工具進行修改。 + + '請勿使用程式碼編輯器來修改這些程序。 + Friend WithEvents UltraTabPageControl1 As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents UltraTabPageControl2 As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip + Friend WithEvents UltraTabControl1 As Infragistics.Win.UltraWinTabControl.UltraTabControl + Friend WithEvents UltraTabSharedControlsPage1 As Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage + Friend WithEvents utpMaterial As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents utpSubOP As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents iugSubOP As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents utpEquipment As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents IMESUltraGrid3 As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents SBar1 As System.Windows.Forms.StatusBar + Friend WithEvents SBarPanel1 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel4 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel2 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel3 As System.Windows.Forms.StatusBarPanel + Friend WithEvents lblOPNo As System.Windows.Forms.Label + Friend WithEvents lblLotNo As System.Windows.Forms.Label + Friend WithEvents lblSysQty As System.Windows.Forms.Label + Friend WithEvents lblCurQty As System.Windows.Forms.Label + Friend WithEvents lblEmployeeNo As System.Windows.Forms.Label + Friend WithEvents lblShiftNo As System.Windows.Forms.Label + Friend WithEvents lblCustomerLotNo As System.Windows.Forms.Label + Friend WithEvents lblPriority As System.Windows.Forms.Label + Friend WithEvents txtOPNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCurQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCurUnitNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtSysQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtSysUnitNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtPriority As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtAreaNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtEmployeeNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtShiftNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCustomerLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents iugAttrib As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugMaterial As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugEquipment As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents btnClose As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnConfirm As Infragistics.Win.Misc.UltraButton + Friend WithEvents lblEquipmentNo As System.Windows.Forms.Label + Friend WithEvents txtEquipmentNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents iugKeyIn As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents lblProductNo As System.Windows.Forms.Label + Friend WithEvents txtProductNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblAreaNo As System.Windows.Forms.Label + Friend WithEvents txtOPDescription As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblOPDescription As System.Windows.Forms.Label + Friend WithEvents lblLotRecord As System.Windows.Forms.Label + Friend WithEvents txtLotRecord As System.Windows.Forms.RichTextBox + Friend WithEvents txtMONo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblMONo As System.Windows.Forms.Label + Friend WithEvents gbxLotInfo As System.Windows.Forms.GroupBox + Friend WithEvents lblupdcheckintime As System.Windows.Forms.Label + Friend WithEvents dtpcheckintime As System.Windows.Forms.DateTimePicker + Friend WithEvents btnQCList As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnEQPConsumeReset As Infragistics.Win.Misc.UltraButton + Friend WithEvents txtOpName As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents btnMultiUser As Infragistics.Win.Misc.UltraButton + Friend WithEvents lblMaterialLotNo As System.Windows.Forms.Label + Friend WithEvents btnOperator As Misc.UltraButton + Friend WithEvents txtMaterialLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + + Friend WithEvents uegLotInfo As Misc.UltraExpandableGroupBox + Friend WithEvents uplEquipment As Misc.UltraPanel + Friend WithEvents uplAttrib As Misc.UltraPanel + Friend WithEvents UltraExpandableGroupBoxPanel1 As Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel1 As Misc.UltraPanel + Friend WithEvents uplAttrib_Equipment As Misc.UltraPanel + Friend WithEvents UltraSplitter1 As Misc.UltraSplitter + Friend WithEvents uplMaterial_KeyIn As Misc.UltraPanel + Friend WithEvents UltraSplitter2 As Misc.UltraSplitter + Friend WithEvents uplMaterial As Misc.UltraPanel + Friend WithEvents uplKeyIn As Misc.UltraPanel + Friend WithEvents uplAll As Misc.UltraPanel + Friend WithEvents uegMaterial_KeyIn2 As Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel4 As Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel4 As Misc.UltraPanel + Friend WithEvents uegAttrib_Equipment As Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel2 As Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel2 As Misc.UltraPanel + + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Dim UltraTab2 As Infragistics.Win.UltraWinTabControl.UltraTab = New Infragistics.Win.UltraWinTabControl.UltraTab() + Dim UltraTab3 As Infragistics.Win.UltraWinTabControl.UltraTab = New Infragistics.Win.UltraWinTabControl.UltraTab() + Dim UltraTab5 As Infragistics.Win.UltraWinTabControl.UltraTab = New Infragistics.Win.UltraWinTabControl.UltraTab() + Me.utpMaterial = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.lblMaterialNo = New System.Windows.Forms.Label() + Me.txtMaterialNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblMaterialLotNo = New System.Windows.Forms.Label() + Me.txtMaterialLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.iugMaterial = New iMESUltraGrid.iMESUltraGridControl() + Me.utpSubOP = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.iugSubOP = New iMESUltraGrid.iMESUltraGridControl() + Me.iugStuInfo = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.iugStuBasis = New iMESUltraGrid.iMESUltraGridControl() + Me.uegLotInfo = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel1 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel1 = New Infragistics.Win.Misc.UltraPanel() + Me.gbxLotInfo = New System.Windows.Forms.GroupBox() + Me.txtOpName = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtOPNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtProductNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCustomerLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtMONo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtShiftNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtEmployeeNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtAreaNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtPriority = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtSysUnitNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtSysQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCurUnitNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCurQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtOPDescription = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblPriority = New System.Windows.Forms.Label() + Me.lblMONo = New System.Windows.Forms.Label() + Me.lblShiftNo = New System.Windows.Forms.Label() + Me.lblOPNo = New System.Windows.Forms.Label() + Me.lblAreaNo = New System.Windows.Forms.Label() + Me.lblSysQty = New System.Windows.Forms.Label() + Me.lblCurQty = New System.Windows.Forms.Label() + Me.lblProductNo = New System.Windows.Forms.Label() + Me.lblOPDescription = New System.Windows.Forms.Label() + Me.lblCustomerLotNo = New System.Windows.Forms.Label() + Me.lblEmployeeNo = New System.Windows.Forms.Label() + Me.lblLotNo = New System.Windows.Forms.Label() + Me.UltraTabPageControl2 = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.UltraTabPageControl1 = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.SBar1 = New System.Windows.Forms.StatusBar() + Me.SBarPanel1 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel2 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel3 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel4 = New System.Windows.Forms.StatusBarPanel() + Me.iugAttrib = New iMESUltraGrid.iMESUltraGridControl() + Me.iugEquipment = New iMESUltraGrid.iMESUltraGridControl() + Me.btnClose = New Infragistics.Win.Misc.UltraButton() + Me.btnConfirm = New Infragistics.Win.Misc.UltraButton() + Me.lblEquipmentNo = New System.Windows.Forms.Label() + Me.txtEquipmentNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblLotRecord = New System.Windows.Forms.Label() + Me.txtLotRecord = New System.Windows.Forms.RichTextBox() + Me.lblupdcheckintime = New System.Windows.Forms.Label() + Me.dtpcheckintime = New System.Windows.Forms.DateTimePicker() + Me.btnEQPConsumeReset = New Infragistics.Win.Misc.UltraButton() + Me.btnQCList = New Infragistics.Win.Misc.UltraButton() + Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) + Me.utpEquipment = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.IMESUltraGrid3 = New iMESUltraGrid.iMESUltraGridControl() + Me.btnMultiUser = New Infragistics.Win.Misc.UltraButton() + Me.btnOperator = New Infragistics.Win.Misc.UltraButton() + Me.chkUpdCheckInTime = New System.Windows.Forms.CheckBox() + Me.btnSWR = New Infragistics.Win.Misc.UltraButton() + Me.uplAttrib = New Infragistics.Win.Misc.UltraPanel() + Me.uplEquipment = New Infragistics.Win.Misc.UltraPanel() + Me.uplAttrib_Equipment = New Infragistics.Win.Misc.UltraPanel() + Me.UltraSplitter1 = New Infragistics.Win.Misc.UltraSplitter() + Me.uplMaterial_KeyIn = New Infragistics.Win.Misc.UltraPanel() + Me.uplKeyIn = New Infragistics.Win.Misc.UltraPanel() + Me.iugKeyIn = New iMESUltraGrid.iMESUltraGridControl() + Me.UltraSplitter2 = New Infragistics.Win.Misc.UltraSplitter() + Me.uplMaterial = New Infragistics.Win.Misc.UltraPanel() + Me.UltraTabControl1 = New Infragistics.Win.UltraWinTabControl.UltraTabControl() + Me.UltraTabSharedControlsPage1 = New Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage() + Me.uplAll = New Infragistics.Win.Misc.UltraPanel() + Me.uegMaterial_KeyIn2 = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel4 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel4 = New Infragistics.Win.Misc.UltraPanel() + Me.uegAttrib_Equipment = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel2 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel2 = New Infragistics.Win.Misc.UltraPanel() + Me.UltraTabPageControl3 = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.Label1 = New System.Windows.Forms.Label() + Me.UltraTextEditor1 = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.Label2 = New System.Windows.Forms.Label() + Me.UltraTextEditor2 = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.IMESUltraGridControl1 = New iMESUltraGrid.iMESUltraGridControl() + Me.UltraTabSharedControlsPage2 = New Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage() + Me.UltraTabControl2 = New Infragistics.Win.UltraWinTabControl.UltraTabControl() + Me.UltraDataSource1 = New Infragistics.Win.UltraWinDataSource.UltraDataSource(Me.components) + Me.utpMaterial.SuspendLayout() + CType(Me.txtMaterialNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtMaterialLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.utpSubOP.SuspendLayout() + Me.iugStuInfo.SuspendLayout() + CType(Me.uegLotInfo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegLotInfo.SuspendLayout() + Me.UltraExpandableGroupBoxPanel1.SuspendLayout() + Me.UltraPanel1.ClientArea.SuspendLayout() + Me.UltraPanel1.SuspendLayout() + Me.gbxLotInfo.SuspendLayout() + CType(Me.txtOpName, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtOPNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtProductNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCustomerLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtMONo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtShiftNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtEmployeeNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtAreaNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtPriority, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSysUnitNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSysQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCurUnitNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCurQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtOPDescription, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel3, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel4, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtEquipmentNo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.utpEquipment.SuspendLayout() + Me.uplAttrib.ClientArea.SuspendLayout() + Me.uplAttrib.SuspendLayout() + Me.uplEquipment.ClientArea.SuspendLayout() + Me.uplEquipment.SuspendLayout() + Me.uplAttrib_Equipment.ClientArea.SuspendLayout() + Me.uplAttrib_Equipment.SuspendLayout() + Me.uplMaterial_KeyIn.ClientArea.SuspendLayout() + Me.uplMaterial_KeyIn.SuspendLayout() + Me.uplKeyIn.ClientArea.SuspendLayout() + Me.uplKeyIn.SuspendLayout() + Me.uplMaterial.ClientArea.SuspendLayout() + Me.uplMaterial.SuspendLayout() + CType(Me.UltraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.UltraTabControl1.SuspendLayout() + Me.uplAll.ClientArea.SuspendLayout() + Me.uplAll.SuspendLayout() + CType(Me.uegMaterial_KeyIn2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegMaterial_KeyIn2.SuspendLayout() + Me.UltraExpandableGroupBoxPanel4.SuspendLayout() + Me.UltraPanel4.ClientArea.SuspendLayout() + Me.UltraPanel4.SuspendLayout() + CType(Me.uegAttrib_Equipment, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegAttrib_Equipment.SuspendLayout() + Me.UltraExpandableGroupBoxPanel2.SuspendLayout() + Me.UltraPanel2.ClientArea.SuspendLayout() + Me.UltraPanel2.SuspendLayout() + Me.UltraTabPageControl3.SuspendLayout() + CType(Me.UltraTextEditor1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.UltraTextEditor2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.UltraTabControl2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.UltraTabControl2.SuspendLayout() + CType(Me.UltraDataSource1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'utpMaterial + ' + Me.utpMaterial.Controls.Add(Me.lblMaterialNo) + Me.utpMaterial.Controls.Add(Me.txtMaterialNo) + Me.utpMaterial.Controls.Add(Me.lblMaterialLotNo) + Me.utpMaterial.Controls.Add(Me.txtMaterialLotNo) + Me.utpMaterial.Controls.Add(Me.iugMaterial) + Me.utpMaterial.Location = New System.Drawing.Point(-10000, -10000) + Me.utpMaterial.Name = "utpMaterial" + Me.utpMaterial.Size = New System.Drawing.Size(511, 187) + ' + 'lblMaterialNo + ' + Me.lblMaterialNo.BackColor = System.Drawing.Color.Transparent + Me.lblMaterialNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMaterialNo.Location = New System.Drawing.Point(7, 11) + Me.lblMaterialNo.Name = "lblMaterialNo" + Me.lblMaterialNo.Size = New System.Drawing.Size(90, 16) + Me.lblMaterialNo.TabIndex = 159 + Me.lblMaterialNo.Text = "Material No" + ' + 'txtMaterialNo + ' + Me.txtMaterialNo.Location = New System.Drawing.Point(103, 7) + Me.txtMaterialNo.Name = "txtMaterialNo" + Me.txtMaterialNo.Size = New System.Drawing.Size(132, 22) + Me.txtMaterialNo.TabIndex = 158 + ' + 'lblMaterialLotNo + ' + Me.lblMaterialLotNo.BackColor = System.Drawing.Color.Transparent + Me.lblMaterialLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMaterialLotNo.Location = New System.Drawing.Point(244, 11) + Me.lblMaterialLotNo.Name = "lblMaterialLotNo" + Me.lblMaterialLotNo.Size = New System.Drawing.Size(90, 16) + Me.lblMaterialLotNo.TabIndex = 157 + Me.lblMaterialLotNo.Text = "Material Lot No" + ' + 'txtMaterialLotNo + ' + Me.txtMaterialLotNo.Location = New System.Drawing.Point(340, 7) + Me.txtMaterialLotNo.Name = "txtMaterialLotNo" + Me.txtMaterialLotNo.Size = New System.Drawing.Size(132, 22) + Me.txtMaterialLotNo.TabIndex = 156 + ' + 'iugMaterial + ' + Me.iugMaterial.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugMaterial.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugMaterial.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugMaterial.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugMaterial.Identity = "IMes" + Me.iugMaterial.IdentityForm = "" + Me.iugMaterial.LayOutFilePath = "" + Me.iugMaterial.Location = New System.Drawing.Point(2, 35) + Me.iugMaterial.Name = "iugMaterial" + Me.iugMaterial.PrintFitWidthToPages = 0 + Me.iugMaterial.PrintLandscape = True + Me.iugMaterial.PrintPageFooter = "" + Me.iugMaterial.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugMaterial.PrintPageFooterHeight = 20 + Me.iugMaterial.PrintPageHeader = "" + Me.iugMaterial.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugMaterial.PrintPageHeaderHeight = 20 + Me.iugMaterial.PrintZoom = 1.0R + Me.iugMaterial.Size = New System.Drawing.Size(506, 148) + Me.iugMaterial.TabIndex = 108 + Me.iugMaterial.UserNo = "IMes" + ' + 'utpSubOP + ' + Me.utpSubOP.Controls.Add(Me.iugSubOP) + Me.utpSubOP.Location = New System.Drawing.Point(-10000, -10000) + Me.utpSubOP.Name = "utpSubOP" + Me.utpSubOP.Size = New System.Drawing.Size(511, 187) + ' + 'iugSubOP + ' + Me.iugSubOP.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugSubOP.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugSubOP.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugSubOP.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugSubOP.Identity = "IMes" + Me.iugSubOP.IdentityForm = "" + Me.iugSubOP.LayOutFilePath = "" + Me.iugSubOP.Location = New System.Drawing.Point(3, 3) + Me.iugSubOP.Name = "iugSubOP" + Me.iugSubOP.PrintFitWidthToPages = 0 + Me.iugSubOP.PrintLandscape = True + Me.iugSubOP.PrintPageFooter = "" + Me.iugSubOP.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugSubOP.PrintPageFooterHeight = 20 + Me.iugSubOP.PrintPageHeader = "" + Me.iugSubOP.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugSubOP.PrintPageHeaderHeight = 20 + Me.iugSubOP.PrintZoom = 1.0R + Me.iugSubOP.Size = New System.Drawing.Size(506, 181) + Me.iugSubOP.TabIndex = 1 + Me.iugSubOP.UserNo = "IMes" + ' + 'iugStuInfo + ' + Me.iugStuInfo.Controls.Add(Me.iugStuBasis) + Me.iugStuInfo.Location = New System.Drawing.Point(1, 23) + Me.iugStuInfo.Name = "iugStuInfo" + Me.iugStuInfo.Size = New System.Drawing.Size(511, 187) + ' + 'iugStuBasis + ' + Me.iugStuBasis.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugStuBasis.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugStuBasis.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugStuBasis.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugStuBasis.Identity = "IMes" + Me.iugStuBasis.IdentityForm = "" + Me.iugStuBasis.LayOutFilePath = "" + Me.iugStuBasis.Location = New System.Drawing.Point(3, 3) + Me.iugStuBasis.Name = "iugStuBasis" + Me.iugStuBasis.PrintFitWidthToPages = 0 + Me.iugStuBasis.PrintLandscape = True + Me.iugStuBasis.PrintPageFooter = "" + Me.iugStuBasis.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugStuBasis.PrintPageFooterHeight = 20 + Me.iugStuBasis.PrintPageHeader = "" + Me.iugStuBasis.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugStuBasis.PrintPageHeaderHeight = 20 + Me.iugStuBasis.PrintZoom = 1.0R + Me.iugStuBasis.Size = New System.Drawing.Size(506, 181) + Me.iugStuBasis.TabIndex = 2 + Me.iugStuBasis.UserNo = "IMes" + ' + 'uegLotInfo + ' + Me.uegLotInfo.Controls.Add(Me.UltraExpandableGroupBoxPanel1) + Me.uegLotInfo.Dock = System.Windows.Forms.DockStyle.Top + Me.uegLotInfo.ExpandedSize = New System.Drawing.Size(1013, 153) + Me.uegLotInfo.Location = New System.Drawing.Point(0, 0) + Me.uegLotInfo.Name = "uegLotInfo" + Me.uegLotInfo.Size = New System.Drawing.Size(1013, 153) + Me.uegLotInfo.TabIndex = 161 + Me.uegLotInfo.Text = "Lot Information" + Me.uegLotInfo.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel1 + ' + Me.UltraExpandableGroupBoxPanel1.Controls.Add(Me.UltraPanel1) + Me.UltraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel1.Location = New System.Drawing.Point(2, 22) + Me.UltraExpandableGroupBoxPanel1.Name = "UltraExpandableGroupBoxPanel1" + Me.UltraExpandableGroupBoxPanel1.Size = New System.Drawing.Size(1009, 129) + Me.UltraExpandableGroupBoxPanel1.TabIndex = 0 + ' + 'UltraPanel1 + ' + ' + 'UltraPanel1.ClientArea + ' + Me.UltraPanel1.ClientArea.Controls.Add(Me.gbxLotInfo) + Me.UltraPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel1.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel1.Name = "UltraPanel1" + Me.UltraPanel1.Size = New System.Drawing.Size(1009, 129) + Me.UltraPanel1.TabIndex = 0 + ' + 'gbxLotInfo + ' + Me.gbxLotInfo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.gbxLotInfo.Controls.Add(Me.txtOpName) + Me.gbxLotInfo.Controls.Add(Me.txtOPNo) + Me.gbxLotInfo.Controls.Add(Me.txtProductNo) + Me.gbxLotInfo.Controls.Add(Me.txtCustomerLotNo) + Me.gbxLotInfo.Controls.Add(Me.txtMONo) + Me.gbxLotInfo.Controls.Add(Me.txtShiftNo) + Me.gbxLotInfo.Controls.Add(Me.txtEmployeeNo) + Me.gbxLotInfo.Controls.Add(Me.txtAreaNo) + Me.gbxLotInfo.Controls.Add(Me.txtPriority) + Me.gbxLotInfo.Controls.Add(Me.txtSysUnitNo) + Me.gbxLotInfo.Controls.Add(Me.txtSysQty) + Me.gbxLotInfo.Controls.Add(Me.txtCurUnitNo) + Me.gbxLotInfo.Controls.Add(Me.txtCurQty) + Me.gbxLotInfo.Controls.Add(Me.txtOPDescription) + Me.gbxLotInfo.Controls.Add(Me.txtLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblPriority) + Me.gbxLotInfo.Controls.Add(Me.lblMONo) + Me.gbxLotInfo.Controls.Add(Me.lblShiftNo) + Me.gbxLotInfo.Controls.Add(Me.lblOPNo) + Me.gbxLotInfo.Controls.Add(Me.lblAreaNo) + Me.gbxLotInfo.Controls.Add(Me.lblSysQty) + Me.gbxLotInfo.Controls.Add(Me.lblCurQty) + Me.gbxLotInfo.Controls.Add(Me.lblProductNo) + Me.gbxLotInfo.Controls.Add(Me.lblOPDescription) + Me.gbxLotInfo.Controls.Add(Me.lblCustomerLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblEmployeeNo) + Me.gbxLotInfo.Controls.Add(Me.lblLotNo) + Me.gbxLotInfo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.gbxLotInfo.Location = New System.Drawing.Point(0, 0) + Me.gbxLotInfo.Name = "gbxLotInfo" + Me.gbxLotInfo.Size = New System.Drawing.Size(1009, 125) + Me.gbxLotInfo.TabIndex = 0 + Me.gbxLotInfo.TabStop = False + ' + 'txtOpName + ' + Me.txtOpName.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOpName.Location = New System.Drawing.Point(743, 69) + Me.txtOpName.Name = "txtOpName" + Me.txtOpName.ReadOnly = True + Me.txtOpName.Size = New System.Drawing.Size(259, 22) + Me.txtOpName.TabIndex = 109 + ' + 'txtOPNo + ' + Me.txtOPNo.Location = New System.Drawing.Point(609, 69) + Me.txtOPNo.Name = "txtOPNo" + Me.txtOPNo.ReadOnly = True + Me.txtOPNo.Size = New System.Drawing.Size(137, 22) + Me.txtOPNo.TabIndex = 7 + ' + 'txtProductNo + ' + Me.txtProductNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtProductNo.Location = New System.Drawing.Point(609, 42) + Me.txtProductNo.Name = "txtProductNo" + Me.txtProductNo.ReadOnly = True + Me.txtProductNo.Size = New System.Drawing.Size(188, 22) + Me.txtProductNo.TabIndex = 13 + ' + 'txtCustomerLotNo + ' + Me.txtCustomerLotNo.Location = New System.Drawing.Point(87, 42) + Me.txtCustomerLotNo.Name = "txtCustomerLotNo" + Me.txtCustomerLotNo.ReadOnly = True + Me.txtCustomerLotNo.Size = New System.Drawing.Size(179, 22) + Me.txtCustomerLotNo.TabIndex = 8 + ' + 'txtMONo + ' + Me.txtMONo.Location = New System.Drawing.Point(341, 42) + Me.txtMONo.Name = "txtMONo" + Me.txtMONo.ReadOnly = True + Me.txtMONo.Size = New System.Drawing.Size(179, 22) + Me.txtMONo.TabIndex = 9 + ' + 'txtShiftNo + ' + Me.txtShiftNo.Location = New System.Drawing.Point(341, 69) + Me.txtShiftNo.Name = "txtShiftNo" + Me.txtShiftNo.ReadOnly = True + Me.txtShiftNo.Size = New System.Drawing.Size(179, 22) + Me.txtShiftNo.TabIndex = 15 + ' + 'txtEmployeeNo + ' + Me.txtEmployeeNo.Location = New System.Drawing.Point(87, 69) + Me.txtEmployeeNo.Name = "txtEmployeeNo" + Me.txtEmployeeNo.ReadOnly = True + Me.txtEmployeeNo.Size = New System.Drawing.Size(179, 22) + Me.txtEmployeeNo.TabIndex = 12 + ' + 'txtAreaNo + ' + Me.txtAreaNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtAreaNo.Location = New System.Drawing.Point(609, 15) + Me.txtAreaNo.Name = "txtAreaNo" + Me.txtAreaNo.ReadOnly = True + Me.txtAreaNo.Size = New System.Drawing.Size(188, 22) + Me.txtAreaNo.TabIndex = 2 + ' + 'txtPriority + ' + Me.txtPriority.Location = New System.Drawing.Point(341, 15) + Me.txtPriority.Name = "txtPriority" + Me.txtPriority.ReadOnly = True + Me.txtPriority.Size = New System.Drawing.Size(179, 22) + Me.txtPriority.TabIndex = 1 + ' + 'txtSysUnitNo + ' + Me.txtSysUnitNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtSysUnitNo.Location = New System.Drawing.Point(962, 42) + Me.txtSysUnitNo.Name = "txtSysUnitNo" + Me.txtSysUnitNo.ReadOnly = True + Me.txtSysUnitNo.Size = New System.Drawing.Size(40, 22) + Me.txtSysUnitNo.TabIndex = 9 + ' + 'txtSysQty + ' + Me.txtSysQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtSysQty.Location = New System.Drawing.Point(860, 42) + Me.txtSysQty.Name = "txtSysQty" + Me.txtSysQty.ReadOnly = True + Me.txtSysQty.Size = New System.Drawing.Size(102, 22) + Me.txtSysQty.TabIndex = 8 + ' + 'txtCurUnitNo + ' + Me.txtCurUnitNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCurUnitNo.Location = New System.Drawing.Point(962, 15) + Me.txtCurUnitNo.Name = "txtCurUnitNo" + Me.txtCurUnitNo.ReadOnly = True + Me.txtCurUnitNo.Size = New System.Drawing.Size(40, 22) + Me.txtCurUnitNo.TabIndex = 4 + ' + 'txtCurQty + ' + Me.txtCurQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCurQty.Location = New System.Drawing.Point(860, 15) + Me.txtCurQty.Name = "txtCurQty" + Me.txtCurQty.ReadOnly = True + Me.txtCurQty.Size = New System.Drawing.Size(102, 22) + Me.txtCurQty.TabIndex = 3 + ' + 'txtOPDescription + ' + Me.txtOPDescription.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOPDescription.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtOPDescription.Location = New System.Drawing.Point(87, 96) + Me.txtOPDescription.Name = "txtOPDescription" + Me.txtOPDescription.ReadOnly = True + Me.txtOPDescription.Size = New System.Drawing.Size(915, 22) + Me.txtOPDescription.TabIndex = 10 + ' + 'txtLotNo + ' + Me.txtLotNo.Location = New System.Drawing.Point(87, 15) + Me.txtLotNo.Name = "txtLotNo" + Me.txtLotNo.ReadOnly = True + Me.txtLotNo.Size = New System.Drawing.Size(179, 22) + Me.txtLotNo.TabIndex = 0 + ' + 'lblPriority + ' + Me.lblPriority.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblPriority.Location = New System.Drawing.Point(271, 18) + Me.lblPriority.Name = "lblPriority" + Me.lblPriority.Size = New System.Drawing.Size(64, 15) + Me.lblPriority.TabIndex = 85 + Me.lblPriority.Text = "Priority" + Me.lblPriority.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblMONo + ' + Me.lblMONo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMONo.Location = New System.Drawing.Point(271, 45) + Me.lblMONo.Name = "lblMONo" + Me.lblMONo.Size = New System.Drawing.Size(64, 15) + Me.lblMONo.TabIndex = 83 + Me.lblMONo.Text = "MONo" + Me.lblMONo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblShiftNo + ' + Me.lblShiftNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblShiftNo.Location = New System.Drawing.Point(271, 72) + Me.lblShiftNo.Name = "lblShiftNo" + Me.lblShiftNo.Size = New System.Drawing.Size(64, 15) + Me.lblShiftNo.TabIndex = 79 + Me.lblShiftNo.Text = "Shift No" + Me.lblShiftNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblOPNo + ' + Me.lblOPNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOPNo.Location = New System.Drawing.Point(527, 72) + Me.lblOPNo.Name = "lblOPNo" + Me.lblOPNo.Size = New System.Drawing.Size(75, 15) + Me.lblOPNo.TabIndex = 75 + Me.lblOPNo.Text = "OP No" + Me.lblOPNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblAreaNo + ' + Me.lblAreaNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblAreaNo.Location = New System.Drawing.Point(527, 18) + Me.lblAreaNo.Name = "lblAreaNo" + Me.lblAreaNo.Size = New System.Drawing.Size(75, 15) + Me.lblAreaNo.TabIndex = 71 + Me.lblAreaNo.Text = "Area No" + Me.lblAreaNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblSysQty + ' + Me.lblSysQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblSysQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblSysQty.Location = New System.Drawing.Point(790, 45) + Me.lblSysQty.Name = "lblSysQty" + Me.lblSysQty.Size = New System.Drawing.Size(64, 15) + Me.lblSysQty.TabIndex = 68 + Me.lblSysQty.Text = "Sys Qty" + Me.lblSysQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblCurQty + ' + Me.lblCurQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblCurQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCurQty.Location = New System.Drawing.Point(790, 18) + Me.lblCurQty.Name = "lblCurQty" + Me.lblCurQty.Size = New System.Drawing.Size(64, 15) + Me.lblCurQty.TabIndex = 64 + Me.lblCurQty.Text = "Cur Qty" + Me.lblCurQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblProductNo + ' + Me.lblProductNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblProductNo.Location = New System.Drawing.Point(527, 45) + Me.lblProductNo.Name = "lblProductNo" + Me.lblProductNo.Size = New System.Drawing.Size(75, 15) + Me.lblProductNo.TabIndex = 107 + Me.lblProductNo.Text = "Product No" + Me.lblProductNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblOPDescription + ' + Me.lblOPDescription.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOPDescription.Location = New System.Drawing.Point(3, 97) + Me.lblOPDescription.Name = "lblOPDescription" + Me.lblOPDescription.Size = New System.Drawing.Size(80, 15) + Me.lblOPDescription.TabIndex = 108 + Me.lblOPDescription.Text = "OP Description" + Me.lblOPDescription.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblCustomerLotNo + ' + Me.lblCustomerLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCustomerLotNo.Location = New System.Drawing.Point(3, 45) + Me.lblCustomerLotNo.Name = "lblCustomerLotNo" + Me.lblCustomerLotNo.Size = New System.Drawing.Size(80, 15) + Me.lblCustomerLotNo.TabIndex = 81 + Me.lblCustomerLotNo.Text = "Customer Lot No" + Me.lblCustomerLotNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblEmployeeNo + ' + Me.lblEmployeeNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblEmployeeNo.Location = New System.Drawing.Point(3, 72) + Me.lblEmployeeNo.Name = "lblEmployeeNo" + Me.lblEmployeeNo.Size = New System.Drawing.Size(80, 15) + Me.lblEmployeeNo.TabIndex = 73 + Me.lblEmployeeNo.Text = "Employee No" + Me.lblEmployeeNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblLotNo + ' + Me.lblLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblLotNo.Location = New System.Drawing.Point(3, 18) + Me.lblLotNo.Name = "lblLotNo" + Me.lblLotNo.Size = New System.Drawing.Size(80, 15) + Me.lblLotNo.TabIndex = 62 + Me.lblLotNo.Text = "Lot No" + Me.lblLotNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'UltraTabPageControl2 + ' + Me.UltraTabPageControl2.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabPageControl2.Name = "UltraTabPageControl2" + Me.UltraTabPageControl2.Size = New System.Drawing.Size(340, 100) + ' + 'UltraTabPageControl1 + ' + Me.UltraTabPageControl1.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabPageControl1.Name = "UltraTabPageControl1" + Me.UltraTabPageControl1.Size = New System.Drawing.Size(340, 100) + ' + 'SBar1 + ' + Me.SBar1.Font = New System.Drawing.Font("Times New Roman", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.SBar1.Location = New System.Drawing.Point(0, 707) + Me.SBar1.Name = "SBar1" + Me.SBar1.Panels.AddRange(New System.Windows.Forms.StatusBarPanel() {Me.SBarPanel1, Me.SBarPanel2, Me.SBarPanel3, Me.SBarPanel4}) + Me.SBar1.ShowPanels = True + Me.SBar1.Size = New System.Drawing.Size(1008, 22) + Me.SBar1.TabIndex = 68 + ' + 'SBarPanel1 + ' + Me.SBarPanel1.Name = "SBarPanel1" + ' + 'SBarPanel2 + ' + Me.SBarPanel2.Name = "SBarPanel2" + ' + 'SBarPanel3 + ' + Me.SBarPanel3.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring + Me.SBarPanel3.Name = "SBarPanel3" + Me.SBarPanel3.Width = 641 + ' + 'SBarPanel4 + ' + Me.SBarPanel4.Alignment = System.Windows.Forms.HorizontalAlignment.Right + Me.SBarPanel4.Name = "SBarPanel4" + Me.SBarPanel4.Width = 150 + ' + 'iugAttrib + ' + Me.iugAttrib.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugAttrib.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugAttrib.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugAttrib.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugAttrib.Identity = "IMes" + Me.iugAttrib.IdentityForm = "" + Me.iugAttrib.LayOutFilePath = "" + Me.iugAttrib.Location = New System.Drawing.Point(4, 3) + Me.iugAttrib.Name = "iugAttrib" + Me.iugAttrib.PrintFitWidthToPages = 0 + Me.iugAttrib.PrintLandscape = True + Me.iugAttrib.PrintPageFooter = "" + Me.iugAttrib.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugAttrib.PrintPageFooterHeight = 20 + Me.iugAttrib.PrintPageHeader = "" + Me.iugAttrib.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugAttrib.PrintPageHeaderHeight = 20 + Me.iugAttrib.PrintZoom = 1.0R + Me.iugAttrib.Size = New System.Drawing.Size(506, 214) + Me.iugAttrib.TabIndex = 105 + Me.iugAttrib.UserNo = "IMes" + ' + 'iugEquipment + ' + Me.iugEquipment.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugEquipment.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugEquipment.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugEquipment.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugEquipment.Identity = "IMes" + Me.iugEquipment.IdentityForm = "" + Me.iugEquipment.LayOutFilePath = "" + Me.iugEquipment.Location = New System.Drawing.Point(3, 46) + Me.iugEquipment.Name = "iugEquipment" + Me.iugEquipment.PrintFitWidthToPages = 0 + Me.iugEquipment.PrintLandscape = True + Me.iugEquipment.PrintPageFooter = "" + Me.iugEquipment.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugEquipment.PrintPageFooterHeight = 20 + Me.iugEquipment.PrintPageHeader = "" + Me.iugEquipment.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugEquipment.PrintPageHeaderHeight = 20 + Me.iugEquipment.PrintZoom = 1.0R + Me.iugEquipment.Size = New System.Drawing.Size(477, 171) + Me.iugEquipment.TabIndex = 107 + Me.iugEquipment.UserNo = "IMes" + ' + 'btnClose + ' + Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnClose.Location = New System.Drawing.Point(925, 673) + Me.btnClose.Name = "btnClose" + Me.btnClose.Size = New System.Drawing.Size(80, 32) + Me.btnClose.TabIndex = 144 + Me.btnClose.Text = "Close" + ' + 'btnConfirm + ' + Me.btnConfirm.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnConfirm.Location = New System.Drawing.Point(839, 673) + Me.btnConfirm.Name = "btnConfirm" + Me.btnConfirm.Size = New System.Drawing.Size(80, 32) + Me.btnConfirm.TabIndex = 143 + Me.btnConfirm.Text = "Confirm" + ' + 'lblEquipmentNo + ' + Me.lblEquipmentNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblEquipmentNo.Location = New System.Drawing.Point(20, 16) + Me.lblEquipmentNo.Name = "lblEquipmentNo" + Me.lblEquipmentNo.Size = New System.Drawing.Size(80, 16) + Me.lblEquipmentNo.TabIndex = 147 + Me.lblEquipmentNo.Text = "Equipment No" + ' + 'txtEquipmentNo + ' + Me.txtEquipmentNo.Location = New System.Drawing.Point(106, 12) + Me.txtEquipmentNo.Name = "txtEquipmentNo" + Me.txtEquipmentNo.Size = New System.Drawing.Size(132, 22) + Me.txtEquipmentNo.TabIndex = 17 + ' + 'lblLotRecord + ' + Me.lblLotRecord.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblLotRecord.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblLotRecord.Location = New System.Drawing.Point(16, 634) + Me.lblLotRecord.Name = "lblLotRecord" + Me.lblLotRecord.Size = New System.Drawing.Size(64, 16) + Me.lblLotRecord.TabIndex = 145 + Me.lblLotRecord.Text = "Lot Record" + ' + 'txtLotRecord + ' + Me.txtLotRecord.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.txtLotRecord.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtLotRecord.Location = New System.Drawing.Point(88, 634) + Me.txtLotRecord.Name = "txtLotRecord" + Me.txtLotRecord.Size = New System.Drawing.Size(393, 35) + Me.txtLotRecord.TabIndex = 18 + Me.txtLotRecord.Text = "" + ' + 'lblupdcheckintime + ' + Me.lblupdcheckintime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblupdcheckintime.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblupdcheckintime.Location = New System.Drawing.Point(8, 683) + Me.lblupdcheckintime.Name = "lblupdcheckintime" + Me.lblupdcheckintime.Size = New System.Drawing.Size(116, 14) + Me.lblupdcheckintime.TabIndex = 62 + Me.lblupdcheckintime.Text = "Update CheckIn Time" + ' + 'dtpcheckintime + ' + Me.dtpcheckintime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.dtpcheckintime.CustomFormat = "yyyy/MM/dd HH:mm:ss" + Me.dtpcheckintime.Format = System.Windows.Forms.DateTimePickerFormat.Custom + Me.dtpcheckintime.Location = New System.Drawing.Point(152, 682) + Me.dtpcheckintime.Name = "dtpcheckintime" + Me.dtpcheckintime.Size = New System.Drawing.Size(128, 21) + Me.dtpcheckintime.TabIndex = 151 + ' + 'btnEQPConsumeReset + ' + Me.btnEQPConsumeReset.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnEQPConsumeReset.Location = New System.Drawing.Point(282, 7) + Me.btnEQPConsumeReset.Name = "btnEQPConsumeReset" + Me.btnEQPConsumeReset.Size = New System.Drawing.Size(112, 32) + Me.btnEQPConsumeReset.TabIndex = 152 + Me.btnEQPConsumeReset.Text = "EQPConsumeReset" + ' + 'btnQCList + ' + Me.btnQCList.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnQCList.Location = New System.Drawing.Point(400, 7) + Me.btnQCList.Name = "btnQCList" + Me.btnQCList.Size = New System.Drawing.Size(80, 32) + Me.btnQCList.TabIndex = 153 + Me.btnQCList.Text = "QC List" + ' + 'utpEquipment + ' + Me.utpEquipment.Controls.Add(Me.IMESUltraGrid3) + Me.utpEquipment.Location = New System.Drawing.Point(-10000, -10000) + Me.utpEquipment.Name = "utpEquipment" + Me.utpEquipment.Size = New System.Drawing.Size(772, 150) + ' + 'IMESUltraGrid3 + ' + Me.IMESUltraGrid3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.IMESUltraGrid3.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.IMESUltraGrid3.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.IMESUltraGrid3.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.IMESUltraGrid3.Identity = "IMes" + Me.IMESUltraGrid3.IdentityForm = "" + Me.IMESUltraGrid3.LayOutFilePath = "" + Me.IMESUltraGrid3.Location = New System.Drawing.Point(11, 8) + Me.IMESUltraGrid3.Name = "IMESUltraGrid3" + Me.IMESUltraGrid3.PrintFitWidthToPages = 0 + Me.IMESUltraGrid3.PrintLandscape = True + Me.IMESUltraGrid3.PrintPageFooter = "" + Me.IMESUltraGrid3.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.IMESUltraGrid3.PrintPageFooterHeight = 20 + Me.IMESUltraGrid3.PrintPageHeader = "" + Me.IMESUltraGrid3.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.IMESUltraGrid3.PrintPageHeaderHeight = 20 + Me.IMESUltraGrid3.PrintZoom = 1.0R + Me.IMESUltraGrid3.Size = New System.Drawing.Size(753, 136) + Me.IMESUltraGrid3.TabIndex = 0 + Me.IMESUltraGrid3.UserNo = "IMes" + ' + 'btnMultiUser + ' + Me.btnMultiUser.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnMultiUser.Location = New System.Drawing.Point(398, 673) + Me.btnMultiUser.Name = "btnMultiUser" + Me.btnMultiUser.Size = New System.Drawing.Size(80, 32) + Me.btnMultiUser.TabIndex = 155 + Me.btnMultiUser.Text = "Multi User" + Me.btnMultiUser.Visible = False + ' + 'btnOperator + ' + Me.btnOperator.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnOperator.Location = New System.Drawing.Point(315, 673) + Me.btnOperator.Name = "btnOperator" + Me.btnOperator.Size = New System.Drawing.Size(80, 32) + Me.btnOperator.TabIndex = 156 + Me.btnOperator.Text = "Operator" + Me.btnOperator.Visible = False + ' + 'chkUpdCheckInTime + ' + Me.chkUpdCheckInTime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.chkUpdCheckInTime.AutoSize = True + Me.chkUpdCheckInTime.Location = New System.Drawing.Point(130, 683) + Me.chkUpdCheckInTime.Name = "chkUpdCheckInTime" + Me.chkUpdCheckInTime.Size = New System.Drawing.Size(15, 14) + Me.chkUpdCheckInTime.TabIndex = 157 + ' + 'btnSWR + ' + Me.btnSWR.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnSWR.Location = New System.Drawing.Point(753, 673) + Me.btnSWR.Name = "btnSWR" + Me.btnSWR.Size = New System.Drawing.Size(80, 32) + Me.btnSWR.TabIndex = 158 + Me.btnSWR.Text = "SWR" + ' + 'uplAttrib + ' + ' + 'uplAttrib.ClientArea + ' + Me.uplAttrib.ClientArea.Controls.Add(Me.iugAttrib) + Me.uplAttrib.Dock = System.Windows.Forms.DockStyle.Left + Me.uplAttrib.Location = New System.Drawing.Point(0, 0) + Me.uplAttrib.Name = "uplAttrib" + Me.uplAttrib.Size = New System.Drawing.Size(515, 220) + Me.uplAttrib.TabIndex = 0 + ' + 'uplEquipment + ' + ' + 'uplEquipment.ClientArea + ' + Me.uplEquipment.ClientArea.Controls.Add(Me.lblEquipmentNo) + Me.uplEquipment.ClientArea.Controls.Add(Me.iugEquipment) + Me.uplEquipment.ClientArea.Controls.Add(Me.txtEquipmentNo) + Me.uplEquipment.ClientArea.Controls.Add(Me.btnEQPConsumeReset) + Me.uplEquipment.ClientArea.Controls.Add(Me.btnQCList) + Me.uplEquipment.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplEquipment.Location = New System.Drawing.Point(522, 0) + Me.uplEquipment.Name = "uplEquipment" + Me.uplEquipment.Size = New System.Drawing.Size(487, 220) + Me.uplEquipment.TabIndex = 1 + ' + 'uplAttrib_Equipment + ' + ' + 'uplAttrib_Equipment.ClientArea + ' + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.uplEquipment) + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.UltraSplitter1) + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.uplAttrib) + Me.uplAttrib_Equipment.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplAttrib_Equipment.Location = New System.Drawing.Point(0, 0) + Me.uplAttrib_Equipment.Name = "uplAttrib_Equipment" + Me.uplAttrib_Equipment.Size = New System.Drawing.Size(1009, 220) + Me.uplAttrib_Equipment.TabIndex = 162 + ' + 'UltraSplitter1 + ' + Me.UltraSplitter1.Location = New System.Drawing.Point(515, 0) + Me.UltraSplitter1.Name = "UltraSplitter1" + Me.UltraSplitter1.RestoreExtent = 479 + Me.UltraSplitter1.Size = New System.Drawing.Size(7, 220) + Me.UltraSplitter1.TabIndex = 1 + ' + 'uplMaterial_KeyIn + ' + ' + 'uplMaterial_KeyIn.ClientArea + ' + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.uplKeyIn) + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.UltraSplitter2) + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.uplMaterial) + Me.uplMaterial_KeyIn.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplMaterial_KeyIn.Location = New System.Drawing.Point(0, 0) + Me.uplMaterial_KeyIn.Name = "uplMaterial_KeyIn" + Me.uplMaterial_KeyIn.Size = New System.Drawing.Size(1009, 216) + Me.uplMaterial_KeyIn.TabIndex = 0 + ' + 'uplKeyIn + ' + ' + 'uplKeyIn.ClientArea + ' + Me.uplKeyIn.ClientArea.Controls.Add(Me.iugKeyIn) + Me.uplKeyIn.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplKeyIn.Location = New System.Drawing.Point(522, 0) + Me.uplKeyIn.Name = "uplKeyIn" + Me.uplKeyIn.Size = New System.Drawing.Size(487, 216) + Me.uplKeyIn.TabIndex = 4 + ' + 'iugKeyIn + ' + Me.iugKeyIn.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugKeyIn.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugKeyIn.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugKeyIn.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugKeyIn.Identity = "IMes" + Me.iugKeyIn.IdentityForm = "" + Me.iugKeyIn.LayOutFilePath = "" + Me.iugKeyIn.Location = New System.Drawing.Point(3, 3) + Me.iugKeyIn.Name = "iugKeyIn" + Me.iugKeyIn.PrintFitWidthToPages = 0 + Me.iugKeyIn.PrintLandscape = True + Me.iugKeyIn.PrintPageFooter = "" + Me.iugKeyIn.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKeyIn.PrintPageFooterHeight = 20 + Me.iugKeyIn.PrintPageHeader = "" + Me.iugKeyIn.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKeyIn.PrintPageHeaderHeight = 20 + Me.iugKeyIn.PrintZoom = 1.0R + Me.iugKeyIn.Size = New System.Drawing.Size(477, 207) + Me.iugKeyIn.TabIndex = 150 + Me.iugKeyIn.UserNo = "IMes" + ' + 'UltraSplitter2 + ' + Me.UltraSplitter2.Location = New System.Drawing.Point(515, 0) + Me.UltraSplitter2.Name = "UltraSplitter2" + Me.UltraSplitter2.RestoreExtent = 479 + Me.UltraSplitter2.Size = New System.Drawing.Size(7, 216) + Me.UltraSplitter2.TabIndex = 3 + ' + 'uplMaterial + ' + ' + 'uplMaterial.ClientArea + ' + Me.uplMaterial.ClientArea.Controls.Add(Me.UltraTabControl1) + Me.uplMaterial.Dock = System.Windows.Forms.DockStyle.Left + Me.uplMaterial.Location = New System.Drawing.Point(0, 0) + Me.uplMaterial.Name = "uplMaterial" + Me.uplMaterial.Size = New System.Drawing.Size(515, 216) + Me.uplMaterial.TabIndex = 0 + ' + 'UltraTabControl1 + ' + Me.UltraTabControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.UltraTabControl1.Controls.Add(Me.utpMaterial) + Me.UltraTabControl1.Controls.Add(Me.UltraTabSharedControlsPage1) + Me.UltraTabControl1.Controls.Add(Me.utpSubOP) + Me.UltraTabControl1.Controls.Add(Me.iugStuInfo) + Me.UltraTabControl1.Location = New System.Drawing.Point(0, 0) + Me.UltraTabControl1.Name = "UltraTabControl1" + Me.UltraTabControl1.SharedControlsPage = Me.UltraTabSharedControlsPage1 + Me.UltraTabControl1.Size = New System.Drawing.Size(515, 213) + Me.UltraTabControl1.TabIndex = 154 + Me.UltraTabControl1.TabLayoutStyle = Infragistics.Win.UltraWinTabs.TabLayoutStyle.SingleRowTabsPerRow + UltraTab2.FixedWidth = 120 + UltraTab2.TabPage = Me.utpMaterial + UltraTab2.Text = "Material" + UltraTab3.TabPage = Me.utpSubOP + UltraTab3.Text = "Sub OP" + UltraTab5.TabPage = Me.iugStuInfo + UltraTab5.Text = "StuInfo" + Me.UltraTabControl1.Tabs.AddRange(New Infragistics.Win.UltraWinTabControl.UltraTab() {UltraTab2, UltraTab3, UltraTab5}) + ' + 'UltraTabSharedControlsPage1 + ' + Me.UltraTabSharedControlsPage1.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabSharedControlsPage1.Name = "UltraTabSharedControlsPage1" + Me.UltraTabSharedControlsPage1.Size = New System.Drawing.Size(511, 187) + ' + 'uplAll + ' + Me.uplAll.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + ' + 'uplAll.ClientArea + ' + Me.uplAll.ClientArea.Controls.Add(Me.uegMaterial_KeyIn2) + Me.uplAll.ClientArea.Controls.Add(Me.uegAttrib_Equipment) + Me.uplAll.ClientArea.Controls.Add(Me.uegLotInfo) + Me.uplAll.Location = New System.Drawing.Point(0, -1) + Me.uplAll.Name = "uplAll" + Me.uplAll.Size = New System.Drawing.Size(1013, 629) + Me.uplAll.TabIndex = 165 + ' + 'uegMaterial_KeyIn2 + ' + Me.uegMaterial_KeyIn2.Controls.Add(Me.UltraExpandableGroupBoxPanel4) + Me.uegMaterial_KeyIn2.Dock = System.Windows.Forms.DockStyle.Fill + Me.uegMaterial_KeyIn2.ExpandedSize = New System.Drawing.Size(1013, 236) + Me.uegMaterial_KeyIn2.Location = New System.Drawing.Point(0, 393) + Me.uegMaterial_KeyIn2.Name = "uegMaterial_KeyIn2" + Me.uegMaterial_KeyIn2.Size = New System.Drawing.Size(1013, 236) + Me.uegMaterial_KeyIn2.TabIndex = 163 + Me.uegMaterial_KeyIn2.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel4 + ' + Me.UltraExpandableGroupBoxPanel4.Controls.Add(Me.UltraPanel4) + Me.UltraExpandableGroupBoxPanel4.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel4.Location = New System.Drawing.Point(2, 18) + Me.UltraExpandableGroupBoxPanel4.Name = "UltraExpandableGroupBoxPanel4" + Me.UltraExpandableGroupBoxPanel4.Size = New System.Drawing.Size(1009, 216) + Me.UltraExpandableGroupBoxPanel4.TabIndex = 0 + ' + 'UltraPanel4 + ' + ' + 'UltraPanel4.ClientArea + ' + Me.UltraPanel4.ClientArea.Controls.Add(Me.uplMaterial_KeyIn) + Me.UltraPanel4.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel4.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel4.Name = "UltraPanel4" + Me.UltraPanel4.Size = New System.Drawing.Size(1009, 216) + Me.UltraPanel4.TabIndex = 0 + ' + 'uegAttrib_Equipment + ' + Me.uegAttrib_Equipment.Controls.Add(Me.UltraExpandableGroupBoxPanel2) + Me.uegAttrib_Equipment.Dock = System.Windows.Forms.DockStyle.Top + Me.uegAttrib_Equipment.ExpandedSize = New System.Drawing.Size(1013, 240) + Me.uegAttrib_Equipment.Location = New System.Drawing.Point(0, 153) + Me.uegAttrib_Equipment.Name = "uegAttrib_Equipment" + Me.uegAttrib_Equipment.Size = New System.Drawing.Size(1013, 240) + Me.uegAttrib_Equipment.TabIndex = 162 + Me.uegAttrib_Equipment.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel2 + ' + Me.UltraExpandableGroupBoxPanel2.Controls.Add(Me.UltraPanel2) + Me.UltraExpandableGroupBoxPanel2.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel2.Location = New System.Drawing.Point(2, 18) + Me.UltraExpandableGroupBoxPanel2.Name = "UltraExpandableGroupBoxPanel2" + Me.UltraExpandableGroupBoxPanel2.Size = New System.Drawing.Size(1009, 220) + Me.UltraExpandableGroupBoxPanel2.TabIndex = 0 + ' + 'UltraPanel2 + ' + ' + 'UltraPanel2.ClientArea + ' + Me.UltraPanel2.ClientArea.Controls.Add(Me.uplAttrib_Equipment) + Me.UltraPanel2.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel2.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel2.Name = "UltraPanel2" + Me.UltraPanel2.Size = New System.Drawing.Size(1009, 220) + Me.UltraPanel2.TabIndex = 0 + ' + 'UltraTabPageControl3 + ' + Me.UltraTabPageControl3.Controls.Add(Me.Label1) + Me.UltraTabPageControl3.Controls.Add(Me.UltraTextEditor1) + Me.UltraTabPageControl3.Controls.Add(Me.Label2) + Me.UltraTabPageControl3.Controls.Add(Me.UltraTextEditor2) + Me.UltraTabPageControl3.Controls.Add(Me.IMESUltraGridControl1) + Me.UltraTabPageControl3.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabPageControl3.Name = "UltraTabPageControl3" + Me.UltraTabPageControl3.Size = New System.Drawing.Size(511, 187) + ' + 'Label1 + ' + Me.Label1.BackColor = System.Drawing.Color.Transparent + Me.Label1.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label1.Location = New System.Drawing.Point(7, 11) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(90, 16) + Me.Label1.TabIndex = 159 + Me.Label1.Text = "Material No" + ' + 'UltraTextEditor1 + ' + Me.UltraTextEditor1.Location = New System.Drawing.Point(103, 7) + Me.UltraTextEditor1.Name = "UltraTextEditor1" + Me.UltraTextEditor1.Size = New System.Drawing.Size(132, 21) + Me.UltraTextEditor1.TabIndex = 158 + ' + 'Label2 + ' + Me.Label2.BackColor = System.Drawing.Color.Transparent + Me.Label2.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label2.Location = New System.Drawing.Point(244, 11) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(90, 16) + Me.Label2.TabIndex = 157 + Me.Label2.Text = "Material Lot No" + ' + 'UltraTextEditor2 + ' + Me.UltraTextEditor2.Location = New System.Drawing.Point(340, 7) + Me.UltraTextEditor2.Name = "UltraTextEditor2" + Me.UltraTextEditor2.Size = New System.Drawing.Size(132, 21) + Me.UltraTextEditor2.TabIndex = 156 + ' + 'IMESUltraGridControl1 + ' + Me.IMESUltraGridControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.IMESUltraGridControl1.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.IMESUltraGridControl1.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.IMESUltraGridControl1.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.IMESUltraGridControl1.Identity = "IMes" + Me.IMESUltraGridControl1.IdentityForm = "" + Me.IMESUltraGridControl1.LayOutFilePath = "" + Me.IMESUltraGridControl1.Location = New System.Drawing.Point(2, 35) + Me.IMESUltraGridControl1.Name = "IMESUltraGridControl1" + Me.IMESUltraGridControl1.PrintFitWidthToPages = 0 + Me.IMESUltraGridControl1.PrintLandscape = True + Me.IMESUltraGridControl1.PrintPageFooter = "" + Me.IMESUltraGridControl1.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.IMESUltraGridControl1.PrintPageFooterHeight = 20 + Me.IMESUltraGridControl1.PrintPageHeader = "" + Me.IMESUltraGridControl1.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.IMESUltraGridControl1.PrintPageHeaderHeight = 20 + Me.IMESUltraGridControl1.PrintZoom = 1.0R + Me.IMESUltraGridControl1.Size = New System.Drawing.Size(506, 148) + Me.IMESUltraGridControl1.TabIndex = 108 + Me.IMESUltraGridControl1.UserNo = "IMes" + ' + 'UltraTabSharedControlsPage2 + ' + Me.UltraTabSharedControlsPage2.Location = New System.Drawing.Point(1, 20) + Me.UltraTabSharedControlsPage2.Name = "UltraTabSharedControlsPage2" + Me.UltraTabSharedControlsPage2.Size = New System.Drawing.Size(196, 77) + ' + 'UltraTabControl2 + ' + Me.UltraTabControl2.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.UltraTabControl2.Controls.Add(Me.UltraTabPageControl3) + Me.UltraTabControl2.Location = New System.Drawing.Point(0, 0) + Me.UltraTabControl2.Name = "UltraTabControl2" + Me.UltraTabControl2.SharedControlsPage = Me.UltraTabSharedControlsPage2 + Me.UltraTabControl2.Size = New System.Drawing.Size(200, 100) + Me.UltraTabControl2.TabIndex = 0 + ' + 'frmBR_L_CI_GEN + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14) + Me.ClientSize = New System.Drawing.Size(1008, 729) + Me.Controls.Add(Me.uplAll) + Me.Controls.Add(Me.btnSWR) + Me.Controls.Add(Me.chkUpdCheckInTime) + Me.Controls.Add(Me.btnOperator) + Me.Controls.Add(Me.btnMultiUser) + Me.Controls.Add(Me.dtpcheckintime) + Me.Controls.Add(Me.txtLotRecord) + Me.Controls.Add(Me.lblLotRecord) + Me.Controls.Add(Me.btnClose) + Me.Controls.Add(Me.btnConfirm) + Me.Controls.Add(Me.SBar1) + Me.Controls.Add(Me.lblupdcheckintime) + Me.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.MinimizeBox = False + Me.Name = "frmBR_L_CI_GEN" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "General Check In" + Me.utpMaterial.ResumeLayout(False) + Me.utpMaterial.PerformLayout() + CType(Me.txtMaterialNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtMaterialLotNo, System.ComponentModel.ISupportInitialize).EndInit() + Me.utpSubOP.ResumeLayout(False) + Me.iugStuInfo.ResumeLayout(False) + CType(Me.uegLotInfo, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegLotInfo.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel1.ResumeLayout(False) + Me.UltraPanel1.ClientArea.ResumeLayout(False) + Me.UltraPanel1.ResumeLayout(False) + Me.gbxLotInfo.ResumeLayout(False) + Me.gbxLotInfo.PerformLayout() + CType(Me.txtOpName, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtOPNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtProductNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCustomerLotNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtMONo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtShiftNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtEmployeeNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtAreaNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtPriority, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSysUnitNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSysQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCurUnitNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCurQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtOPDescription, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtLotNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel3, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel4, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtEquipmentNo, System.ComponentModel.ISupportInitialize).EndInit() + Me.utpEquipment.ResumeLayout(False) + Me.uplAttrib.ClientArea.ResumeLayout(False) + Me.uplAttrib.ResumeLayout(False) + Me.uplEquipment.ClientArea.ResumeLayout(False) + Me.uplEquipment.ClientArea.PerformLayout() + Me.uplEquipment.ResumeLayout(False) + Me.uplAttrib_Equipment.ClientArea.ResumeLayout(False) + Me.uplAttrib_Equipment.ResumeLayout(False) + Me.uplMaterial_KeyIn.ClientArea.ResumeLayout(False) + Me.uplMaterial_KeyIn.ResumeLayout(False) + Me.uplKeyIn.ClientArea.ResumeLayout(False) + Me.uplKeyIn.ResumeLayout(False) + Me.uplMaterial.ClientArea.ResumeLayout(False) + Me.uplMaterial.ResumeLayout(False) + CType(Me.UltraTabControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.UltraTabControl1.ResumeLayout(False) + Me.uplAll.ClientArea.ResumeLayout(False) + Me.uplAll.ResumeLayout(False) + CType(Me.uegMaterial_KeyIn2, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegMaterial_KeyIn2.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel4.ResumeLayout(False) + Me.UltraPanel4.ClientArea.ResumeLayout(False) + Me.UltraPanel4.ResumeLayout(False) + CType(Me.uegAttrib_Equipment, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegAttrib_Equipment.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel2.ResumeLayout(False) + Me.UltraPanel2.ClientArea.ResumeLayout(False) + Me.UltraPanel2.ResumeLayout(False) + Me.UltraTabPageControl3.ResumeLayout(False) + Me.UltraTabPageControl3.PerformLayout() + CType(Me.UltraTextEditor1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.UltraTextEditor2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.UltraTabControl2, System.ComponentModel.ISupportInitialize).EndInit() + Me.UltraTabControl2.ResumeLayout(False) + CType(Me.UltraDataSource1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + +#End Region + + Private Sub frmBR_L_CI_GEN_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load + + Cursor.Current = Cursors.WaitCursor + + Dim editorSettings As New Infragistics.Win.UltraWinEditors.DefaultEditorOwnerSettings + editorSettings.DataType = GetType(System.DateTime) + editorSettings.MaskInput = "yyyy/mm/dd hh:mm:ss" + editor = New Infragistics.Win.DateTimeEditor(New Infragistics.Win.UltraWinEditors.DefaultEditorOwner(editorSettings)) + + vlMaterialLevel = COM_Utility.ValueListProvider.GetInstance.GetValueList("TBLWIPTEMP_MATERIAL", "MATERIALLEVEL") + vlStuInfoIsSelected = COM_Utility.ValueListProvider.GetInstance.GetValueList("STUDENTINFO", "ISSELECTED") + + btnConfirm.Enabled = False + btnMultiUser.Enabled = False + + '2017/11/06 KunYuan:變更開始加工時間checkbox預設不勾選 + chkUpdCheckInTime.Checked = False + + If LotNo = defString Or UserId = defString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%LotNo%] [%or%] [%UserId%] [%CANNOTBEEMPTY%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + ' 2016/01/05 YF, 左下角的時間預設為AP SERVER的時間 + Me.datEventTime = funGetAPServerTime() + + '1.取出生產批資訊 -------------------------------------------------------------------------------------------- + If funLoadLotState() Then Exit Sub + + If blnByEQP = True Then + txtMaterialNo.Enabled = False + txtMaterialLotNo.Enabled = False + End If + + If dsWIP.Tables(tblLotState).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200003", "[%LotNo%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + If funGetShift() Then Exit Sub + If funLoadTemp_AttribJoinBasis() Then Exit Sub + If funLoadTemp_Material() Then Exit Sub + + txtLotNo.Text = LotNo + txtEmployeeNo.Text = UserId + Call funLotInfo_Show() + + '2.機台 ------------------------------------------------------------------------------------------------------- + + '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + '0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 2023/07/20, 19245 + 'Dim intAvailable As Integer + 'If funGetSysParameter("RMS TYPE") = "0" Then '使用舊版設備配件 + 'intAvailable = funLoadAvailableEquipment(LotNo) + 'Else '使用設備配方 + ' intAvailable = funLoadAvailableEquipmentInfo(LotNo) + 'End If + + 'If intAvailable < 0 Then + If funLoadAvailableEquipment(LotNo) < 0 Then + Call btnClose_Click(sender, e) '清除trigger OP紀錄 + Me.Dispose() + Exit Sub + Else + If EquipmentNo = defString Then + dsWIP.Tables(tblAreaEquipment).DefaultView.Sort = "EquipmentType, EquipmentNo" + Else '有指定機台,要強制使用. + Dim drSel As DataRow() + drSel = dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo='" & EquipmentNo & "'") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%EquipmentNo%]:" & EquipmentNo & " [%is not in area%]:" & txtAreaNo.Text & "!"), MsgBoxStyle.Exclamation, Me.Text) + Call btnClose_Click(sender, e) '清除trigger OP紀錄 + Me.Dispose() + Exit Sub + Else + If drSel(0)("AllowExecute") = 1 Then '可使用 + + drSel(0).BeginEdit() + drSel(0)("CheckFlag") = True + If LoadPort <> defInteger Then drSel(0)("LoadPort") = LoadPort + drSel(0).EndEdit() + '強制使用機台,故不提供此功能 + txtEquipmentNo.Enabled = False + Else '不可使用 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%EquipmentNo%]:" & EquipmentNo & " [%is not available%] " & drSel(0)("Description")), MsgBoxStyle.Exclamation, Me.Text) + Call btnClose_Click(sender, e) '清除trigger OP紀錄 + Me.Dispose() + Exit Sub + End If + End If + drSel = Nothing + End If + iugEquipment.iMESUltraGrid.DataSource = dsWIP.Tables(tblAreaEquipment) + + 'Modify on 2008/03/31 By OwenLiu, Auto Focus Assign EquipmentNo + If Not EquipmentNo.Equals(defString) Then + Dim ugrRow As Infragistics.Win.UltraWinGrid.UltraGridRow + ugrRow = FindRecordPosition(iugEquipment, "EquipmentNo", EquipmentNo) + If Not ugrRow Is Nothing Then + iugEquipment.iMESUltraGrid.ActiveRow = ugrRow + End If + End If + + '2021/3/18,Ning,點檢表檢查方式已調整, 不需在此帶入點檢類型 + ' 查詢可用設備,是否有指定點檢表,並將點檢表點檢類型帶入 + 'Call funQueryEquipmentQCList() + + '20091006 seam + Call Me.funLoadSubOP() + + End If + + '3.生產參數 ------------------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + '轉換抽樣參數 + If funGetSampleData() Then Exit Sub + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "AttribSource <> 0 And AttribSource <> 1 And (AttribPhase = " & PhaseNo & " Or AttribPhase = 99)" 'Source = Not KeyIn, Not Calculate ,Current and All Phase + iugAttrib.iMESUltraGrid.DataSource = dsWIP.Tables(tblTAttrib).DefaultView + End If + + '4.KeyIn Attrib ---------------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + dtKeyIn = New DataTable("KeyIn") + dtKeyIn.DefaultView.AllowNew = False + dtKeyIn.DefaultView.AllowDelete = False + dtKeyIn.DefaultView.AllowEdit = True + '建立KeyIn Table的欄位 + dtKeyIn.Columns.Add("AttribNo", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribName", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribValue", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribSequence", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("InputType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("DataType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("ValueType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("QCItemNo", System.Type.GetType("System.String")) '2015-12-18, Joe, Add + dtKeyIn.Columns.Add("OrgAttribValue", GetType(String)) + + '取出KeyIn Attrib + For Each dr As DataRow In dsWIP.Tables(tblTAttrib).Rows + '將資料存入KeyIn Table + If dr("AttribSource") = 0 AndAlso (dr("AttribPhase") = PhaseNo OrElse dr("AttribPhase") = 99) Then + drAdd = dtKeyIn.NewRow() + drAdd("AttribNo") = dr("AttribNo") + drAdd("AttribName") = dr("AttribName").ToString + drAdd("AttribSequence") = dr("AttribSequence") + drAdd("AttribValue") = dr("AttribValue") + drAdd("InputType") = dr("InputType") + drAdd("DataType") = dr("DataType") + drAdd("ValueType") = dr("ValueType") + drAdd("QCItemNo") = dr("QCItemNo") '2015-12-18, Joe, Add + drAdd("OrgAttribValue") = dr("OrgAttribValue") ' 2016/01/27 YF, 未轉換函式的特性值 + dtKeyIn.Rows.Add(drAdd) + End If + Next + + iugKeyIn.iMESUltraGrid.DataSource = dtKeyIn.DefaultView + + End If + + '5.物料 ----------------------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTMaterial) Is Nothing Then + '获取当前工单的物料清单 新设备上料14278 + Call funLoadMOMaterialList(txtMONo.Text, txtOPNo.Text) + + 'Kevin 2013/1/2,加入替代料處理 + Dim drData As DataRow + Dim drSelMaterialNo As DataRow() + For i As Integer = dsWIP.Tables(tblTMaterial).Rows.Count - 1 To 0 Step -1 + '取得用料清單 + If funLoadSubstituteMaterial_Main(dsWIP.Tables(tblTMaterial).Rows(i)("LotNo"), dsWIP.Tables(tblTMaterial).Rows(i)("MaterialNo"), dsWIP.Tables(tblTMaterial).Rows(i)("UnitNo")) < 0 Then Exit Sub + For Each dr As DataRow In dsWIP.Tables(tblSubstituteMaterial).Rows + drSelMaterialNo = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & dr("MaterialNo") & "' And OrgMaterialNo = '" & dr("OrgMaterialNo") & "'") + If drSelMaterialNo.Length = 0 Then + drData = dsWIP.Tables(tblTMaterial).NewRow + drData("OrgMaterialNo") = dsWIP.Tables(tblTMaterial).Rows(i)("MaterialNo") '紀錄原來的主物料 + drData("MaterialNo") = dr("MaterialNo") + drData("MaterialType") = dr("SubstituteMaterialType") + drData("MaterialLevelShow") = dr("SubstituteMaterialLevel") + drData("CheckLotNo") = dr("CheckLotNo") + drData("PutInPlaceType") = dr("SubstitutePutInPlaceType") + drData("StdQty") = dr("SubstituteStdQty") + drData("StdUseQty") = Format(dsWIP.Tables(tblLotState).Rows(0)("CurQty") * dr("SubstituteStdQty") * (1 + dsWIP.Tables(tblTMaterial).Rows(i)("DecreaseRate")), "0.######") + drData("DecreaseRate") = dsWIP.Tables(tblTMaterial).Rows(i)("DecreaseRate") + drData("UnitNo") = dsWIP.Tables(tblTMaterial).Rows(i)("UnitNo") + dsWIP.Tables(tblTMaterial).Rows.Add(drData) + End If + Next + Next + + '產生MaterilaLotNo暫存表 + dtTmpMTLLotNo = New DataTable("TmpMTLLotNo") + dtTmpMTLLotNo.Columns.Add("EquipmentNo", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("OrgMaterialNo", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("MaterialNo", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("SUBSTITUTEMATERIALNO", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dtTmpMTLLotNo.Columns("Qty").DefaultValue = 0 + dsWIP.Tables.Add(dtTmpMTLLotNo) + tblTmpMTLLotNo = "TmpMTLLotNo" + dsWIP.Tables(tblTmpMTLLotNo).DefaultView.Sort = "MaterialLotNo" + + 'Data(Relation) + Dim parentCol(0) As DataColumn + Dim childCol(0) As DataColumn + parentCol(0) = dsWIP.Tables(tblTMaterial).Columns("MaterialNo") + childCol(0) = dsWIP.Tables(tblTmpMTLLotNo).Columns("OrgMaterialNo") + '建立主從關係(RelationName會影響WinForm資料的顯示) + + Dim tmpRe1 As DataRelation + tmpRe1 = New DataRelation("MTLLotNo", parentCol, childCol, False) + dsWIP.Relations.Add(tmpRe1) + + iugMaterial.iMESUltraGrid.DataSource = dsWIP.Tables(tblTMaterial) + iugMaterial.iMESUltraGrid.Rows.ExpandAll(True) + End If + + '6.OP Description-------------------------------------------------------------------------------------------------- + If funGetOPDescription(LotNo) Then Exit Sub + + '多人加上 + If funMultiUser() < 0 Then Exit Sub + + '7.Initialize + Call funInitialize() + + '2019/09/06 Eric 取出系統參數GumMaterialType 哪些物料是屬於固晶膠類 + Dim strGumMaterialType As String = funLoadParameter("GumMaterialType") + blnGumMaterialType = (strGumMaterialType <> "") + aryGumMaterialType = If((strGumMaterialType <> ""), Split(strGumMaterialType, ","), {}) + + Call funLoadAllMaterialLot() + + '9.调用客制信息 + Call Me.funStuInfo() + + '8.語系切換 + Call ExeChangeResource(Me, gLanguageMode) + + + + txtEquipmentNo.Focus() + btnSWR.Visible = False + + '判斷系統參數EnableSWR_CICO 0:否 1:是 + Dim strEnableSWR_CICO As String = funLoadParameter("EnableSWR_CICO") + If strEnableSWR_CICO = "1" Then '系統參數EnableSWR_CICO為1才需要顯示特殊生產需求 + + '2019/02/12 Eric 無資料不顯示SWR視窗 + Call funLoadSWRJoinLog() + If dsWIP.Tables(tblSWRJoinLog).Rows.Count > 0 Then + + blnShowSWR = True + + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("MONo", txtMONo.Text) + Parameters.Add("CustomerLotNo", txtCustomerLotNo.Text) + Parameters.Add("OPNo", txtOPNo.Text) + Parameters.Add("LotNo", txtLotNo.Text) + Parameters.Add("DeviceNo", dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString) + Parameters.Add("CustomerNo", dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString) + Parameters.Add("LogGroupSerial", dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString) + Parameters.Add("blnCICo", True) + Me.ObjectFileHandler.Execute("WP_SWRBasisRead", Parameters) + + End If + + btnSWR.Visible = True + + End If + + ExeGroupControlPriv(Me, PrivFunNo) + Cursor.Current = Cursors.Default + + End Sub + + Private Sub frmBR_L_CI_GEN_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated + + txtEquipmentNo.Focus() + + End Sub + + Private Sub frmBR_L_CI_GEN_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing + + If Not dsWIP Is Nothing Then dsWIP.Dispose() + If Not dtKeyIn Is Nothing Then dtKeyIn.Dispose() + + '2019/12/17 OwenLiu, Mantis:0063698, 修正強制關閉企業邏輯,未正確執行ReverseTriggerOP的問題 + 'Call ExeReverseTriggerOP(UserId, LotNo, RevLotSerial, RevLotStamp) + '2020/3/17,Ning,不啟用Reverse時的ReverseTriggerOP + Call ExeReverseTriggerOP_NotUseUndo(UserId, LotNo, RevLotSerial, RevLotStamp) + End Sub + + +#Region "Button Events" + + Private Sub btnQCList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQCList.Click + + If Not dsWIP.Tables(tblAreaEquipment).Rows.Count > 0 Then + Exit Sub + End If + + 'Modify on 2008/03/31, By OwenLiu, + + '先取得Actve Row + Dim drSel() As DataRow + drSel = funGetActiveRows() + + If drSel Is Nothing Then Exit Sub + + '檢查設備是否可使用 + If drSel(0)("AllowExecute") <> 1 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203064", "[%Equipment%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '檢查是否有定義機台點檢表 + If drSel(0)("QCListNo") Is DBNull.Value Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%QCListNo%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '檢查是否有被勾選 + If Not drSel(0)("CheckFlag") Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%Please select%] [%Equipment%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '檢查是否已點檢完成 + If Not drSel(0)("QCFinish") Is DBNull.Value Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%Equipment%] [%FINISHED%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '自動開立點檢務單 + Call funCheckEQPQCTask(drSel(0)("EquipmentNo")) + + '開始處理設備點檢 + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Me.ObjectFileHandler.Execute(pObjectID:="WP_EQPCheckQCList", + pParameters:=Nothing, + pArgs:=New Object() { + drSel(0)("EquipmentNo"), LotNo, LotSerial, LogGroupSerial}) + + End Sub + + Private Sub btnConfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirm.Click + + Dim strResult As String + + Cursor.Current = Cursors.WaitCursor + + '1.基本檢查---------------------------------------------------------------------------------------------------------- + Dim drSel() As DataRow + Dim drSelAcc As DataRow() + If dsWIP.Tables(tblAreaEquipment).Rows.Count > 0 Then + drSel = dsWIP.Tables(tblAreaEquipment).Select("AllowExecute=1") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203064", "[%Equipment%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + Else + drSel = dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%Please select%] [%Equipment%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + Else + '檢查所有勾選的設備是否完成設備點檢 + For i As Integer = 0 To drSel.Length - 1 + '2021/3/17,Ning,87547: [6.0.5] 設備點檢支援可設定頻率_生產批進站設備點檢查核調整 + Call funCheckEQPQCList(drSel(i)("EquipmentNo"), strResult) + If strResult <> "success" Then + '有設備未完成點檢 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103011", "[%EQP QCList OnLine Check%]" & vbCrLf & strResult & vbCrLf & "[%has not been completed%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + Next + + '2013/12/25,Kevin,有顯示模治具才檢查 + If Not dsWIP.Tables("AccState") Is Nothing Then + '如有設定產品-作業站-模治具,則這些模治具都一定要被選 + If Not dsWIP.Tables("PRDAccessory") Is Nothing Then + If dsWIP.Tables("PRDAccessory").Rows.Count > 0 Then + Dim drAccState As DataRow() + Dim blnPRDAcc As Boolean = False '是否有產品設定的模治具 + Dim strAccessoryType As String = "" + Dim aryShowAccNo As New ArrayList + Dim aryShowAccType As New ArrayList + Dim blnAllowExecute As Boolean = True + Dim strDesc As String = "" + + For Each dr As DataRow In drSel + blnPRDAcc = False + strAccessoryType = "" + aryShowAccNo.Clear() + aryShowAccType.Clear() + blnAllowExecute = True + strDesc = "" + + drAccState = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "' And Select = True") + If drAccState.Length > 0 Then + '檢查設備是否都有掛產品指定之模治具,相同類別允許掛多個,但至少要有一個 + For Each drPRD As DataRow In dsWIP.Tables("PRDAccessory").Rows + + '檢查是否是同個模治具類別 + If strAccessoryType = drPRD("AccessoryType") Then + If blnPRDAcc Then + '如果已有產品設定的模治具則跳至下一筆 + GoTo lblAccCheck + End If + Else + '第一個物料類別不判斷blnPRDAcc + If strAccessoryType <> "" Then + '不同模治具類別時,如果上個模治具類別沒有符合的資料,則此設備不可用 + If blnPRDAcc = False Then + '只要有一種類別模治具不符合就是False + blnAllowExecute = False + End If + End If + + '記錄此次模治具類別 + strAccessoryType = drPRD("AccessoryType") + End If + + If drPRD("AccessoryNo") = "*" Then + '如果模治具編號為*代表只有指定模治具類別 + For Each drAcc As DataRow In drAccState + If drAcc("AccessoryType") = drPRD("AccessoryType") Then + '有符合的代表有掛指定的模治具類別 + blnPRDAcc = True + '移除此次加入的類別 + aryShowAccType.Remove(drPRD("AccessoryType")) + '有符合一筆即可 + GoTo lblAccCheck + Else + blnPRDAcc = False + If Not aryShowAccType.Contains(drPRD("AccessoryType")) Then + aryShowAccType.Add(drPRD("AccessoryType")) + End If + End If + Next + Else + '如果模治具編號不為*代表有指定模治具 + For Each drAcc As DataRow In drAccState + If drAcc("AccessoryType") = drPRD("AccessoryType") AndAlso drAcc("AccessoryNo") = drPRD("AccessoryNo") Then + '有符合的代表有掛指定的模治具類別 + blnPRDAcc = True + '移除此次加入的編號 + aryShowAccNo.Remove(drPRD("AccessoryNo")) + '有符合一筆即可 + Exit For + Else + blnPRDAcc = False + If Not aryShowAccNo.Contains(drPRD("AccessoryNo")) Then + aryShowAccNo.Add(drPRD("AccessoryNo")) + End If + End If + Next + End If +lblAccCheck: + Next + + '多判斷一次最後一個類別 + If blnPRDAcc = False Then + '只要有一種類別模治具不符合就是False + blnAllowExecute = False + End If + + If blnAllowExecute = False Then + If aryShowAccType.Count > 0 Then + strDesc += vbCrLf & "[%AccessoryType%]:" + For k As Integer = 0 To aryShowAccType.Count - 1 + strDesc += aryShowAccType(k) & "," + Next + strDesc = strDesc.TrimEnd(",") + End If + If aryShowAccNo.Count > 0 Then + strDesc += vbCrLf & "[%AccessoryNo%]:" + For k As Integer = 0 To aryShowAccNo.Count - 1 + strDesc += aryShowAccNo(k) & "," + Next + strDesc = strDesc.TrimEnd(",") + End If + + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%EquipmentNo%]:" & dr("EquipmentNo") & "[%ISNOTSELECTED%][%Product%][%Setup%][%Accessory%]" & strDesc), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + Else + '設備沒掛模治具就一定沒有掛設定的必需模治具 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%EquipmentNo%]:" & dr("EquipmentNo") & "[%ISNOTSELECTED%][%Accessory%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + Next + End If + End If + End If + End If + End If + End If + + If funGetSysParameter("CIMTLDBCheck") = "1" Then + If dsWIP.Tables(tblTMaterial).Rows.Count > 0 Then + If Not funCheckMTL() Then GoTo lblExitProcedure + End If + End If + + '2023/06/07 ,0135702: [6.0.7] SDD220425_01-03_進站設備派工查核調整,19245 + Try + Dim strEQP As String = "" + For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + strEQP += dr("EquipmentNo").ToString() & "," + Next + If (strEQP <> "") Then + strEQP = strEQP.TrimEnd(",") + Else + strEQP = defString + End If + Call ChkCIEQPDispatch(strEQP, txtLotNo.Text) + + Dim showMSG As String = "" + Dim arrayMsg As New ArrayList + If Not IsNothing(dsEQP) Then + For i = 0 To dsEQP.Tables.Count - 1 + If dsEQP.Tables(i).Rows.Count > 0 Then + For Each drEQP As DataRow In dsEQP.Tables(i).Rows + If drEQP("Result").ToString <> "Success" Then + arrayMsg.Add(ChgTranslateName_Content(drEQP("Description").ToString)) + End If + Next + End If + Next + If arrayMsg.Count > 0 Then + If funGetSysParameter("LotEQPDispatchLimit") = "1" Then '進站是否卡控生產批派工 參數為1 + '是否確定執行? + For i As Integer = 0 To arrayMsg.Count - 1 + showMSG += arrayMsg(i).ToString() & vbCrLf + Next + If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100004", showMSG), MsgBoxStyle.OkCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, Me.Text) = MsgBoxResult.Cancel Then + GoTo lblExitProcedure + End If + Else + '進站失敗,失敗原因:不滿足規則xx + showMSG = ChgTranslateName_Content("[%CHECK IN FAILED%], [%REASONS FOR FAILURE%]: [%Failure to meet rules%] " & vbCrLf) + For i As Integer = 0 To arrayMsg.Count - 1 + showMSG += arrayMsg(i).ToString() & vbCrLf + Next + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Content(showMSG), MsgBoxStyle.Critical, Me.Text) + GoTo lblExitProcedure + End If + End If + End If + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + End Try + + + '2020/02/26 Grace Mantis 67753 取得此批號於此作業站上的派工資料 + Call funLoadWIPEQPDispatchState(LotNo:=LotNo, OPNo:=txtOPNo.Text) + + If Not IsNothing(dsTemp.Tables(tblEQPDispatchState)) Then + If dsTemp.Tables(tblEQPDispatchState).Rows.Count > 0 Then + Dim aryMsg As New ArrayList + Dim strCheckInDate As String = Now.ToString("yyyy/MM/dd") 'Check In 日期 + If chkUpdCheckInTime.Checked Then strCheckInDate = dtpcheckintime.Value.ToString("yyyy/MM/dd") + + '2020/03/02 Grace Mantis 67753, 68192 檢查所選擇的設備是否有相符的派工資料 + For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + + '1. 檢查是否有派工設備 + Dim drSelEQP As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & dr("EquipmentNo").ToString() & "'") + If drSelEQP.Count > 0 Then + '1-2. 有派工設備, 檢查派工設備的派工日期是否符合 + Dim iCount As Integer = 0 + Dim strDisDate As String = "" + For Each dr2 As DataRow In dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & dr("EquipmentNo").ToString() & "'", "DispatchOrder") + If Convert.ToDateTime(dr2("DispatchDate")).ToString("yyyy/MM/dd") = strCheckInDate Then + iCount += 1 + Exit For + Else + If strDisDate = "" Then strDisDate = Convert.ToDateTime(dr2("DispatchDate")).ToString("yyyy/MM/dd") + End If + Next + + If iCount > 0 Then + '1-2-1. 派工日期符合, 不顯示訊息 + Else + '1-2-2. 派工日期不符合, 顯示訊息 + '選擇的設備於[checkin日期]未派工, 設定的派工日期為[DispatchDate] + aryMsg.Add(ChgTranslateName_Content("[%EQUIPMENTNO%]:" & dr("EquipmentNo").ToString() & ", [%SelectedEQPAt%]" & strCheckInDate & "[%NoDispatch%], [%ActualDispatchDate%]" & strDisDate)) + End If + '2020/11/05 Mantis:0081316:納標調整,派工順序卡控 + If dr("DispatchOrder").ToString <> "1" Then + aryMsg.Add(ChgTranslateName_Content("[%EQUIPMENTNO%]:" & dr("EquipmentNo").ToString() & ", [%DispatchOrder is not top priority%]")) + 'MsgBox(ChgTranslateName_Msg("0000-103010", "[%EquipmentNo%]:" & dr("EquipmentNo") & "[%DispatchOrder is not top priority%]"), MsgBoxStyle.Exclamation, Me.Text) + 'GoTo lblExitProcedure + End If + Else + '1-3. 沒有派工設備, 檢查是否有符合的派工日期 + Dim iCount As Integer = 0 + Dim strEQPNo As String = "" + For Each dr4 As DataRow In dsTemp.Tables(tblEQPDispatchState).Rows + If Convert.ToDateTime(dr4("DispatchDate")).ToString("yyyy/MM/dd") = strCheckInDate Then + '若派工日期相符的設備資料並未勾選, 才顯示訊息 + If dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True & " And EquipmentNo = '" & dr4("EquipmentNo") & "'").Count = 0 Then + iCount += 1 + strEQPNo = dr4("EquipmentNo") + Exit For + End If + End If + Next + + If iCount > 0 Then + '1-3-1. 派工日期符合, 顯示訊息 + '選擇的設備與派工設備不同 + aryMsg.Add(ChgTranslateName_Content("[%EQUIPMENTNO%]:" & dr("EquipmentNo").ToString() & ", " & "[%SelectedEQPDispatchNotMatch%]!" & vbCrLf & "[%EQPDispatch%]:" & strEQPNo)) + Else + '1-3-2. 派工日期不符合, 顯示訊息 + '生產批號於作業站上無任何派工資料 + aryMsg.Add(ChgTranslateName_Content("[%EQUIPMENTNO%]:" & dr("EquipmentNo").ToString() & ", [%AT%][%OP%]: " & txtOPNo.Text & " [%NoDispatchData%]")) + End If + End If + Next + + '若有錯誤訊息, 一次顯示 + If aryMsg.Count > 0 Then + Dim strMsgMix As String = "" + For i As Integer = 0 To aryMsg.Count - 1 + strMsgMix += aryMsg(i).ToString() & vbCrLf & vbCrLf + Next + If strMsgMix.Length > 0 Then + strMsgMix = strMsgMix & ChgTranslateName_Content("[%Sure2Confirm%]?") '是否確定執行? + + If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100004", strMsgMix), MsgBoxStyle.OkCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, Me.Text) = MsgBoxResult.Cancel Then + GoTo lblExitProcedure + End If + End If + End If + Else + '2020/05/08 Eric 註解派工提示訊息 + ''是否確定 / 生產批號(" & LotNo & ") 於作業站(" & txtOPNo.Text & ") 上無任何派工資料, 是否確定執行? + 'If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100004", "[%LOTNO%](" & LotNo & ") [%AT%][%OP%](" & txtOPNo.Text & ") [%NoDispatchData%], [%Sure2Confirm%]?"), MsgBoxStyle.OkCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, Me.Text) = MsgBoxResult.Cancel Then + ' GoTo lblExitProcedure + 'End If + End If + Else + '2020/05/08 Eric 註解派工提示訊息 + ''是否確定 / 生產批號(" & LotNo & ") 於作業站(" & txtOPNo.Text & ") 上無任何派工資料, 是否確定執行? + 'If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100004", "[%LOTNO%](" & LotNo & ") [%AT%][%OP%](" & txtOPNo.Text & ") [%NoDispatchData%], [%Sure2Confirm%]?"), MsgBoxStyle.OkCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, Me.Text) = MsgBoxResult.Cancel Then + ' GoTo lblExitProcedure + 'End If + End If + + Dim strMTLLot As String = "" + For Each dr As DataRow In dsWIP.Tables(tblTmpMTLLotNo).Rows + strMTLLot += CombineXMLValueTag(CombineXMLValue("materialno", dr("MaterialNo")) & + CombineXMLValue("materiallotno", dr("MaterialLotNo"))) + Next + + '2.格式化資料Attrib----------------------------------------------------------------------------------------------- + Dim strAttrib As String = "" + Dim strTemp As String + + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "(AttribPhase = " & PhaseNo & " or AttribPhase = 99) And AttribSource <> 0" 'CurPhase & All的所有Attrib,除了KeyIn + For i As Integer = 0 To dsWIP.Tables(tblTAttrib).DefaultView.Count - 1 + strTemp = CombineXMLValue("attribno", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribNo"))) & + CombineXMLValue("attribtype", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribType")) & + CombineXMLValue("attribsequence", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribSequence")) & + CombineXMLValue("attribsource", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribSource")) & + CombineXMLValue("attribphase", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribPhase")) & + CombineXMLValue("savetolotpropertyno", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("SaveToLotPropertyNo"))) + If IsDBNull(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribValue")) Then + strTemp += CombineXMLValue("attribvalue", "") + Else + strTemp += CombineXMLValue("attribvalue", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribValue"))) + End If + strAttrib += CombineXMLValueTag(strTemp) + Next + '還原顯示 + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "AttribSource <> 0 And AttribSource <> 1 And (AttribPhase = " & PhaseNo & " or AttribPhase = 99)" 'Source = Not KeyIn, Not Calculate ,CurPhase and All + + 'Temp:Attrib_KeyIn + For i As Integer = 0 To dtKeyIn.Rows.Count - 1 + If IsDBNull(dtKeyIn.Rows(i)("AttribValue")) = True Then + dtKeyIn.Rows(i)("AttribValue") = "" + End If + + ''edit by Zoe,2009/03/17:增加DBNull及Trim的比對 + ''If dtKeyIn.Rows(i)("AttribValue") = "" Then + 'R1102001 改由ChkControlRule時才判斷 By Acer 2011/02/21 + 'If IsDBNull(dtKeyIn.Rows(i)("AttribValue")) OrElse Trim(dtKeyIn.Rows(i)("AttribValue")) = "" OrElse dtKeyIn.Rows(i)("AttribValue") = "" Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%AttribValue%] of [%AttribNo%]:" & dtKeyIn.Rows(i)("AttribNo") & " is empty!!"), MsgBoxStyle.Exclamation, Me.Text) + ' GoTo lblExitProcedure + 'End If + + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo='" & dtKeyIn.Rows(i)("AttribNo") & "'") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203010", "[%AttribNo%]:" & dtKeyIn.Rows(i)("AttribNo")), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + Else + strTemp = CombineXMLValue("attribno", CInput(dtKeyIn.Rows(i)("AttribNo"))) & + CombineXMLValue("attribtype", drSel(0)("AttribType")) & + CombineXMLValue("attribsequence", drSel(0)("AttribSequence")) & + CombineXMLValue("attribsource", drSel(0)("AttribSource")) & + CombineXMLValue("attribphase", drSel(0)("AttribPhase")) & + CombineXMLValue("attribvalue", CInput(dtKeyIn.Rows(i)("AttribValue"))) & + CombineXMLValue("savetolotpropertyno", CInput(drSel(0)("SaveToLotPropertyNo"))) + '2015-12-18, Joe, Add QCItemNo + If IsDBNull(drSel(0)("QCItemNo")) Then + strTemp += CombineXMLValue("qcitemno", "") + Else + strTemp += CombineXMLValue("qcitemno", CInput(drSel(0)("QCItemNo"))) + End If + strAttrib += CombineXMLValueTag(strTemp) + End If + Next + End If + + 'CheckLXL + Dim strStuInfo As String + drSel = dsWIP.Tables(tblStuInfo).Select("CheckFlag=" & True) + If drSel IsNot Nothing AndAlso drSel.Length = 0 Then + ' 数组为空,执行适当的报错或处理逻辑 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "客制信息没有被选择!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + Else + ' 数组不为空,执行其他操作 + For i As Integer = 0 To drSel.Length - 1 + strStuInfo += CombineXMLValueTag(CombineXMLValue("studentno", CInput(drSel(i)("StudentNo"))) & + CombineXMLValue("checkflag", drSel(i)("CheckFlag"))) + Next + End If + + '3.格式化資料Equipment----------------------------------------------------------------------------------------------- + Dim strEquipment As String = "" + + '只有一筆 + + drSel = dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + If dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString = "1" AndAlso drSel.Length > 1 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%MATERIALOPTIONISEQP%], [%Only Support One Equipment To Select%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + + 'Modify On 2007/11/30 By OwenLiu, 修正 Equipment 多選後, 仍然只執行第一個設備的Bug + For i As Integer = 0 To drSel.Length - 1 + If IsDBNull(drSel(i)("LoadPort")) Then + strEquipment += CombineXMLValueTag(CombineXMLValue("equipmentno", CInput(drSel(i)("EquipmentNo")))) + If Not ChkWIPEQPConsume(LotNo, CInt(Me.txtCurQty.Text), UserId, drSel(i)("EquipmentNo").ToString) Then GoTo lblExitProcedure + Else + If drSel(i)("LoadPort") = -1 Then '代表不選Port. + strEquipment += CombineXMLValueTag(CombineXMLValue("equipmentno", CInput(drSel(i)("EquipmentNo")))) + If Not ChkWIPEQPConsume(LotNo, CInt(Me.txtCurQty.Text), UserId, drSel(i)("EquipmentNo").ToString) Then GoTo lblExitProcedure + Else + strEquipment += CombineXMLValueTag( + CombineXMLValue("equipmentno", CInput(drSel(i)("EquipmentNo"))) & + CombineXMLValue("loadport", drSel(i)("LoadPort"))) + If Not ChkWIPEQPConsume(LotNo, CInt(Me.txtCurQty.Text), UserId, drSel(i)("EquipmentNo").ToString) Then GoTo lblExitProcedure + End If + End If + Next + + '子設備資料 + Dim strEquipmentChamber = String.Empty + If Not dsWIP.Tables("Chamber") Is Nothing Then + drSel = dsWIP.Tables("Chamber").Select("SELECT1 = True") + For Each dr As DataRow In drSel + strEquipmentChamber += CombineXMLValueTag( + CombineXMLValue("equipmentno", CInput(dr("EquipmentNo"))) & + CombineXMLValue("belongequipmentno", dr("BelongEquipmentNo"))) + Next + End If + '格式化資料Accessory + Dim strAccessory As String = "" + If Not dsWIP.Tables("AccState") Is Nothing Then + drSel = dsWIP.Tables("AccState").Select("Select=" & True) + If drSel.Length > 0 Then + For Each drAcc As DataRow In drSel + strAccessory += CombineXMLValueTag( + CombineXMLValue("equipmentno", CInput(drAcc("EquipmentNo"))) & + CombineXMLValue("accessoryno", CInput(drAcc("AccessoryNo"))) & + CombineXMLValue("accessoryversion", CInput(drAcc("AccessoryVersion"))) & + CombineXMLValue("accessorytype", CInput(drAcc("AccessoryType"))) & + CombineXMLValue("accumulateqty", drAcc("AccumulateQty"))) + Next + End If + End If + + ' 2016/12/27 YF, 取消舊制多人加工 + '3.多人加工----------------------------------------------------------------------------------------------- + 'Dim strLoginState As String = "" + + 'For Each drTmp As DataRow In dtTmpLoginState.Rows + ' 'Kevin,2012/12/18,不取client端的時間作CI時間 + ' If drTmp("CheckInTime").ToString = "" Then + ' drTmp("CheckInTime") = defDateTime + ' End If + ' strLoginState += CombineXMLValueTag( + ' CombineXMLValue("userno", CInput(drTmp("UserNo"))) & + ' CombineXMLValue("username", CInput(drTmp("UserName"))) & + ' CombineXMLValue("checkintime", Format(drTmp("CheckInTime"), "yyyy/MM/dd HH:mm:ss"))) + 'Next + + '4.檢查是否允許執行----------------------------------------------------------------------------------------------- + If ChkLotStamp(LotNo, UserId, dsWIP.Tables(tblLotState).Rows(0)("LotStamp")) < 0 Then GoTo lblExitProcedure + + '5.Control Rule Check -------------------------------------------------------------------------------------------- + Dim strLinkName, strMSG As String + Dim strMailGroupNo As String = "" + Dim strRuleNo As String = defString + Dim intERFType As Integer = defInteger + Dim dsTestValue As DataSet + Dim strERFMsg As String + + If ChkControlRule(LotNo, UserId, dsWIP.Tables(tblLotState).Rows(0)("LotStamp"), + strAttrib, strLinkName, strMSG, strRuleNo, intERFType, strMailGroupNo, , , , dsTestValue) < 0 Then GoTo lblExitProcedure + + '2015-12-17, Joe, Check SPC Contorl + If funChkSPCControl_Var(LotNo, strAttrib, dsTestValue, strLinkName, intERFType, strERFMsg) < 0 Then GoTo lblExitProcedure + strERFMsg = ChgTranslateErrorMsg(strERFMsg) + + '若是Hold詢問是否繼續 + If strLinkName = "HOLD" Then + If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100103", "[%Lot%]"), MsgBoxStyle.DefaultButton2 + MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Hold Inquire") = MsgBoxResult.No Then + GoTo lblExitProcedure + End If + End If + + '6.ExecuteCheckIn ------------------------------------------------------------------------------------------------ + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("linkname", "LinkName", "String", CInput(strLinkName), "") + strParameter += CombineXMLParameter("lotstamp", "LotStamp", "Long", dsWIP.Tables(tblLotState).Rows(0)("LotStamp"), "") + strParameter += CombineXMLParameter("shiftno", "ShiftNo", "String", CInput(txtShiftNo.Text), "") + strParameter += CombineXMLParameter("lotrecord", "LotRecord", "String", CInput(txtLotRecord.Text), "") + 'strParameter += CombineXMLParameter("checkintime", "CheckInTime", "String", dtpcheckintime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") '2017/11/06 mark by KunYuan:移至下方處理 + strParameter += CombineXMLParameterMultiValue("attrib", "Attrib", "String", strAttrib, "") + strParameter += CombineXMLParameterMultiValue("equipment", "Equipment", "String", strEquipment, "") + strParameter += CombineXMLParameterMultiValue("equipmentchamber", "EquipmentChamber", "String", strEquipmentChamber, "") + strParameter += CombineXMLParameter("ruleno", "RuleNo", "String", CInput(strRuleNo), "") 'Added by Jialing 2011/02/18 + 'strParameter += CombineXMLParameterMultiValue("loginstate", "LoginState", "String", strLoginState, "") ' 2016/12/27 YF, 取消舊制多人加工 + 'CHECKLXL + strParameter += CombineXMLParameterMultiValue("studentinfo", "StudentInfo", "String", strStuInfo, "") + + '2017/11/06 KunYuan:當有勾選『變更開始加工時間』,再傳入CheckInTime + If chkUpdCheckInTime.Checked Then + strParameter += CombineXMLParameter("checkintime", "CheckInTime", "String", dtpcheckintime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") + End If + + '2013/12/25,Kevin,模治具資料有顯示才傳 + If blnGetAccessory Then + strParameter += CombineXMLParameterMultiValue("accessory", "Accessory", "String", strAccessory, "") + End If + '2019/09/06 Eric + If strMTLLot <> "" Then + strParameter += CombineXMLParameterMultiValue("temp_materiallot", "Temp_MaterialLot", "String", strMTLLot, "") + End If + + + + InXml = CombineXMLRequest(strIdentity, strParameter) + Try + '2019/06/20 Lena, Mantis: 0058845 [WIP] CI/CO執行時間紀錄 + '新增參數 LogOn = True, 記錄執行時間. + 'CheckLXL + OutXml = InvokeSrv("ABC.wsWIP_21685.Exe_CheckIn", InXml, LogOn:=True) + + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then '找出Exception訊並顯示出來 + '成功執行完成,避免再按下一次 + btnConfirm.Enabled = False + + '2017/11/06 KunYuan:變更開始加工時間checkbox預設不勾選 + chkUpdCheckInTime.Checked = False + + If strLinkName <> "HOLD" And strLinkName <> "WAIT" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-000001", "[%LotNo%]:" & LotNo & " [%Check In%] [%Successfully%]"), MsgBoxStyle.Information, Me.Text) + End If + Else + If GetExceptionCode(XmlDoc) = "IPQCNO" Then + 'ExceptionManager.iMESShowDialog("0000-103021", GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", GetExceptionSysMsg(XmlDoc)), MsgBoxStyle.Information, Me.Text) + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("defLotNo", LotNo) + Me.ObjectFileHandler.Execute("SC_IPQCForm", Parameters) + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + GoTo lblExitProcedure + End If + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + GoTo lblExitProcedure + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + GoTo lblExitProcedure + Finally + End Try + + Me.Close() + + '7.Mail------------------------------------------------------------------------------------------------------------- + '以下的執行,不管成功失敗,都讓FormClose,代表此BR已完成 + + '2016-12-19 add 取得eSOP參數 + Execute_eSOP = funGetSysParameter("Execute_eSOP") + If Execute_eSOP = 1 Then + '讀取eSOP工位及檔案及頁碼 + Call funLoadPRDeSOP() + '顯示作業指導書 + Call funDisplayProcess() + End If + If Execute_eSOP = 2 Then + '組JSON + Dim DataString, ResponsetJson As String + Dim strProductNo, strProductVersion As String + Try + strProductNo = txtProductNo.Text + strProductVersion = dsWIP.Tables(tblLotState).Rows(0)("ProductVersion").ToString + Dim dic As New Dictionary(Of String, String) + dic("userid") = gUserNo + dic("languagemode") = gLanguageMode + dic("computername") = gComputerName + Dim Uri = Newtonsoft.Json.JsonConvert.SerializeObject(dic) + + dic = New Dictionary(Of String, String) + dic("produc_no") = strProductNo + dic("product_ver") = strProductVersion + dic("op_no") = txtOPNo.Text + Dim list As New List(Of String) + Dim rows As DataRow() = dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + If rows.Length > 0 Then + For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + list.Add(dr("EQUIPMENTTYPE")) + Next + dic("eqp_type") = String.Join(""",""", list) + Else + dic("eqp_type") = Nothing + End If + + Dim Content = Newtonsoft.Json.JsonConvert.SerializeObject(dic) + + '呼叫EAI GeteSOPInfo_API + Using wsEAI As New wsEAI.wsEAI + ResponsetJson = wsEAI.GeteSOPInfo_API(Uri, Content) + End Using + + '呼叫WP_eSOPList.dll + Dim Obj As Newtonsoft.Json.Linq.JObject = Newtonsoft.Json.JsonConvert.DeserializeObject(ResponsetJson) + Dim dtResponsetJson As DataTable = JsonConvert.DeserializeObject(Of DataTable)(Obj.Item("ResultJson").ToString) + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("dteSOP", dtResponsetJson) + Me.ObjectFileHandler.Execute("WP_eSOPList", Parameters) + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + End Try + End If + + If strMailGroupNo <> "" Then + Call SendEmailToERFGroup_NoneERF(LotNo, UserId, strMailGroupNo, strMSG, + dsWIP.Tables(tblLotState).Rows(0)("OPNo"), dsWIP.Tables(tblLotState).Rows(0)("OPName"), dsWIP.Tables(tblLotState).Rows(0)("BRNo")) + End If + + + + 'C3:依LinkName決定是否Transfer Lot---------------------------------------------------------------------------------- + '以下的執行,不管成功失敗,都讓FormClose,代表此BR已完成 + '若再執行Confirm一次則不正確,同一BR會執行多次 + '2015-12-21, Joe, 加ERFMsg + Call BRTransferLot(LotNo, UserId, strLinkName, intERFType, strRuleNo, , strERFMsg) + + + gReturnKeyValue = LotNo + + +lblExitProcedure: + + Cursor.Current = Cursors.Default + Exit Sub + + End Sub + + Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click + + Cursor.Current = Cursors.WaitCursor + + Try + '2019/12/17 OwenLiu, Mantis:0063698, ReverseTriggerOP統一呼叫 WIP_Kit共用函式 + 'Call ExeReverseTriggerOP(UserId, LotNo, RevLotSerial, RevLotStamp) + + '2020/3/17,Ning,不啟用Reverse時的ReverseTriggerOP + '2022/9/19,Ning, 116091: 各BR 在畫面關閉動作執行ReverseTriggerOP,若有執行失敗須把訊息顯示:統一在form_closing時處理 + 'Call ExeReverseTriggerOP_NotUseUndo(UserId, LotNo, RevLotSerial, RevLotStamp) + + Catch e1 As Exception + Finally + Me.Close() + End Try + + Cursor.Current = Cursors.Default + + + End Sub + + Private Sub btnEQPConsumeReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEQPConsumeReset.Click + + Try + + If Me.iugEquipment.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Me.ObjectFileHandler.Execute(pObjectID:="WP_EQPConsumeReset", + pParameters:=Nothing, + pArgs:=New Object() { + Me.iugEquipment.iMESUltraGrid.ActiveRow.Cells("EquipmentNo").Value.ToString}) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + Private Sub btnMultiUser_Click(sender As System.Object, e As System.EventArgs) Handles btnMultiUser.Click + + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Dim parameters As New Dictionary(Of String, Object) + parameters.Add("ypCallTe", 1) + parameters.Add("UserID", UserId) + parameters.Add("CheckInTime", dtpcheckintime.Value) + parameters.Add("drLotInfo", dsWIP.Tables(tblLotState).Rows(0)) + parameters.Add("dtTmpLoginState", dtTmpLoginState) + '2019/10/17 Grace 調整ObjectID + Me.ObjectFileHandler.Execute("WP_OperatorLogIn_Lot", parameters) + + dtTmpLoginState = parameters("dtTmpLoginState") + + End Sub + + +#End Region + + Protected Overrides Sub Finalize() + MyBase.Finalize() + End Sub + +#Region "Control Enter,KeyPress" + + Private Sub txtLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLotNo.Enter + txtLotNo.SelectAll() + End Sub + Private Sub txtLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtLotNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtPriority_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPriority.Enter + txtPriority.SelectAll() + End Sub + Private Sub txtPriority_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtPriority.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtAreaNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtAreaNo.Enter + txtAreaNo.SelectAll() + End Sub + Private Sub txtAreaNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtAreaNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCurQty_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCurQty.Enter + txtCurQty.SelectAll() + End Sub + Private Sub txtCurQty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCurQty.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCurUnitNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCurUnitNo.Enter + txtCurUnitNo.SelectAll() + End Sub + Private Sub txtCurUnitNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCurUnitNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtSysQty_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSysQty.Enter + txtSysQty.SelectAll() + End Sub + Private Sub txtSysQty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSysQty.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtSysUnitNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSysUnitNo.Enter + txtSysUnitNo.SelectAll() + End Sub + Private Sub txtSysUnitNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSysUnitNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtOPNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOPNo.Enter + txtOPNo.SelectAll() + End Sub + Private Sub txtOPNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtOPNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtOPDescription_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOPDescription.Enter + txtOPDescription.SelectAll() + End Sub + Private Sub txtOPDescription_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtOPDescription.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCustomerLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCustomerLotNo.Enter + txtCustomerLotNo.SelectAll() + End Sub + Private Sub txtCustomerLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCustomerLotNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtMONo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMONo.Enter + txtMONo.SelectAll() + End Sub + Private Sub txtMONo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMONo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtEmployeeNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEmployeeNo.Enter + txtEmployeeNo.SelectAll() + End Sub + Private Sub txtEmployeeNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtEmployeeNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtShiftNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtShiftNo.Enter + txtShiftNo.SelectAll() + End Sub + Private Sub txtShiftNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtShiftNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtLotRecord_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLotRecord.Enter + txtLotRecord.SelectAll() + End Sub + + Private Sub txtProductNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtProductNo.Enter + txtProductNo.SelectAll() + End Sub + Private Sub txtProductNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtProductNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtMaterialLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMaterialLotNo.Enter, UltraTextEditor2.Enter + txtMaterialLotNo.SelectAll() + End Sub + + Private Sub txtMaterialLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMaterialLotNo.KeyPress, UltraTextEditor2.KeyPress + + Try + If (e.KeyChar = Convert.ToChar(13)) Then + funKeyInMaterialLotNo(txtMaterialNo.Text, txtMaterialLotNo.Text) + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + Private Sub funKeyInMaterialLotNo(ByVal MaterialNo As String, ByVal MaterialLotNo As String) + + Try + '2020/10/29 Grace 請先輸入物料編號 + If MaterialNo = "" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-200005", "[%MaterialNo%]!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + MaterialLotNo = UCase(MaterialLotNo.Trim) + If MaterialLotNo = "" Then Exit Sub + + If dsWIP.Tables(tblTMaterial).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-103019", "[%Do not need to check%]!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '相同料批只能加入某一個料,以避免上料錯誤 + '2020/10/29 Grace 依物料編號取得料批 + Dim drCheckMTLLotNo() As DataRow = dsWIP.Tables(tblTmpMTLLotNo).Select( + "MaterialLotNo ='" & MaterialLotNo & "' And MaterialNo ='" & MaterialNo & "'") + + If drCheckMTLLotNo.Length > 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-200004", "[%MaterialLotNo%]:" & MaterialLotNo), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + ' 2016/10/19 YF, 依作業站用料選項取出資料 + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + Case "0" + ' 發料點(線邊倉或工單) + If (Not CheckMaterialByPutinPlace(dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString, MaterialLotNo, MaterialNo)) Then + Exit Sub + End If + + Case "1" + ' 設備 + 'If (Not CheckMaterialByEquipment(MaterialLotNo, MaterialNo)) Then + ' Exit Sub + 'End If + + 'Case "2" + ' 生產線, 待組裝版再實作 + + 'Case "3" + ' 工位, 待組裝版再實作 + + Case Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-003000", "[%MaterialOption%]:" & dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString & + " [%NOT DEFINE%]!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End Select + + Catch ex As Exception + Throw ex + + Finally + txtMaterialLotNo.Text = "" + txtMaterialNo.Text = "" + txtMaterialNo.Focus() + End Try + + End Sub + + Private Sub txtMaterialLotNo_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMaterialLotNo.Leave, UltraTextEditor2.Leave + txtMaterialLotNo.Text = UCase(txtMaterialLotNo.Text) + End Sub + +#End Region + +#Region "Ultra Grid" + + Private Sub iugAttrib_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugAttrib.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblTAttrib).Columns.Count - 1 + Select Case dsWIP.Tables(tblTAttrib).Columns(i).ColumnName.ToUpper + Case "ATTRIBNO" + With .Bands(tblTAttrib).Columns("AttribNo") + .Header.Caption = "AttribNo" + .Width = 70 + .Header.VisiblePosition = 1 + End With + Case "ATTRIBNAME" + With .Bands(tblTAttrib).Columns("AttribName") + .Header.Caption = "AttribName" + .Width = 95 + .Header.VisiblePosition = 2 + End With + Case "ATTRIBVALUE" + With .Bands(tblTAttrib).Columns("AttribValue") + .Header.Caption = "AttribValue" + .Width = 80 + .Header.VisiblePosition = 3 + End With + Case "ATTRIBSOURCE" + With .Bands(tblTAttrib).Columns("AttribSource") + .Header.Caption = "AttribSource" + .Width = 65 + .Header.VisiblePosition = 4 + .ValueList = iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists("ASource") + End With + Case Else + With .Bands(tblTAttrib).Columns(dsWIP.Tables(tblTAttrib).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + End With + + End Sub + + Private Sub iugAttrib_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugAttrib.iMESUltraGrid_InitializeRow + + Dim strAttribValue As String + strAttribValue = e.Row.Cells("AttribValue").Value.ToString.Trim + + '\\Server\01A.pdf + If Mid(strAttribValue, 1, 2) = "\\" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + + '\\HTTP + If Mid(strAttribValue.ToUpper, 1, 4) = "HTTP" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + '\\HTTPS + If Mid(strAttribValue.ToUpper, 1, 5) = "HTTPS" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + + End Sub + + Private Sub iugAttrib_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugAttrib.iMESUltraGrid_ClickCellButton + + Cursor.Current = Cursors.WaitCursor + + Dim strFilePath As String + + strFilePath = e.Cell.Row.Cells("AttribValue").Value.ToString.Trim + + If strFilePath = "" Then Exit Sub + + Try + Dim objProcess As New Process + objProcess.Start(strFilePath) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugMaterial.iMESUltraGrid_InitializeLayOut, IMESUltraGridControl1.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblTMaterial).Columns.Count - 1 + With .Bands(tblTMaterial).Columns(i) + .Hidden = True + .Header.VisiblePosition = 99 + End With + Next + With .Bands(tblTMaterial).Columns("MaterialLevelShow") + .Header.Caption = "MaterialLevelShow" + .Hidden = False + .CalculateAutoResizeWidth(PerformAutoSizeType.VisibleRows, True) + .Header.VisiblePosition = 0 + .ValueList = vlMaterialLevel + End With + With .Bands(tblTMaterial).Columns("MaterialType") + .Header.Caption = "MaterialType" + .Width = 30 + .Hidden = False + .Header.VisiblePosition = 1 + End With + With .Bands(tblTMaterial).Columns("MaterialNo") + .Header.Caption = "MaterialNo" + .Width = 100 + .Hidden = False + .Header.VisiblePosition = 2 + End With + With .Bands(tblTMaterial).Columns("StdUseQty") + .Header.Caption = "StdUseQty" + .Width = 70 + .Hidden = False + .Header.VisiblePosition = 3 + .Format = "0.########" + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + End With + With .Bands(tblTMaterial).Columns("UnitNo") + .Header.Caption = "UnitNo" + .Width = 70 + .Hidden = False + .Header.VisiblePosition = 4 + End With + With .Bands(tblTMaterial).Columns("MTLLotNoSearch") + .Header.Caption = "" + .Width = 40 + .Hidden = blnByEQP + .Header.VisiblePosition = 5 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Center + '20231106,13871,0148577: Online Help優化建議 + .Tag = New COM_Kit.TagInformation.clsGridColumnTag() With {.UseOnlineHelp = False} + .Style = ColumnStyle.Button + .CellAppearance.BackColor = System.Drawing.Color.Pink + .CellButtonAppearance.BackColor = Color.Pink + .CellButtonAppearance.BorderColor3DBase = Color.Pink + .CellButtonAppearance.BackGradientStyle = GradientStyle.Rectangular + End With + + With .Bands("MTLLotNo").Columns("EquipmentNo") + If blnByEQP = True Then + .Hidden = False + .Width = 40 + Else + .Hidden = True + End If + End With + With .Bands("MTLLotNo").Columns("OrgMaterialNo") + .Hidden = True + End With + With .Bands("MTLLotNo").Columns("MaterialNo") + .Hidden = True + End With + With .Bands("MTLLotNo").Columns("SUBSTITUTEMATERIALNO") + .Hidden = False + End With + With .Bands("MTLLotNo").Columns("MaterialLotNo") + .Hidden = False + End With + With .Bands("MTLLotNo").Columns("Qty") + .Hidden = False + .Format = "0.########" + .Width = 50 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + End With + End With + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugMaterial.iMESUltraGrid_InitializeRow, IMESUltraGridControl1.iMESUltraGrid_InitializeRow + + If e.Row.Band.Key = tblTMaterial Then + e.Row.Cells("MaterialLevelShow").Appearance.BackColor = System.Drawing.Color.Pink + e.Row.Cells("MaterialType").Appearance.BackColor = System.Drawing.Color.Pink + e.Row.Cells("MaterialNo").Appearance.BackColor = System.Drawing.Color.Pink + e.Row.Cells("StdUseQty").Appearance.BackColor = System.Drawing.Color.Pink + e.Row.Cells("UnitNo").Appearance.BackColor = System.Drawing.Color.Pink + + 'e.Row.Cells("MTLLotNoSearch").Style = ColumnStyle.Button + 'e.Row.Cells("MTLLotNoSearch").Appearance.BackColor = System.Drawing.Color.Pink + 'e.Row.Cells("MTLLotNoSearch").ButtonAppearance.BackColor = Color.Pink + 'e.Row.Cells("MTLLotNoSearch").ButtonAppearance.BorderColor3DBase = Color.Pink + 'e.Row.Cells("MTLLotNoSearch").ButtonAppearance.BackGradientStyle = GradientStyle.Rectangular + e.Row.Cells("MTLLotNoSearch").Value = "..." + e.Row.Update() + End If + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugMaterial.iMESUltraGrid_ClickCellButton, IMESUltraGridControl1.iMESUltraGrid_ClickCellButton + + Dim dvData As DataView + + Try + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + + Dim MaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + Dim drSel() As DataRow = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & MaterialNo & "'") + If drSel.Length = 0 Then Exit Sub + + Dim dtMLot As DataTable = dsWIP.Tables(tblTmpMTLLotNo).Copy + Dim drTMaterial As DataRow = drSel(0) + Dim parameters As New Dictionary(Of String, Object) From { + {"drMaterial", drTMaterial}, + {"dtMLot", dtMLot}, + {"blnCheckIn", True} + } + Me.ObjectFileHandler.Execute("WP_MaterialQtyInput_Main", parameters) + + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select("OrgMaterialNo='" & MaterialNo & "'") + For Each dr In drSel + dr.Delete() + Next + dsWIP.Tables(tblTmpMTLLotNo).AcceptChanges() + + dtMLot = parameters("dtMLot") + For Each drMLot As DataRow In dtMLot.Rows + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select( + "SubstituteMaterialNo='" & drMLot("SubstituteMaterialNo").ToString() & "' And + MaterialLotNo='" & drMLot("MaterialLotNo").ToString() & "'") + If drSel.Length > 0 Then Continue For + + Dim drAdd As DataRow = dsWIP.Tables(tblTmpMTLLotNo).NewRow + For Each dcMLot As DataColumn In dtMLot.Columns + drAdd(dcMLot.ColumnName) = drMLot(dcMLot.ColumnName).ToString() + Next + dsWIP.Tables(tblTmpMTLLotNo).Rows.Add(drAdd) + Next + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + Private Sub iugEquipment_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugEquipment.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + Dim colShow As New Collection + + With e.Layout + 'Hide all, No Edit + + 'Equipment + For i = 0 To dsWIP.Tables(tblAreaEquipment).Columns.Count - 1 + Select Case dsWIP.Tables(tblAreaEquipment).Columns(i).ColumnName.ToUpper + Case "CHECKFLAG" + With .Bands(tblAreaEquipment).Columns("CheckFlag") + .Width = 50 + .Header.VisiblePosition = 1 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellAppearance.BackColor = System.Drawing.Color.White + End With + Case "EQUIPMENTNO" + With .Bands(tblAreaEquipment).Columns("EquipmentNo") + .Width = 100 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "EQUIPMENTNAME" + '[Mantis:80651]2020/10/27,Boyi,EquipmentDescription => EquipmentName + ' dsWIP.Tables(tblAreaEquipment).Columns("EquipmentName").ColumnName = "EquipmentDescription" + With .Bands(tblAreaEquipment).Columns("EquipmentName") + .Header.Caption = "EquipmentName" + .Width = 150 + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "RECIPEGROUP" + With .Bands(tblAreaEquipment).Columns("RecipeGroup") + .Width = 80 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "RECIPEVERSION" + With .Bands(tblAreaEquipment).Columns("RecipeVersion") + .Width = 50 + .Header.VisiblePosition = 5 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "DESCRIPTION" + With .Bands(tblAreaEquipment).Columns("Description") + .Width = 100 + .Header.VisiblePosition = 6 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "QCLISTNO" + With .Bands(tblAreaEquipment).Columns("QCListNo") + .Header.VisiblePosition = 7 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "DISPATCHORDER" + With .Bands(tblAreaEquipment).Columns("DispatchOrder") + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + End With + Case "DISPATCHDATE" ''2020/11/05 Steven Mantis:0081316: 手動派工,新增顯示欄位 + With .Bands(tblAreaEquipment).Columns("DispatchDate") + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .Format = "yyyy/MM/dd" + .Width = 100 + End With + '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + 'Case "LOGICALRECIPENAME" '2023/07/20, 0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 19245 + ' With .Bands(tblAreaEquipment).Columns("LogicalRecipeName") + ' .Width = 80 + ' .Header.VisiblePosition = 4 + ' .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + ' .TabStop = False + ' End With + 'Case "LOGICALRECIPEVERSION" '2023/07/20, 0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 19245 + ' With .Bands(tblAreaEquipment).Columns("LogicalRecipeVersion") + ' .Width = 100 + ' .Header.VisiblePosition = 5 + ' .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + ' .TabStop = False + ' End With + Case Else + With .Bands(tblAreaEquipment).Columns(dsWIP.Tables(tblAreaEquipment).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + 'Chamber + If Not dsWIP.Tables("Chamber") Is Nothing Then + For i = 0 To dsWIP.Tables("Chamber").Columns.Count - 1 + Select Case dsWIP.Tables("Chamber").Columns(i).ColumnName.ToUpper + Case "SELECT1" + With .Bands("Chamber").Columns("SELECT1") + .Width = 50 + .Header.VisiblePosition = 1 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellAppearance.BackColor = System.Drawing.Color.White + End With + Case "EQUIPMENTNO" + With .Bands("Chamber").Columns("EQUIPMENTNO") + .Width = 100 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "EQUIPMENTNAME" + With .Bands("Chamber").Columns("EQUIPMENTNAME") + .Header.Caption = "EquipmentName" + .Width = 150 + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "DESCRIPTION" + With .Bands("Chamber").Columns("Description") + .Width = 100 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case Else + With .Bands("Chamber").Columns(dsWIP.Tables("Chamber").Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End If + 'For i = 1 To colShow.Count + ' .Columns(CStr(colShow(i))).Hidden = False + ' .Columns(CStr(colShow(i))).Header.VisiblePosition = i + 'Next + + colShow.Add("CHECKFLAG") + colShow.Add("EQUIPMENTNO") + colShow.Add("EQUIPMENTNAME") + colShow.Add("RECIPEGROUP") + colShow.Add("RECIPEVERSION") + 'colShow.Add("LOGICALRECIPENAME") '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + 'colShow.Add("LOGICALRECIPEVERSION") + colShow.Add("DESCRIPTION") + colShow.Add("QCLISTNO") + colShow.Add("DISPATCHDATE") + colShow.Add("DISPATCHORDER") + + 'Accessory + If Not dsWIP.Tables("AccState") Is Nothing Then + For i = 0 To dsWIP.Tables("AccState").Columns.Count - 1 + Select Case dsWIP.Tables("AccState").Columns(i).ColumnName.ToUpper + Case "SELECT" + With .Bands("Accessory").Columns("SELECT") + .Width = 50 + .Header.VisiblePosition = 1 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellAppearance.BackColor = System.Drawing.Color.White + End With + Case "ACCESSORYNO" + With .Bands("Accessory").Columns("AccessoryNo") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "ACCESSORYTYPE" + With .Bands("Accessory").Columns("AccessoryType") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "STARTTIME" + With .Bands("Accessory").Columns("StartTime") + .Width = 120 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .Format = "yyyy/MM/dd HH:mm:ss" + End With + Case "ACCUMULATEQTY" + With .Bands("Accessory").Columns("AccumulateQty") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 5 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .TabStop = False + .Format = "0.######" + End With + Case "REPAIRCYCLE" + With .Bands("Accessory").Columns("RepairCycle") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 6 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .TabStop = False + .Format = "0.######" + End With + Case Else + With .Bands("Accessory").Columns(dsWIP.Tables("AccState").Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End If + + 'Recipe + 'Dim vlRecipeType As New ValueList '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + 'vlRecipeType = COM_Utility.ValueListProvider.GetInstance.GetValueList("TBLPRDMACHINERECIPEDETAIL", "RECIPETYPE", True) + + If Not dsWIP.Tables("RecipeDetail") Is Nothing Then + For i = 0 To dsWIP.Tables("RecipeDetail").Columns.Count - 1 + Select Case dsWIP.Tables("RecipeDetail").Columns(i).ColumnName.ToUpper + Case "RECIPENO" + With .Bands("Recipe").Columns("RecipeNo") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 1 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "RECIPEVALUE" + With .Bands("Recipe").Columns("RecipeValue") + .Width = 100 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + 'Case "RECIPEPARAMETERNO" '0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 2023/07/20, 19245 + ' With .Bands("Recipe").Columns("RecipeParameterNo") + ' .Width = 80 + ' .Header.Appearance.BackColor = System.Drawing.Color.Yellow + ' .Header.VisiblePosition = 1 + ' .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + ' .TabStop = False + ' End With + 'Case "RECIPETYPE" '0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 2023/07/21, 19245 + ' With .Bands("Recipe").Columns("RecipeType") + ' .Width = 80 + ' .Header.Appearance.BackColor = System.Drawing.Color.Yellow + ' .Header.VisiblePosition = 2 + ' .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + ' .TabStop = False + ' .ValueList = vlRecipeType + 'End With + + Case Else + With .Bands("Recipe").Columns(dsWIP.Tables("RecipeDetail").Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End If + End With + + 'UltraGrid + iugEquipment.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + iugEquipment.iMESUltraGrid.Rows.ExpandAll(True) + + End Sub + + Private Sub iugEquipment_iMESUltraGrid_BeforeCellUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeCellUpdateEventArgs) Handles iugEquipment.iMESUltraGrid_BeforeCellUpdate + Dim drTemp As DataRow() + Dim strType As String + Dim blnNeedSelect As Boolean + '勾選設備後,才自動勾選模治具 + If e.Cell.Column.Key.ToUpper = "CHECKFLAG" AndAlso e.NewValue = True Then + '預設選取每個類別第一個模治具 + For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo = '" & e.Cell.Row.Cells(1).Text & "'") + strType = "" + blnNeedSelect = True + If dr("AllowExecute") = 1 Then '可使用 + drTemp = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "'") + For i = 0 To drTemp.Count - 1 + If drTemp(i)("Select") = True Then blnNeedSelect = False + Next + If drTemp.Length > 0 AndAlso blnNeedSelect = True Then + '有掛模治具 + For Each dr1 As DataRow In drTemp + If strType = "" Then + strType = dr1("AccessoryType") + dr1("Select") = True + ElseIf strType <> dr1("AccessoryType") Then + dr1("Select") = True + strType = dr1("AccessoryType") + End If + Next + End If + End If + Next + End If + End Sub + Private Sub iugEquipment_iMESUltraGrid_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles iugEquipment.iMESUltraGrid_KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub iugEquipment_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugEquipment.iMESUltraGrid_InitializeRow + + If e.Row.Band.Key = tblAreaEquipment Then 'Equipment + If e.Row.Cells("AllowExecute").Value = 0 Then '不可使用 + e.Row.Cells("CheckFlag").Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled + e.Row.Cells("CheckFlag").Appearance.BackColor = System.Drawing.Color.Gainsboro + ElseIf e.Row.Cells("AllowExecute").Value = 1 Then '可使用 + + 'CheckFlag + If EquipmentNo = defString Then + Else + '以機台下貨,關閉勾選介面. + e.Row.Cells("CheckFlag").Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled + e.Row.Cells("CheckFlag").Appearance.BackColor = System.Drawing.Color.Gainsboro + End If + End If + End If + '子設備 + 'TsungYu 2021/06/09 + If e.Row.Band.Key = "Chamber" Then 'Equipment + If e.Row.Cells("AllowExecute").Value = 0 Then '不可使用 + e.Row.Cells("Select1").Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled + e.Row.Cells("Select1").Appearance.BackColor = System.Drawing.Color.Gainsboro + ElseIf e.Row.Cells("AllowExecute").Value = 1 Then '可使用 + 'CheckFlag + If EquipmentNo = defString Then + Else + e.Row.Cells("Select1").Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled + e.Row.Cells("Select1").Appearance.BackColor = System.Drawing.Color.Gainsboro + End If + End If + End If + If e.Row.Band.Key.ToUpper = "ACCESSORY" Then '模治具 + '2014/11/24 Kevin,如果是產品-作業站-模治具所設定的模治具則改變底色 + If Not dsWIP.Tables("PRDAccessory") Is Nothing Then + Dim drSelPRD As DataRow() + drSelPRD = dsWIP.Tables("PRDAccessory").Select("AccessoryNo = '" & e.Row.Cells("AccessoryNo").Value & "'") + If drSelPRD.Length > 0 Then + e.Row.Appearance.BackColor = System.Drawing.Color.Yellow + Else + '找不到的話再看一次模治具類別 + drSelPRD = dsWIP.Tables("PRDAccessory").Select("AccessoryType = '" & e.Row.Cells("AccessoryType").Value & "' And AccessoryNo ='*'") + If drSelPRD.Length > 0 Then + e.Row.Appearance.BackColor = System.Drawing.Color.Yellow + End If + End If + End If + End If + + End Sub + + Private Sub iugEquipment_iMESUltraGrid_AfterCellUpdate(sender As System.Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugEquipment.iMESUltraGrid_AfterCellUpdate + + '如有點選模製具則將設備自動勾選 + If e.Cell.Column.Key.ToUpper = "SELECT" AndAlso e.Cell.Row.Cells("SELECT").Value Then + drSelE = dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo = '" & e.Cell.Row.Cells("EquipmentNo").Value & "'") + For Each dr As DataRow In drSelE + dr("CHECKFLAG") = True + Next + End If + + If e.Cell.Column.Key.ToUpper = "CHECKFLAG" AndAlso e.Cell.Row.Cells("CHECKFLAG").Value = False Then + drSelE = dsWIP.Tables("AccState").Select("EquipmentNo = '" & iugEquipment.iMESUltraGrid.ActiveRow.Cells("EquipmentNo").Value & "'") + For Each dr As DataRow In drSelE + dr("Select") = False + Next + + '2021/9/14 Mantis:0099587 當取消勾選設備時,此設備已開立的點檢單應刪除 + '自動開立點檢務單 + Call funCheckEQPQCTask(e.Cell.Row.Cells("EquipmentNo").Value, True) + + If blnByEQP = True Then + DeleteTmpMTLLotNo(e.Cell.Row.Cells("EquipmentNo").Value) + End If + + Else + If blnByEQP = True Then + Call LoadMaterialByEquipment(e.Cell.Row.Cells("EquipmentNo").Value) + End If + End If + + If Not dsWIP.Tables("Chamber") Is Nothing Then + If dsWIP.Tables("Chamber").Rows.Count > 0 Then + '如有點選子設備則將設備自動勾選 + If e.Cell.Column.Key.ToUpper = "SELECT1" AndAlso e.Cell.Row.Cells("SELECT1").Value Then + If Not String.IsNullOrEmpty(e.Cell.Row.Cells("BELONGEQUIPMENTNO").Value.ToString) Then + drSelE = dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo = '" & e.Cell.Row.Cells("BelongEquipmentNo").Value & "'") + For Each dr As DataRow In drSelE + dr("CHECKFLAG") = True + Next + End If + End If + '設備取消時子設備的勾選也自動取消 + If e.Cell.Column.Key.ToUpper = "CHECKFLAG" AndAlso e.Cell.Row.Cells("CHECKFLAG").Value = False Then + drSelE = dsWIP.Tables("Chamber").Select("BelongEquipmentNo = '" & iugEquipment.iMESUltraGrid.ActiveRow.Cells("EquipmentNo").Value & "'") + For Each dr As DataRow In drSelE + dr("SELECT1") = False + Next + '設備勾選時自動勾選子設備 + ElseIf e.Cell.Column.Key.ToUpper = "CHECKFLAG" AndAlso e.Cell.Row.Cells("CHECKFLAG").Value Then + drSelE = dsWIP.Tables("Chamber").Select("BelongEquipmentNo = '" & iugEquipment.iMESUltraGrid.ActiveRow.Cells("EquipmentNo").Value & "' and AllowExecute = 1") + For Each dr As DataRow In drSelE + dr("SELECT1") = True + Next + End If + End If + End If + ' 2016/01/27 YF, 取得設備參數值 + e.Cell.Row.Update() + + funGetEquipmentRecipe() + + + End Sub + + Private Sub iugEquipment_iMESUltraGrid_CellChange(sender As Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugEquipment.iMESUltraGrid_CellChange + ' CheckFlag被點選時, 可立即將結果異動回DataTable + e.Cell.Row.Update() + Me.iugEquipment.iMESUltraGrid.ActiveRow = e.Cell.Row + End Sub + + + + Private Sub iugKeyIn_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugKeyIn.iMESUltraGrid_InitializeLayOut + + With e.Layout + With .Bands("KeyIn").Columns("AttribNo") + .Header.Caption = "AttribNo" + .Width = 90 + .Header.VisiblePosition = 1 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribName") + .Header.Caption = "AttribName" + .Width = 150 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribValue") + .Header.Caption = "AttribValue" + .Width = 130 + .Header.VisiblePosition = 3 + End With + '2015-12-18, Joe, Add + With .Bands("KeyIn").Columns("QCItemNo") + .Header.Caption = "QCItemNo" + .Width = 90 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribSequence") + .Hidden = True + End With + With .Bands("KeyIn").Columns("InputType") + .Hidden = True + End With + With .Bands("KeyIn").Columns("DataType") + .Hidden = True + End With + With .Bands("KeyIn").Columns("ValueType") + .Hidden = True + End With + + .Bands("KeyIn").Columns("OrgAttribValue").Hidden = True ' 2016/01/27 YF + End With + + 'UltraGrid + iugKeyIn.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles iugKeyIn.iMESUltraGrid_KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugKeyIn.iMESUltraGrid_InitializeRow + Dim strAttribValue As String + + Try + + 'InputType=1 清單選擇 + If e.Row.Cells("InputType").Value = 1 Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + ElseIf e.Row.Cells("DataType").Value = 3 Then + e.Row.Cells("AttribValue").Style = ColumnStyle.DateTime + e.Row.Cells("AttribValue").Editor = editor + e.Row.Cells("AttribValue").Appearance.BackColor = Color.White + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugKeyIn.iMESUltraGrid_ClickCellButton + + Dim intValueType As Integer + + Cursor.Current = Cursors.WaitCursor + + Try + + intValueType = iugKeyIn.iMESUltraGrid.ActiveRow.Cells("ValueType").Value + + If intValueType = 3 OrElse intValueType = 1 Then 'Reference System Parameter / Assign Valid Value + If Not IsNothing(dsWIP.Tables(strDefaultValue)) Then + dsWIP.Tables.Remove(strDefaultValue) + End If + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("elementno", "PropertyType", "String", iugKeyIn.iMESUltraGrid.ActiveRow.Cells("AttribNo").Value, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsSYS.LoadElementValue", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出Data + strDefaultValue = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadelementvalue").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadelementvalue").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadelementvalue").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" And XmlData <> "fail" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + + Dim fSearch As New frmCOMSearch + '如果 PropertyNo 的有效性檢查來自 MESParameter,則取出有效值提供選擇 + fSearch.dvSearch = dsWIP.Tables(strDefaultValue).DefaultView + fSearch.strFindColumnName = dsWIP.Tables(strDefaultValue).Columns(0).ColumnName + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If Not drSearch Is Nothing Then + If Not IsDBNull(drSearch(0).ToString) Then + iugKeyIn.iMESUltraGrid.ActiveRow.Cells("AttribValue").Value = drSearch(0).ToString + End If + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + End Sub + + Private Sub iugSubOP_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugSubOP.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblSubOP).Columns.Count - 1 + Select Case dsWIP.Tables(tblSubOP).Columns(i).ColumnName.ToUpper + Case "SUBOPSEQUENCE" + With .Bands(tblSubOP).Columns("SubOPSequence") + .Header.Caption = "SubOPSequence" + .Width = 50 + .Hidden = False + .Header.VisiblePosition = 1 + End With + Case "SUBOPNO" + With .Bands(tblSubOP).Columns("SubOPNo") + .Header.Caption = "SubOPNo" + .Width = 80 + .Header.VisiblePosition = 2 + End With + Case "SUBOPNAME" + With .Bands(tblSubOP).Columns("SubOPName") + .Header.Caption = "SubOPName" + .Width = 180 + .Header.VisiblePosition = 3 + End With + Case "CREATOR" + With .Bands(tblSubOP).Columns("Creator") + .Header.Caption = "Creator" + .Width = 70 + .Hidden = True + .Header.VisiblePosition = 4 + End With + Case "CREATEDATE" + With .Bands(tblSubOP).Columns("CreateDate") + .Width = 120 + .Header.VisiblePosition = 5 + .Hidden = True + .Format = "yyyy/MM/dd HH:mm:ss" + End With + Case Else + With .Bands(tblSubOP).Columns(dsWIP.Tables(tblSubOP).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + End With + + End Sub + + Private Sub iugStuInfo_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugStuBasis.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblStuInfo).Columns.Count - 1 + Select Case dsWIP.Tables(tblStuInfo).Columns(i).ColumnName.ToUpper + Case "CHECKFLAG" + With .Bands(tblStuInfo).Columns("CheckFlag") + .Width = 50 + .Header.VisiblePosition = 0 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellAppearance.BackColor = System.Drawing.Color.White + End With + Case "STUDENTNO" + With .Bands(tblStuInfo).Columns("StudentNo") + .Header.Caption = "StudentNo" + .Width = 120 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .Header.VisiblePosition = 2 + End With + Case "STUDENTNAME" + With .Bands(tblStuInfo).Columns("StudentName") + .Header.Caption = "StudentName" + .Width = 120 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .Header.VisiblePosition = 3 + End With + Case "ISSELECTED" + With .Bands(tblStuInfo).Columns("IsSelected") + .Header.Caption = "IsSelected" + .Width = 120 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .ValueList = vlStuInfoIsSelected + End With + Case "LOTNO" + With .Bands(tblStuInfo).Columns("LotNo") + .Header.Caption = "LotNo" + .Width = 120 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .Header.VisiblePosition = 5 + End With + Case Else + With .Bands(tblStuInfo).Columns(dsWIP.Tables(tblStuInfo).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + iugStuBasis.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + iugStuBasis.iMESUltraGrid.Rows.ExpandAll(True) + + End With + + + End Sub + +#End Region + +#Region "Equipment" + + Private Sub txtEquipmentNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEquipmentNo.Enter + txtEquipmentNo.SelectAll() + End Sub + Private Sub txtEquipmentNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtEquipmentNo.KeyPress + + Cursor.Current = Cursors.WaitCursor + + '強制使用機台,故不提供此功能 + + If EquipmentNo <> defString Then Exit Sub + + If e.KeyChar = Convert.ToChar(13) Then + If txtEquipmentNo.Text.Trim <> "" Then + Dim drSel() As DataRow + Dim strEQPNo As String + strEQPNo = txtEquipmentNo.Text.Trim.ToUpper + '檢查EquipmentNo是否存在 + drSel = dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo='" & strEQPNo & "'") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%EquipmentNo%]:" & strEQPNo & " [%is not in area%]:" & txtAreaNo.Text & "!"), MsgBoxStyle.Exclamation, Me.Text) + txtEquipmentNo.SelectAll() + Exit Sub + Else + If drSel(0)("AllowExecute") = 1 Then '可使用 + drSel(0)("CheckFlag") = True + If blnByEQP = True Then + Call LoadMaterialByEquipment(strEQPNo) + End If + + Else '不可使用 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%EquipmentNo%]:" & strEQPNo & " [%is not available%] " & Chr(10) + Chr(13) & drSel(0)("Description")), MsgBoxStyle.Exclamation, Me.Text) + txtEquipmentNo.SelectAll() + Exit Sub + End If + End If + + 'Focus + Dim ugrRow As Infragistics.Win.UltraWinGrid.UltraGridRow + ugrRow = FindRecordPosition(iugEquipment, "EquipmentNo", strEQPNo) + If Not ugrRow Is Nothing Then + iugEquipment.iMESUltraGrid.ActiveRow = ugrRow + iugEquipment.iMESUltraGrid.ActiveRow.Selected = True + End If + + txtEquipmentNo.Text = "" + txtEquipmentNo.Focus() + End If + End If + + Cursor.Current = Cursors.Default + + End Sub + + +#End Region + +#Region "Load functions" + + Private Function funLoadLotState() As Integer + + funLoadLotState = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadLotBasisJoinState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblLotState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadlotbasisjoinstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasisjoinstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasisjoinstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + If dsWIP.Tables(tblLotState).Rows.Count > 0 Then + If dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString = "1" Then + blnByEQP = True + End If + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadLotState = 0 + + End Function + + Private Function funLoadTemp_AttribJoinBasis() As Integer + + funLoadTemp_AttribJoinBasis = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_AttribJoinBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTAttrib = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_attrib").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_attrib").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_attrib").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + Call funAddValueList_Attrib() + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_AttribJoinBasis = 0 + + + End Function + + Private Function funLoadTemp_Material() As Integer + + funLoadTemp_Material = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_Material", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTMaterial = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_material").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_material").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_material").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + '新增OrgMaterialNo,紀錄原來的主物料用 + Dim colOrgMaterialNo As New DataColumn + colOrgMaterialNo.ColumnName = "OrgMaterialNo" + colOrgMaterialNo.DataType = System.Type.GetType("System.String") + colOrgMaterialNo.DefaultValue = 0 + colOrgMaterialNo.AllowDBNull = False + dsWIP.Tables(tblTMaterial).Columns.Add(colOrgMaterialNo) + + '加入標準用量欄位 + Dim colStdQty As New DataColumn + colStdQty.ColumnName = "StdUseQty" + colStdQty.DataType = System.Type.GetType("System.Decimal") + colStdQty.DefaultValue = 0 + colStdQty.AllowDBNull = False + dsWIP.Tables(tblTMaterial).Columns.Add(colStdQty) + + '計算標準使用量 + Dim decCurQty, decStdQty As Decimal + Dim i As Integer + + 'Rows(0)一定會有資料. + decCurQty = dsWIP.Tables(tblLotState).Rows(0)("CurQty") + For i = 0 To dsWIP.Tables(tblTMaterial).Rows.Count - 1 + decStdQty = decCurQty * dsWIP.Tables(tblTMaterial).Rows(i)("StdQty") * (1 + dsWIP.Tables(tblTMaterial).Rows(i)("DecreaseRate")) + dsWIP.Tables(tblTMaterial).Rows(i)("StdUseQty") = Format(decStdQty, "0.######") + + '紀錄原來的主物料 + dsWIP.Tables(tblTMaterial).Rows(i)("OrgMaterialNo") = dsWIP.Tables(tblTMaterial).Rows(i)("MaterialNo") + Next + + dsWIP.Tables(tblTMaterial).Columns("MaterialLevel").ColumnName = "MaterialLevelShow" + + '加入可供使用者點擊搜尋的欄位 + dsWIP.Tables(tblTMaterial).Columns.Add(New DataColumn("MTLLotNoSearch", System.Type.GetType("System.String"))) + dsWIP.Tables(tblTMaterial).DefaultView.RowFilter = "MaterialNo = OrgMaterialNo" + dsWIP.Tables(tblTMaterial).DefaultView.Sort = "MaterialType,OrgMaterialNo,MaterialNo" + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_Material = 0 + + + End Function + + Private Function funLoadAvailableEquipment(ByRef LotNo As String) As Integer + + funLoadAvailableEquipment = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + strParameter += CombineXMLParameter("getrecipe", "GetRecipe", "Boolean", True, "") + strParameter += CombineXMLParameter("getaccessory", "GetAccessory", "Boolean", blnGetAccessory, "") + strParameter += CombineXMLParameter("multiqclist", "MultiQCList", "Boolean", True, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadAvailableEquipment_All", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblAreaEquipment = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadavailableequipment_all").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipment_all").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipment_all").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + '2023/12/21,Ning,154124: L_CI_GEN [語系未處理] 挑選設備後,彈窗訊息顯示 LoadPort is full. + For Each drEQP As DataRow In dsWIP.Tables(tblAreaEquipment).Rows + If drEQP("Description").ToString <> "" Then + drEQP("Description") = ChgTranslateName_Content(drEQP("Description")) + End If + Next + + '加入Check Field + Dim colCheckFlag As New DataColumn + colCheckFlag.ColumnName = "CheckFlag" + colCheckFlag.DataType = System.Type.GetType("System.Boolean") + colCheckFlag.DefaultValue = False + colCheckFlag.AllowDBNull = False + dsWIP.Tables(tblAreaEquipment).Columns.Add(colCheckFlag) + '加入LoadPort + Dim colPort As New DataColumn + colPort.ColumnName = "LoadPort" + colPort.DataType = System.Type.GetType("System.String") + dsWIP.Tables(tblAreaEquipment).Columns.Add(colPort) + + '加入點檢識別欄位 + dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCType", System.Type.GetType("System.Decimal"))) + dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCFinish", System.Type.GetType("System.Decimal"))) + + '開放可編輯 + dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + + If Not dsWIP.Tables("Chamber") Is Nothing Then + '加入勾選的按鈕 + Dim colChamberCheckFlag As New DataColumn + colChamberCheckFlag.ColumnName = "SELECT1" + colChamberCheckFlag.DataType = System.Type.GetType("System.Boolean") + colChamberCheckFlag.DefaultValue = False + colChamberCheckFlag.AllowDBNull = False + dsWIP.Tables("Chamber").Columns.Add(colChamberCheckFlag) + dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + End If + 'Kevin 20131223,如有模治具則開放用選取的方式 + If Not dsWIP.Tables("AccState") Is Nothing Then + '加入勾選的按鈕 + Dim colSelect As New DataColumn + colSelect.ColumnName = "Select" + colSelect.DataType = System.Type.GetType("System.Boolean") + colSelect.DefaultValue = False + colSelect.AllowDBNull = False + dsWIP.Tables("AccState").Columns.Add(colSelect) + + dsWIP.Tables("AccState").DefaultView.Sort = "AccessoryType,AccessoryNo" + Dim strType As String = "" + Dim drTemp As DataRow() + + '預設選取每個類別第一個模治具 + 'For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Rows + ' strType = "" + ' If dr("AllowExecute") = 1 Then '可使用 + ' drTemp = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "'") + ' If drTemp.Length > 0 Then + ' '有掛模治具 + ' For Each dr1 As DataRow In drTemp + ' If strType = "" Then + ' strType = dr1("AccessoryType") + ' dr1("Select") = True + ' ElseIf strType <> dr1("AccessoryType") Then + ' dr1("Select") = True + ' strType = dr1("AccessoryType") + ' End If + ' Next + ' End If + ' End If + 'Next + '2020/02/26 Grace Mantis 67753 取得此批號於此作業站上的派工資料 + Call funLoadWIPEQPDispatchState(LotNo:=LotNo, OPNo:=txtOPNo.Text) + '增加顯示欄位:派工日期、派工順序 + If dsWIP.Tables(tblAreaEquipment).Columns.Contains("DispatchOrder") Then + dsWIP.Tables(tblAreaEquipment).Columns.Remove("DispatchOrder") + End If + Dim colDispatchDate As New DataColumn + colDispatchDate.ColumnName = "DispatchDate" + colDispatchDate.DataType = System.Type.GetType("System.DateTime") + dsWIP.Tables(tblAreaEquipment).Columns.Add(colDispatchDate) + Dim colDispatchOrder As New DataColumn + colDispatchOrder.ColumnName = "DispatchOrder" + colDispatchOrder.DataType = System.Type.GetType("System.String") + dsWIP.Tables(tblAreaEquipment).Columns.Add(colDispatchOrder) + + If Not IsNothing(dsTemp.Tables(tblEQPDispatchState)) Then + If dsTemp.Tables(tblEQPDispatchState).Rows.Count > 0 Then + Dim strCheckInDate As String = Now.ToString("yyyy/MM/dd") 'Check In 日期 + '2020/11/05 Steven Mantis:0081316: '增加顯示欄位:派工日期、派工順序 + For i As Integer = 0 To dsWIP.Tables(tblAreaEquipment).Rows.Count - 1 + '1. 檢查是否有派工設備 + Dim drSelEQP As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & + dsWIP.Tables(tblAreaEquipment).Rows(i)("EquipmentNo").ToString() & "'And LotNo = '" & txtLotNo.Text & "'And DispatchDate = '" & strCheckInDate & "'") + If drSelEQP.Count > 0 Then '優先顯示派工日期為當天 + dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchOrder") = drSelEQP(0)("DispatchOrder").ToString + If drSelEQP(0)("DispatchDate").ToString <> "" Then + dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchDate") = drSelEQP(0)("DispatchDate") + End If + Else '如非當天派工日期再顯示 + Dim drSelEQP2 As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & + dsWIP.Tables(tblAreaEquipment).Rows(i)("EquipmentNo").ToString() & "'And LotNo = '" & txtLotNo.Text & "'") + If drSelEQP2.Length > 0 Then + dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchOrder") = drSelEQP2(0)("DispatchOrder").ToString + If drSelEQP2(0)("DispatchDate").ToString <> "" Then + dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchDate") = drSelEQP2(0)("DispatchDate") + End If + End If + End If + Next + End If + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadAvailableEquipment = 0 + + + End Function + + '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + '0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 2023-07-20, 19245 + 'Private Function funLoadAvailableEquipmentInfo(ByRef LotNo As String) As Integer + + ' funLoadAvailableEquipmentInfo = -1 + + ' '組InXml的字串 + ' strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + ' strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + ' strParameter += CombineXMLParameter("getrecipe", "GetRecipe", "Boolean", True, "") + ' strParameter += CombineXMLParameter("getaccessory", "GetAccessory", "Boolean", blnGetAccessory, "") + ' strParameter += CombineXMLParameter("multiqclist", "MultiQCList", "Boolean", True, "") + ' InXml = CombineXMLRequest(strIdentity, strParameter) + + ' Try + ' OutXml = InvokeSrv("wsWIP.LoadAvailableEquipmentInfo", InXml) + + ' Dim XmlDoc As New XmlDocument + ' XmlDoc.LoadXml(OutXml) + ' If ChkExecutionSuccess(XmlDoc) Then + ' tblAreaEquipment = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadavailableequipmentinfo").Item(0).SelectNodes("name").Item(0).InnerXml + ' '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + ' XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipmentinfo").Item(0).SelectNodes("schema").Item(0).InnerXml + ' If XmlSchema <> "" Then + ' '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + ' tmpStringReader = New System.IO.StringReader(XmlSchema) + ' dsWIP.ReadXmlSchema(tmpStringReader) + ' tmpStringReader.Close() + ' End If + ' XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipmentinfo").Item(0).SelectNodes("value").Item(0).InnerXml + ' If XmlData <> "" Then + ' tmpStringReader = New System.IO.StringReader(XmlData) + ' dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + ' tmpStringReader.Close() + ' End If + + ' '加入Check Field + ' Dim colCheckFlag As New DataColumn + ' colCheckFlag.ColumnName = "CheckFlag" + ' colCheckFlag.DataType = System.Type.GetType("System.Boolean") + ' colCheckFlag.DefaultValue = False + ' colCheckFlag.AllowDBNull = False + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(colCheckFlag) + ' '加入LoadPort + ' Dim colPort As New DataColumn + ' colPort.ColumnName = "LoadPort" + ' colPort.DataType = System.Type.GetType("System.String") + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(colPort) + + ' '加入點檢識別欄位 + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCType", System.Type.GetType("System.Decimal"))) + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCFinish", System.Type.GetType("System.Decimal"))) + + ' '開放可編輯 + ' dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + + ' If Not dsWIP.Tables("Chamber") Is Nothing Then + ' '加入勾選的按鈕 + ' Dim colChamberCheckFlag As New DataColumn + ' colChamberCheckFlag.ColumnName = "SELECT1" + ' colChamberCheckFlag.DataType = System.Type.GetType("System.Boolean") + ' colChamberCheckFlag.DefaultValue = False + ' colChamberCheckFlag.AllowDBNull = False + ' dsWIP.Tables("Chamber").Columns.Add(colChamberCheckFlag) + ' dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + ' End If + ' 'Kevin 20131223,如有模治具則開放用選取的方式 + ' If Not dsWIP.Tables("AccState") Is Nothing Then + ' '加入勾選的按鈕 + ' Dim colSelect As New DataColumn + ' colSelect.ColumnName = "Select" + ' colSelect.DataType = System.Type.GetType("System.Boolean") + ' colSelect.DefaultValue = False + ' colSelect.AllowDBNull = False + ' dsWIP.Tables("AccState").Columns.Add(colSelect) + + ' dsWIP.Tables("AccState").DefaultView.Sort = "AccessoryType,AccessoryNo" + ' Dim strType As String = "" + ' Dim drTemp As DataRow() + + ' '預設選取每個類別第一個模治具 + ' 'For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Rows + ' ' strType = "" + ' ' If dr("AllowExecute") = 1 Then '可使用 + ' ' drTemp = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "'") + ' ' If drTemp.Length > 0 Then + ' ' '有掛模治具 + ' ' For Each dr1 As DataRow In drTemp + ' ' If strType = "" Then + ' ' strType = dr1("AccessoryType") + ' ' dr1("Select") = True + ' ' ElseIf strType <> dr1("AccessoryType") Then + ' ' dr1("Select") = True + ' ' strType = dr1("AccessoryType") + ' ' End If + ' ' Next + ' ' End If + ' ' End If + ' 'Next + ' '2020/02/26 Grace Mantis 67753 取得此批號於此作業站上的派工資料 + ' Call funLoadWIPEQPDispatchState(LotNo:=LotNo, OPNo:=txtOPNo.Text) + ' '增加顯示欄位:派工日期、派工順序 + ' If dsWIP.Tables(tblAreaEquipment).Columns.Contains("DispatchOrder") Then + ' dsWIP.Tables(tblAreaEquipment).Columns.Remove("DispatchOrder") + ' End If + ' Dim colDispatchDate As New DataColumn + ' colDispatchDate.ColumnName = "DispatchDate" + ' colDispatchDate.DataType = System.Type.GetType("System.DateTime") + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(colDispatchDate) + ' Dim colDispatchOrder As New DataColumn + ' colDispatchOrder.ColumnName = "DispatchOrder" + ' colDispatchOrder.DataType = System.Type.GetType("System.String") + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(colDispatchOrder) + + ' If Not IsNothing(dsTemp.Tables(tblEQPDispatchState)) Then + ' If dsTemp.Tables(tblEQPDispatchState).Rows.Count > 0 Then + ' Dim strCheckInDate As String = Now.ToString("yyyy/MM/dd") 'Check In 日期 + ' '2020/11/05 Steven Mantis:0081316: '增加顯示欄位:派工日期、派工順序 + ' For i As Integer = 0 To dsWIP.Tables(tblAreaEquipment).Rows.Count - 1 + ' '1. 檢查是否有派工設備 + ' Dim drSelEQP As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("EquipmentNo").ToString() & "'And LotNo = '" & txtLotNo.Text & "'And DispatchDate = '" & strCheckInDate & "'") + ' If drSelEQP.Count > 0 Then '優先顯示派工日期為當天 + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchOrder") = drSelEQP(0)("DispatchOrder").ToString + ' If drSelEQP(0)("DispatchDate").ToString <> "" Then + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchDate") = drSelEQP(0)("DispatchDate") + ' End If + ' Else '如非當天派工日期再顯示 + ' Dim drSelEQP2 As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("EquipmentNo").ToString() & "'And LotNo = '" & txtLotNo.Text & "'") + ' If drSelEQP2.Length > 0 Then + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchOrder") = drSelEQP2(0)("DispatchOrder").ToString + ' If drSelEQP2(0)("DispatchDate").ToString <> "" Then + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchDate") = drSelEQP2(0)("DispatchDate") + ' End If + ' End If + ' End If + ' Next + ' End If + ' End If + ' End If + ' Else + ' ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + ' Exit Function + ' End If + + ' XmlDoc = Nothing + + ' Catch ex As iMESException.MESException + ' ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + ' Exit Function + ' Catch ex As Exception + ' ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + ' Exit Function + ' End Try + + ' funLoadAvailableEquipmentInfo = 0 + + + 'End Function + + Private Function funLoadAvailableEquipment_Chamber(ByRef LotNo As String) As Integer + + funLoadAvailableEquipment_Chamber = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + strParameter += CombineXMLParameter("getrecipe", "GetRecipe", "Boolean", True, "") + strParameter += CombineXMLParameter("getaccessory", "GetAccessory", "Boolean", blnGetAccessory, "") + strParameter += CombineXMLParameter("multiqclist", "MultiQCList", "Boolean", True, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsWIP.LoadAvailableEquipment_All(InXml) + OutXml = InvokeSrv("wsWIP.LoadAvailableEquipment_All", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblAreaEquipment = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadavailableequipment_all").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipment_all").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipment_all").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + '加入Check Field + Dim colCheckFlag As New DataColumn + colCheckFlag.ColumnName = "CheckFlag" + colCheckFlag.DataType = System.Type.GetType("System.Boolean") + colCheckFlag.DefaultValue = False + colCheckFlag.AllowDBNull = False + dsWIP.Tables(tblAreaEquipment).Columns.Add(colCheckFlag) + '加入LoadPort + Dim colPort As New DataColumn + colPort.ColumnName = "LoadPort" + colPort.DataType = System.Type.GetType("System.String") + dsWIP.Tables(tblAreaEquipment).Columns.Add(colPort) + + '加入點檢識別欄位 + dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCType", System.Type.GetType("System.Decimal"))) + dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCFinish", System.Type.GetType("System.Decimal"))) + + '開放可編輯 + dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + + 'Kevin 20131223,如有模治具則開放用選取的方式 + If Not dsWIP.Tables("AccState") Is Nothing Then + '加入勾選的按鈕 + Dim colSelect As New DataColumn + colSelect.ColumnName = "Select" + colSelect.DataType = System.Type.GetType("System.Boolean") + colSelect.DefaultValue = False + colSelect.AllowDBNull = False + dsWIP.Tables("AccState").Columns.Add(colSelect) + + dsWIP.Tables("AccState").DefaultView.Sort = "AccessoryType,AccessoryNo" + Dim strType As String = "" + Dim drTemp As DataRow() + + '預設選取每個類別第一個模治具 + 'For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Rows + ' strType = "" + ' If dr("AllowExecute") = 1 Then '可使用 + ' drTemp = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "'") + ' If drTemp.Length > 0 Then + ' '有掛模治具 + ' For Each dr1 As DataRow In drTemp + ' If strType = "" Then + ' strType = dr1("AccessoryType") + ' dr1("Select") = True + ' ElseIf strType <> dr1("AccessoryType") Then + ' dr1("Select") = True + ' strType = dr1("AccessoryType") + ' End If + ' Next + ' End If + ' End If + 'Next + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadAvailableEquipment_Chamber = 0 + + + End Function + Private Function funGetShift() As Integer + + funGetShift = -1 + + Dim strShiftNo As String = "N/A" + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("userno", "UserNo", "String", UserId, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsUSR.GetShift", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出ShiftNo + If XmlDoc.GetElementsByTagName("shiftno").Item(0).SelectNodes("value").Count > 0 Then + strShiftNo = XmlDoc.DocumentElement.GetElementsByTagName("shiftno").Item(0).SelectNodes("value").Item(0).InnerText + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + txtShiftNo.Text = strShiftNo + + funGetShift = 0 + + End Function + + Private Function funGetOPDescription(ByRef LotNo As String) As Integer + + funGetOPDescription = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.GetLotOPDescription", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + If XmlDoc.GetElementsByTagName("opdescription").Count > 0 Then + If XmlDoc.GetElementsByTagName("opdescription").Item(0).SelectNodes("value").Count > 0 Then + txtOPDescription.Text = XmlDoc.DocumentElement.GetElementsByTagName("opdescription").Item(0).SelectNodes("value").Item(0).InnerText + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funGetOPDescription = 0 + + End Function + + Private Function funLoadSubOP() As Integer + + funLoadSubOP = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + + '用opreference決定現在要用產品 or Module去抓,2011/04/08,by Sherry + If dsWIP.Tables(tblLotState).Rows(0)("OPReference") = 1 Then 'Module + strParameter = CombineXMLParameter("productno", "ProductNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("ModuleNo").ToString), "") + strParameter += CombineXMLParameter("productversion", "ProductVersion", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("ModuleVersion").ToString), "") + Else 'Product + strParameter = CombineXMLParameter("productno", "ProductNo", "String", txtProductNo.Text, "") + strParameter += CombineXMLParameter("productversion", "ProductVersion", "String", dsWIP.Tables(tblLotState).Rows(0)("ProductVersion").ToString, "") + End If + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(txtOPNo.Text), "") '將OPNo加上CInput轉換特殊字元,2010/04/08,by yumei + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsPRD.LoadPRDOpSubOp", InXml) + + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblSubOP = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadprdopsubop").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadprdopsubop").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadprdopsubop").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + dsWIP.Tables(tblSubOP).DefaultView.Sort = "SubOPSequence,SubOPNo" + iugSubOP.iMESUltraGrid.DataSource = dsWIP.Tables(tblSubOP).DefaultView + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadSubOP = 0 + + End Function + + Private Function funStuInfo() As Integer + + funStuInfo = -1 + Dim dtStuInfo As DataTable + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("ABC.wsWIP_21685.LoadStuInfo", InXml) + + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblStuInfo = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadstudentinfo").Item(0).SelectNodes("name").Item(0).InnerXml + + + + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadstudentinfo").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadstudentinfo").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + + tmpStringReader.Close() + End If + ' 添加CheckFlag Row + dtStuInfo = dsWIP.Tables(tblStuInfo) + Dim checkFlag As DataColumn = New DataColumn("CheckFlag", GetType(Boolean)) + checkFlag.DefaultValue = False + dtStuInfo.Columns.Add(checkFlag) + + dsWIP.Tables(tblStuInfo).DefaultView.Sort = "StudentNo" + iugStuBasis.iMESUltraGrid.DataSource = dsWIP.Tables(tblStuInfo).DefaultView + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funStuInfo = 0 + + End Function + + Private Function funLoadLotLoginState() As Integer + + funLoadLotLoginState = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString), "") + strParameter += CombineXMLParameter("userno", "UserNo", "String", CInput(UserId), "") + Dim strAdditional As String + strAdditional = CombineXMLAdditional(CombineAddXML_Condition("CheckOutTime is null")) + strParameter += strAdditional + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadLotLoginState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblLotLoginState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadlotloginstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadlotloginstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadlotloginstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadLotLoginState = 0 + + End Function + Private Function funLoadMOMaterialState(ByVal MONo As String, + ByVal MaterialLotNo As String, + Optional ByVal MaterialNo As String = defString) As Integer + + funLoadMOMaterialState = -1 + + Dim XmlDoc As New XmlDocument + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblMOMaterialState)) Then + dsWIP.Tables.Remove(tblMOMaterialState) + End If + + '組InXml的字串 + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("mono", "MONo", "String", CInput(MONo), "") + strParameter += CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(MaterialLotNo), "") + If MaterialNo <> defString Then + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + End If + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, Using wsOE As New wsOE.wsOE + ' 2016 YF, wsOE.Url = LocalizeWebService(wsOE.Url.ToString) + ' 2016 YF, wsOE.EnableDecompression = True + ' 2016 YF, OutXml = wsOE.LoadMOMaterialState(InXml) + OutXml = InvokeSrv("wsOE.LoadMOMaterialState", InXml) + + ' 2016 YF, End Using + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblMOMaterialState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmomaterialstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmomaterialstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmomaterialstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadMOMaterialState = 0 + + End Function + + Private Function funLoadWIPInventory_Raw(ByVal MaterialLotNo As String, + Optional ByVal MaterialNo As String = defString, + Optional ByVal InventoryNo As String = defString) As Integer + + funLoadWIPInventory_Raw = -1 + + Dim XmlDoc As New XmlDocument + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblWIPINVRaw)) Then + dsWIP.Tables.Remove(tblWIPINVRaw) + End If + + '組InXml的字串 + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(MaterialLotNo), "") + '2019/06/17 Shih Kai, Mantis:0058359 多加入條件參數 + If MaterialNo <> defString Then + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + End If + If InventoryNo <> defString Then + strParameter += CombineXMLParameter("inventoryno", "InventoryNo", "String", CInput(InventoryNo), "") + End If + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsINV.LoadWIPInventory_Raw", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblWIPINVRaw = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadwipinventory_raw").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_raw").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_raw").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadWIPInventory_Raw = 0 + + End Function + + Private Function funLoadWIPInventory_SEMI(ByVal LotNo As String, + Optional ByVal ProductNo As String = defString, + Optional ByVal InventoryNo As String = defString) As Integer + + funLoadWIPInventory_SEMI = -1 + + Dim XmlDoc As New XmlDocument + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblWIPINVSEMI)) Then + dsWIP.Tables.Remove(tblWIPINVSEMI) + End If + + '組InXml的字串 + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + '2019/06/17 Shih Kai, Mantis:0058359 多加入條件參數 + If ProductNo <> defString Then + strParameter += CombineXMLParameter("productno", "ProductNo", "String", CInput(ProductNo), "") + End If + If InventoryNo <> defString Then + strParameter += CombineXMLParameter("inventoryno", "InventoryNo", "String", CInput(InventoryNo), "") + End If + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadWIPInventory_SEMI", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblWIPINVSEMI = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadwipinventory_semi").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_semi").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_semi").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadWIPInventory_SEMI = 0 + + End Function + + '取出用料清單 + Private Function funLoadSubstituteMaterial_Main(ByVal LotNo As String, ByVal MaterialNo As String, + ByVal UnitNo As String) As Integer + funLoadSubstituteMaterial_Main = -1 + + Dim XmlDoc As New XmlDocument '處理Xml字串之物件 + Dim tmpStringReader As System.IO.StringReader '將字串轉換成可讀入DataSet的物件 + Dim InXml, OutXml, strIdentity, strParameter, XmlData, XmlSchema As String + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblSubstituteMaterial)) Then + dsWIP.Tables.Remove(tblSubstituteMaterial) + End If + + '組InXml的字串 + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + strParameter += CombineXMLParameter("unitno", "UnitNo", "String", CInput(UnitNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadSubstituteMaterial_Main", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSubstituteMaterial = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadsubstitutematerial_main").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadsubstitutematerial_main").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadsubstitutematerial_main").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + Finally + XmlDoc = Nothing + tmpStringReader = Nothing + End Try + + funLoadSubstituteMaterial_Main = 0 + + End Function + + ''' + ''' 2016/10/19 YF, 依設備及工單取出設備上料現況 + ''' + ''' + ''' + ''' + ''' 2:原物料線邊倉(RAW) 3:工單存料現況(MO) 4:半成品線邊倉(SEMI) + ''' + Private Function LoadEQPMaterialState(ByRef pTable As DataTable, Optional ByVal pEquipmentNo As String = defString, + Optional ByVal pMONo As String = defString, Optional ByVal pMaterialNo As String = defString, + Optional ByVal pPutInPlaceType As Integer = 3) As Boolean + + Dim result As Boolean = False + Dim XmlDoc As New XmlDocument + Dim dsTemp As New DataSet + + Try + + Cursor.Current = Cursors.WaitCursor + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = "" + + If (pEquipmentNo <> defString) Then + strParameter += CombineXMLParameter("equipmentno", "EquipmentNo", "String", pEquipmentNo, "") + End If + + '不需要工单 新设备上料14278 + 'If (pMONo <> defString) Then + ' strParameter += CombineXMLParameter("mono", "MONo", "String", CInput(pMONo), "") + 'End If + + If (pMaterialNo <> defString) Then + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(pMaterialNo), "") + End If + + ' 取出剩餘數量>0 + Dim strAdditional As String + strAdditional = CombineXMLAdditional(CombineAddXML_Condition("Qty > 0")) + strParameter += strAdditional + + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsWIP_Material.LoadWIPEQPMaterialState", InXml) + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipeqpmaterialstate").Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipeqpmaterialstate").Item(0).SelectNodes("value").Item(0).InnerXml + + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If (dsTemp.Tables.Count > 0) Then + pTable = dsTemp.Tables(0).Copy + result = True + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + XmlDoc = Nothing + dsTemp = Nothing + Cursor.Current = Cursors.Default + End Try + + Return result + + End Function + + '2019/01/18 Eric + Private Function funLoadParameter(ByVal ParameterNo As String) As String + + Dim dsPara As New DataSet + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("parameterno", "ParameterNo", "String", CInput(ParameterNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsSYS.LoadParameter", InXml) + + Dim XmlDoc As New XmlDocument '//處理Xml字串之物件 + XmlDoc.LoadXml(OutXml) + If Not ChkExecutionSuccess(XmlDoc) Then + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Dim tblParameter As String = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadparameter").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsPara.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsPara.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If dsPara.Tables(tblParameter).Rows.Count > 0 Then + Return dsPara.Tables(tblParameter).Rows(0)("PARAMETERVALUE").ToString + End If + + Return "" + + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + End Try + + End Function + + '2020/10/29 Grace 料批查核,相同料批只能刷一個料號,增加料號刷入 + Private Sub txtMaterialNo_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtMaterialNo.KeyPress, UltraTextEditor1.KeyPress + Try + If (e.KeyChar <> Convert.ToChar(13)) Then + Exit Sub + End If + txtMaterialLotNo.Focus() + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + End Sub + + + Private Sub iugMaterial_Click(sender As Object, e As EventArgs) Handles iugMaterial.Click, IMESUltraGridControl1.Click + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + txtMaterialNo.Text = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + End Sub + + Private Sub iugStuInfo_iMESUltraGrid_AfterCellUpdate(sender As Object, e As CellEventArgs) Handles iugStuBasis.iMESUltraGrid_AfterCellUpdate + If e.Cell.Row.Cells("IsSelected").Value = 1 AndAlso e.Cell.Row.Cells("CheckFlag").Value = True Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%StudentNo%]已被选择!"), MsgBoxStyle.Exclamation, Me.Text) + e.Cell.Row.Cells("CheckFlag").Value = False + End If + End Sub + + Private Function funLoadTemp_LotState() As Integer + + funLoadTemp_LotState = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_LotState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTLotState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_lotstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_lotstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_lotstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_LotState = 0 + + + End Function + + '2019/10/17 Grace 查詢作業站資料 + Private Sub funLoadOPBasis(ByVal OPNo As String) + + If Not IsNothing(dsTemp.Tables(tblOPBasis)) Then + dsTemp.Tables.Remove(tblOPBasis) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("opno", "OPNo", "String", CInput(OPNo), "") + '2020/02/07 Grace 增加傳入GetXml_CLOB = false, 避免取回企業邏輯CLOB資料 + strParameter += CombineXMLParameter("getxml_clob", "GetXML_CLOB", "Boolean", False, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Dim XmlDoc As New XmlDocument + + Try + ' 2016 YF, Using wsOP As New wsOP.wsOP + ' 2016 YF, wsOP.Url = LocalizeWebService(wsOP.Url.ToString) + ' 2016 YF, wsOP.EnableDecompression = True + ' 2016 YF, OutXml = wsOP.LoadOPBasis(InXml) + OutXml = InvokeSrv("wsOP.LoadOPBasis", InXml) + + ' 2016 YF, End Using + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出 Tablename + tblOPBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadopbasis").Item(0).SelectNodes("name").Item(0).InnerXml + '//取出 Table Schma + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadopbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '//取出Attrib Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadopbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + End Sub + + '2020/02/26 Grace 查詢設備派工資料 + Private Sub funLoadWIPEQPDispatchState(Optional ByVal EquipmentNo As String = defString, Optional ByVal LotNo As String = defString, + Optional ByVal OPNo As String = defString, Optional ByVal DispatchDate As DateTime = defDateTime) + + If Not IsNothing(dsTemp.Tables(tblEQPDispatchState)) Then + dsTemp.Tables.Remove(tblEQPDispatchState) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = "" + If EquipmentNo <> defString Then strParameter += CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + If LotNo <> defString Then strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + If OPNo <> defString Then strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(OPNo), "") + If chkUpdCheckInTime.Checked And DispatchDate <> defDateTime Then + strParameter += CombineXMLParameter("dispatchdate", "DispatchDate", "String", dtpcheckintime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") + End If + + InXml = CombineXMLRequest(strIdentity, strParameter) + Dim XmlDoc As New XmlDocument + + Try + ' 2016 YF, Using wsOP As New wsOP.wsOP + ' 2016 YF, wsOP.Url = LocalizeWebService(wsOP.Url.ToString) + ' 2016 YF, wsOP.EnableDecompression = True + ' 2016 YF, OutXml = wsOP.LoadOPBasis(InXml) + OutXml = InvokeSrv("wsWIP.LoadWIPEQPDispatchState", InXml) + + ' 2016 YF, End Using + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出 Tablename + tblEQPDispatchState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadwipeqpdispatchstate").Item(0).SelectNodes("name").Item(0).InnerXml + '//取出 Table Schma + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipeqpdispatchstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '//取出Attrib Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipeqpdispatchstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + End Sub + + +#End Region + +#Region "Others" + + Private Function funInitialize() + + iugAttrib.iMESUltraGrid.Text = "Attrib" + iugAttrib.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugAttrib.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugAttrib.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + 'iugMaterial.iMESUltraGrid.Text = "Material" + iugMaterial.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugMaterial.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugMaterial.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + iugEquipment.iMESUltraGrid.Text = "Equipment" + iugEquipment.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugEquipment.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugEquipment.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + iugEquipment.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + '78912: 进站选择模治具时,如该机台领用多套模具,会默认选择第一套而不会选择产品作业站设定绑定使用的的模治具 + '78879: 若PRD主檔有設定限定模治具,則勾選各類別限定模治具的第一筆,設定為星號亦同,若未設定則不預勾 Edison 2020/10/15 + '===========================================78879 Start =========================================== + If Not dsWIP.Tables("AccState") Is Nothing Then + For Each r As DataRow In dsWIP.Tables("AccState").Rows + r("Select") = False + Next r + End If + + If Not dsWIP.Tables("PRDAccessory") Is Nothing AndAlso dsWIP.Tables("PRDAccessory").Rows.Count > 0 AndAlso Not dsWIP.Tables("AccState") Is Nothing Then + Dim blnChkACC As Boolean = False + + Dim dtAccType As DataTable = dsWIP.Tables("PRDAccessory").DefaultView.ToTable(True, "AccessoryType") + Dim drSelPRDACC() As DataRow + Dim drSelAccState() As DataRow + + For Each r As DataRow In dtAccType.Rows + drSelPRDACC = dsWIP.Tables("PRDAccessory").Select("AccessoryType = '" & r("AccessoryType") & "'") + If drSelPRDACC.Length > 0 Then + If drSelPRDACC(0)("AccessoryNo") <> "*" Then + drSelAccState = dsWIP.Tables("AccState").Select("AccessoryType = '" & drSelPRDACC(0)("AccessoryType") & "' AND AccessoryNo = '" & drSelPRDACC(0)("AccessoryNo") & "' ") + If drSelAccState.Length > 0 Then + drSelAccState(0)("Select") = True + End If + Else + drSelAccState = dsWIP.Tables("AccState").Select("AccessoryType = '" & drSelPRDACC(0)("AccessoryType") & "' ") + If drSelAccState.Length > 0 Then + drSelAccState(0)("Select") = True + End If + End If + End If + Next r + + End If + '===========================================78879 End =========================================== + + '78913: 【德瑞客户】CI画面放大画面后再缩小画面然后拉伸设备栏位会造成多个设备功能框 Edison 2020/09/24 + '================================ 78913 Start ================================ + '防止透過Scroll Bar分割Grid + iugEquipment.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugEquipment.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + '================================ 78913 End ================================ + + iugKeyIn.iMESUltraGrid.Text = "Key In" + iugKeyIn.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugKeyIn.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugKeyIn.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + iugKeyIn.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugKeyIn.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + + 'iugSubOP.iMESUltraGrid.Text = "Sub OP" + iugSubOP.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugSubOP.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugSubOP.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + 'iugSubOP.iMESUltraGrid.Text = "StuInfo" + '隐藏分组 + iugStuBasis.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + + + SBar1.Panels(0).Text = "UserNo:" & UserId + SBar1.Panels(3).Text = Format(datEventTime, "yyyy/MM/dd H:mm:ss") + + txtPriority.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + txtCurQty.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + txtSysQty.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + dtpcheckintime.Value = datEventTime + + btnConfirm.Enabled = True + 'btnMultiUser.Enabled = True + + '2019/10/17 Grace 依系統參數是否啟動多人加工, 且多人加工模式為生產批, 來決定是否顯示"多人加工"按鈕 + btnMultiUser.Visible = False + btnMultiUser.Enabled = False + + If Val(funGetSysParameter("MultiOperator")) Then + Call funLoadOPBasis(txtOPNo.Text) + If Not IsNothing(dsTemp.Tables(tblOPBasis)) Then + If dsTemp.Tables(tblOPBasis).Rows.Count > 0 Then + If dsTemp.Tables(tblOPBasis).Rows(0)("MultiOperatorMode").ToString = "5" Then + btnMultiUser.Visible = True + btnMultiUser.Enabled = True + End If + End If + End If + End If + + + ' 2016/12/26 YF, 依系統參數是否啟動多人加工來決定是否顯示"作業人員"按鈕 + Me.btnOperator.Visible = Val(funGetSysParameter("MultiOperator")) + + End Function + + Private Function funLotInfo_Show() + + RevLotSerial = dsWIP.Tables(tblLotState).Rows(0)("LotSerial") + RevLotStamp = dsWIP.Tables(tblLotState).Rows(0)("LotStamp") + LotSerial = dsWIP.Tables(tblLotState).Rows(0)("LotSerial") + LogGroupSerial = dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString + txtCurQty.Text = Format(dsWIP.Tables(tblLotState).Rows(0)("CurQty"), "0.####") + txtCurUnitNo.Text = dsWIP.Tables(tblLotState).Rows(0)("CurUnitNo").ToString + txtSysQty.Text = Format(dsWIP.Tables(tblLotState).Rows(0)("SysQty"), "0.####") + txtSysUnitNo.Text = dsWIP.Tables(tblLotState).Rows(0)("SysUnitNo").ToString + txtOPNo.Text = dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString + txtOpName.Text = dsWIP.Tables(tblLotState).Rows(0)("OPName").ToString + + '2009/05/11 Sophia.Pan R0905002 作業站編號及名稱加上ToolTip + ToolTip1.SetToolTip(Me.txtOPNo, dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString) + ToolTip1.SetToolTip(Me.txtOpName, dsWIP.Tables(tblLotState).Rows(0)("OPName").ToString) + + txtAreaNo.Text = dsWIP.Tables(tblLotState).Rows(0)("AreaNo").ToString + txtProductNo.Text = dsWIP.Tables(tblLotState).Rows(0)("ProductNo").ToString + PhaseNo = dsWIP.Tables(tblLotState).Rows(0)("PhaseNo") + + txtPriority.Text = dsWIP.Tables(tblLotState).Rows(0)("Priority") + If dsWIP.Tables(tblLotState).Rows(0)("Priority") = 1 Then + txtPriority.BackColor = System.Drawing.Color.Red + ElseIf dsWIP.Tables(tblLotState).Rows(0)("Priority") = 2 Then + txtPriority.BackColor = System.Drawing.Color.Yellow + ElseIf dsWIP.Tables(tblLotState).Rows(0)("Priority") = 3 Then + txtPriority.BackColor = System.Drawing.Color.LimeGreen + End If + txtMONo.Text = dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString + txtCustomerLotNo.Text = dsWIP.Tables(tblLotState).Rows(0)("CustomerLotNo").ToString + + End Function + + Private Sub funAddValueList_Attrib() + + iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists.Add("ASource") + With iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists("ASource").ValueListItems + .Clear() + .Add(0, "KeyIn") + .Add(1, "Calculate") + .Add(2, "System") + .Add(3, "Setup") + End With + + End Sub + + Private Function funGetSampleData() + + Cursor.Current = Cursors.WaitCursor + + '轉換抽樣參數 + Dim strAQLType, strAQL, strQCLevel, strTemp As String + + If dsWIP.Tables(tblTAttrib) Is Nothing Then Exit Function + + Dim drSel() As DataRow + + '若已轉換,不再轉 + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'SampleQty'") + If drSel.Length > 0 Then + If Not IsDBNull(drSel(0)("AttribValue")) Then + If drSel(0)("AttribValue") <> "" Then + Exit Function + End If + End If + End If + + 'AQLType + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AQLType'") + If drSel.Length > 0 Then + strAQLType = drSel(0)("AttribValue") + Else + strAQLType = defString + End If + 'AQL + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AQL'") + If drSel.Length > 0 Then + strAQL = drSel(0)("AttribValue") + Else + strAQL = defString + End If + 'QCLevel + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'QCLevel'") + If drSel.Length > 0 Then + strQCLevel = drSel(0)("AttribValue") + Else + strQCLevel = defString + End If + + drSel = Nothing + + If strAQLType = defString Or strAQL = defString Or strQCLevel = defString Then Exit Function + + '取出抽樣數 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("aqltype", "AQLType", "String", strAQLType, "") + strParameter += CombineXMLParameter("qty", "QTY", "Long", dsWIP.Tables(tblLotState).Rows(0)("CurQty"), "") + strParameter += CombineXMLParameter("qclevel", "QCLevel", "String", strQCLevel, "") + strParameter += CombineXMLParameter("aql", "AQL", "String", strAQL, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + Try + OutXml = InvokeSrv("wsQC.GetAQLQty", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + 'SampleQty + If XmlDoc.GetElementsByTagName("sampleqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("sampleqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'SampleQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%SampleQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + 'AcceptQty + If XmlDoc.GetElementsByTagName("acceptqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("acceptqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AcceptQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%AcceptQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + 'RejectQty + If XmlDoc.GetElementsByTagName("rejectqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("rejectqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'RejectQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%RejectQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + Cursor.Current = Cursors.Default + + End Function + + Private Function funGetActiveRows() As DataRow() + Dim Rows As DataRow() + Dim oRow As Infragistics.Win.UltraWinGrid.UltraGridRow + oRow = iugEquipment.iMESUltraGrid.ActiveRow + + If oRow Is Nothing Then + Return Nothing + End If + + '找出DataSet中在目前游標列的資料列(DataRow) + + Rows = dsWIP.Tables(tblAreaEquipment).Select( + "EquipmentNo ='" & Replace(oRow.Cells("EquipmentNo").Value.ToString, "'", "''") & "'") + + If Rows.Length = 0 Then + Return Nothing + Else + Return Rows + End If + End Function + + Private Function funMultiUser() As Integer + + funMultiUser = -1 + + If funLoadLotLoginState() < 0 Then Exit Function + + '產生多人加工暫存表 + dtTmpLoginState = New DataTable("TmpLoginState") + dtTmpLoginState.Columns.Add("UserNo", System.Type.GetType("System.String")) + dtTmpLoginState.Columns.Add("UserName", System.Type.GetType("System.String")) + dtTmpLoginState.Columns.Add("CheckInTime", System.Type.GetType("System.DateTime")) + + '檢查tblWIPLotLoginState內是否已有本站未登出的資料,若有,則不自動加入. + If dsWIP.Tables(tblLotLoginState).Rows.Count = 0 Then + drAdd = dtTmpLoginState.NewRow + drAdd("UserNo") = UserId + drAdd("UserName") = UserName + 'Kevin,2012/12/18,不取client端的時間作CI時間 + 'drAdd("CheckInTime") = datEventTime + dtTmpLoginState.Rows.Add(drAdd) + End If + + funMultiUser = 0 + + End Function + + Private Function funGetSysParameter(ByVal pParameterNo As String) As String + + funGetSysParameter = "0" + + '組InXml的字串 + strParameter = "" + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("parameterno", "ParameterNo", "String", CInput(pParameterNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + Dim XmlDoc As New XmlDocument + + OutXml = InvokeSrv("wsSYS.GetParameter", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + If XmlDoc.DocumentElement.SelectNodes("returnvalue").Count > 0 Then + funGetSysParameter = XmlDoc.DocumentElement("returnvalue").InnerXml + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + End Function + +#End Region + +#Region "取得設備參數" + + ' 2016/01/27 YF, 取得設備參數值 + Private Sub funGetEquipmentRecipe() + + Const FUNCTION_NAME As String = "#GETEQPRECIPE" + + Dim strEquipmentNo As String = "" + Dim XmlDoc As New XmlDocument + Dim SelRows() As DataRow + + Try + + ' 取出勾選的設備編號 + For Each row As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag = " & True, "EquipmentNo") + strEquipmentNo += row("EquipmentNo").ToString & "," + Next + + If (strEquipmentNo <> "") Then + strEquipmentNo = strEquipmentNo.TrimEnd(",") + End If + + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + + ' 逐筆判斷特性值的函式是否為#GETEQPRECIPE, 若是則至後端取回參數值 + For Each row As DataRow In dsWIP.Tables(tblTAttrib).Rows + + If (Microsoft.VisualBasic.Left(row("OrgAttribValue").ToString, FUNCTION_NAME.Length).ToUpper <> FUNCTION_NAME) Then + Continue For + End If + + ' 沒有挑選設備, 清空#GetEQPRecipe特性值 + If (strEquipmentNo = "") Then + row("AttribValue") = "" + Continue For + End If + + ' 取回設備參數 + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", strEquipmentNo, "") + strParameter += CombineXMLParameter("recipescript", "RecipeScript", "String", row("OrgAttribValue").ToString, "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsWIP.GetEquipmentRecipe", InXml) + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + If XmlDoc.GetElementsByTagName("itemvalue").Count > 0 Then + If XmlDoc.GetElementsByTagName("itemvalue").Item(0).SelectNodes("value").Count > 0 Then + row("AttribValue") = XmlDoc.DocumentElement.GetElementsByTagName("itemvalue").Item(0).SelectNodes("value").Item(0).InnerText + + ' 更新KeyIn的特性值 + SelRows = dtKeyIn.Select("AttribNo = '" & row("AttribNo") & "'") + + If (SelRows.Length > 0) Then + SelRows(0)("AttribValue") = row("AttribValue") + End If + + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Next + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + XmlDoc = Nothing + End Try + + End Sub + +#End Region + +#Region "用料檢查" + + ''' + ''' 2016/10/19 YF, 投料點用料檢查 + ''' + ''' + Private Function CheckMaterialByPutinPlace(ByVal pMONo As String, ByVal pMaterialLotNo As String, ByVal pMaterialNo As String) As Boolean + + Dim PutinPlace As Integer + Dim intInputFlag As Integer = 0 + Dim strTmpOrgMaterialNo As String = "" + Dim strTmpMaterialNo As String = "" + Dim strTmpMaterialLotNo As String = "" + Dim decQty As Decimal = 0 + Dim strCheckPlaceMsg As String = "" + + + '至工單發料區與線邊倉取出輸入的料批 + If funLoadMOMaterialState(dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString, txtMaterialLotNo.Text) < 0 Then Exit Function + If funLoadWIPInventory_Raw(pMaterialLotNo) < 0 Then Exit Function + If funLoadWIPInventory_SEMI(pMaterialLotNo) < 0 Then Exit Function + + '檢查是否有符合的物料編號與投料點 + + If dsWIP.Tables(tblMOMaterialState).Rows.Count > 0 Then '工單發料區 + + For Each drRaw As DataRow In dsWIP.Tables(tblMOMaterialState).Rows + '2020/10/30 Grace 先檢查輸入的物料編號, 相符後再往下找物料批號 + If drRaw("MaterialNo") = pMaterialNo Then + + 'Kevin 2013/1/2,不同主料替代料有可能相同,先檢查游標所選的主物料 + Dim drSelMTL As DataRow() + + drSelMTL = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & drRaw("MaterialNo") & "'" & + " And OrgMaterialNo ='" & iugMaterial.iMESUltraGrid.ActiveRow.Cells("OrgMaterialNo").Value & "'" & + " And PutInPlaceType = 3 ") + If drSelMTL.Length > 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = drSelMTL(0)("OrgMaterialNo") + strTmpMaterialNo = drRaw("MaterialNo") + strTmpMaterialLotNo = drRaw("MaterialLotNo") + decQty = drRaw("Qty") + End If + intInputFlag = 1 + Else + '全部主物料比對 + For Each dr As DataRow In dsWIP.Tables(tblTMaterial).Rows + '檢查物料編號 + If dr("MaterialNo") = drRaw("MaterialNo") Then + '檢查投料點 + If dr("PutInPlaceType") = 3 Then + Dim drSel() As DataRow + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select("MaterialNo='" & drRaw("MaterialNo") & "' And MaterialLotNo ='" & drRaw("MaterialLotNo") & "'") + If drSel.Length = 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = dr("OrgMaterialNo") + strTmpMaterialNo = drRaw("MaterialNo") + strTmpMaterialLotNo = drRaw("MaterialLotNo") + decQty = drRaw("Qty") + End If + intInputFlag = 1 + End If + Else + strCheckPlaceMsg = "[%MaterialLotNo%]:" & pMaterialLotNo & ",[%MaterialNo%]:" & + dr("MaterialNo") & " [%PutInPlace%][%is not%][%MO%] !" + End If + End If + Next + End If + + End If + Next + End If + + If dsWIP.Tables(tblWIPINVRaw).Rows.Count > 0 Then '線邊倉 + + For Each drRaw As DataRow In dsWIP.Tables(tblWIPINVRaw).Rows + + '2020/10/30 Grace 先檢查輸入的物料編號, 相符後再往下找物料批號 + If drRaw("MaterialNo") = pMaterialNo Then + + 'Kevin 2013/1/2,不同主料替代料有可能相同,先檢查游標所選的主物料 + Dim drSelMTL As DataRow() + drSelMTL = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & drRaw("MaterialNo") & "'" & + " And OrgMaterialNo ='" & iugMaterial.iMESUltraGrid.ActiveRow.Cells("OrgMaterialNo").Value & "'" & + " And PutInPlaceType = 2 ") + If drSelMTL.Length > 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = drSelMTL(0)("OrgMaterialNo") + strTmpMaterialNo = drRaw("MaterialNo") + strTmpMaterialLotNo = drRaw("MaterialLotNo") + decQty = drRaw("Qty") + End If + intInputFlag = 1 + Else + '全部主物料比對 + For Each dr As DataRow In dsWIP.Tables(tblTMaterial).Rows + '檢查物料編號 + If dr("MaterialNo") = drRaw("MaterialNo") Then + '檢查投料點 + If dr("PutInPlaceType") = 2 Then + Dim drSel() As DataRow + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select("MaterialNo='" & drRaw("MaterialNo") & "' And MaterialLotNo ='" & drRaw("MaterialLotNo") & "'") + If drSel.Length = 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = dr("OrgMaterialNo") + strTmpMaterialNo = drRaw("MaterialNo") + strTmpMaterialLotNo = drRaw("MaterialLotNo") + decQty = drRaw("Qty") + End If + intInputFlag = 1 + End If + Else + strCheckPlaceMsg = "[%MaterialLotNo%]:" & pMaterialLotNo & ",[%MaterialNo%]:" & + dr("MaterialNo") & " [%PutInPlace%][%is not%][%WIP INVENTORY%] !" + End If + End If + Next + End If + + End If + Next + End If + + If dsWIP.Tables(tblWIPINVSEMI).Rows.Count > 0 Then '半成品線邊倉 + + For Each drSEMI As DataRow In dsWIP.Tables(tblWIPINVSEMI).Rows + + '2020/10/30 Grace 先檢查輸入的物料編號, 相符後再往下找物料批號 + If drSEMI("ProductNo") = pMaterialNo Then + + 'Kevin 2013/1/2,不同主料替代料有可能相同,先檢查游標所選的主物料 + Dim drSelMTL As DataRow() + drSelMTL = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & drSEMI("ProductNo") & "'" & + " And OrgMaterialNo ='" & iugMaterial.iMESUltraGrid.ActiveRow.Cells("OrgMaterialNo").Value & "'" & + " And PutInPlaceType = 4 ") + If drSelMTL.Length > 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = drSelMTL(0)("OrgMaterialNo") + strTmpMaterialNo = drSEMI("ProductNo") + strTmpMaterialLotNo = drSEMI("LotNo") + decQty = drSEMI("Qty") + End If + intInputFlag = 1 + Else + '全部主物料比對 + For Each dr As DataRow In dsWIP.Tables(tblTMaterial).Rows + '檢查物料編號 + If dr("MaterialNo") = drSEMI("ProductNo") Then + '檢查投料點 + If dr("PutInPlaceType") = 2 Then + Dim drSel() As DataRow + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select("MaterialNo='" & drSEMI("ProductNo") & "' And MaterialLotNo ='" & drSEMI("LotNo") & "'") + If drSel.Length = 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = dr("OrgMaterialNo") + strTmpMaterialNo = drSEMI("ProductNo") + strTmpMaterialLotNo = drSEMI("LotNo") + decQty = drSEMI("Qty") + End If + intInputFlag = 1 + End If + Else + strCheckPlaceMsg = "[%MaterialLotNo%]:" & pMaterialLotNo & ",[%MaterialNo%]:" & + dr("MaterialNo") & " [%PutInPlace%][%is not%][%WIP INVENTORY%] !" + End If + End If + Next + End If + + End If + Next + End If + + If intInputFlag = 1 Then + + '2019/06/18 Shih Kai, Mantis:0058359 ,若物料為指定用料, 則不可使用替代料 + If funGetSysParameter("CIMTLDBCheck") = "1" Then + If dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & strTmpOrgMaterialNo & "' And Specified = 1").Length > 0 AndAlso + strTmpOrgMaterialNo <> strTmpMaterialNo Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203079", "[%MaterialNo%]:" & strTmpOrgMaterialNo), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + + Dim drAdd As DataRow + drAdd = dsWIP.Tables(tblTmpMTLLotNo).NewRow + drAdd("OrgMaterialNo") = strTmpOrgMaterialNo + drAdd("MaterialNo") = strTmpMaterialNo + drAdd("SUBSTITUTEMATERIALNO") = strTmpMaterialNo + drAdd("MaterialLotNo") = strTmpMaterialLotNo + drAdd("Qty") = decQty + dsWIP.Tables(tblTmpMTLLotNo).Rows.Add(drAdd) + Else + If strCheckPlaceMsg <> "" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", strCheckPlaceMsg), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202104", "[%MaterialLotNo%]!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + + '選到新加入的列 + Dim Vals(1) As Object + Dim PmyKey(1) As DataColumn + PmyKey(0) = dsWIP.Tables(tblTmpMTLLotNo).Columns("MaterialNo") + PmyKey(1) = dsWIP.Tables(tblTmpMTLLotNo).Columns("MaterialLotNo") + Vals(0) = strTmpMaterialNo + Vals(1) = strTmpMaterialLotNo + + ugrRow = FindRecordPosition_ByMutiCol(iugMaterial, PmyKey, Vals) + If Not ugrRow Is Nothing Then + iugMaterial.iMESUltraGrid.ActiveRow = ugrRow + iugMaterial.iMESUltraGrid.ActiveRow.Selected = True + End If + + Return True + + End Function + +#End Region + +#Region "物料數量檢查" + + Structure MethodNames + ''' + ''' 檢查物料數量 + ''' + Const funCheckMTLQuantity = "funCheckMTLQuantity" + End Structure + + Private Function funCheckMTL() As Boolean + + For Each row As DataRow In dsWIP.Tables(tblTMaterial).Rows + If dsWIP.Tables(tblTmpMTLLotNo).Select("OrgMaterialNo = '" & row("OrgMaterialNo") & "'").Length <= 0 Then + ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203083", + row("MaterialNo") & "[%IS NOT ENOUGH%], [%PLEASE%][%EXECUTE%][%MOUNTMATERIAL%]")) + Return False + End If + Next + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter &= CombineXMLParameter("checkin", "CheckIn", "Boolean", CInput(True), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP_Material.CheckMTLForBR", InXml, dtTmpMTLLotNo.Copy) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + + If Not ChkExecutionSuccess(XmlDoc) Then + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Return False + End If + + Dim xmlList As XmlNodeList = XmlDoc.GetElementsByTagName("message") + If xmlList.Count > 0 Then + xmlList = xmlList(0).SelectNodes("note") + If xmlList.Count > 0 Then + For Each xmlNode As XmlNode In xmlList + If funProcessMessages(xmlNode) = False Then Return False + Next + End If + End If + + Return True + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Function + Private Function funProcessMessages(ByVal xmlNode As XmlNode) As Boolean + + Dim MCode, MType, MMsg As String + MCode = xmlNode.SelectNodes("mcode").Item(0).InnerText + MType = xmlNode.SelectNodes("mtype").Item(0).InnerText + MMsg = xmlNode.SelectNodes("mmsg").Item(0).InnerText + + Dim methodName As String = "" + If MMsg.Contains("{") AndAlso MMsg.Contains("}") Then + Dim intStart As Int16 = MMsg.IndexOf("{") + Dim intEnd As Int16 = MMsg.IndexOf("}") + methodName = MMsg.Substring(intStart + 1, intEnd - intStart - 1) + MMsg = MMsg.Substring(intEnd + 1, MMsg.Length - intEnd - 1) + End If + + Select Case methodName + Case MethodNames.funCheckMTLQuantity + If ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-100601", MMsg), MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.No Then + Return False + End If + + Case Else + ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg(MCode, MMsg), MsgBoxStyle.Exclamation, Me.Text) + Return False + End Select + + Return True + + End Function +#End Region + + '取eSOP 工位及作業站 資料 + Private Function funLoadPRDeSOP() As Integer + + funLoadPRDeSOP = -1 + If Not IsNothing(dsDefine.Tables(tblPRDeSOPBasis)) Then dsDefine.Tables.Remove(tblPRDeSOPBasis) + + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = "" + strParameter += CombineXMLParameter("productno", "ProductNo", "String", CInput(txtProductNo.Text), "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(txtOPNo.Text), "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + Dim XmlDoc As New XmlDocument + Try + ' 2016 YF, OutXml = wsPRD.LoadPRDeSOPBasis(InXml) + OutXml = InvokeSrv("wsPRD.LoadPRDeSOPBasis", InXml) + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + tblPRDeSOPBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadprdesopbasis").Item(0).SelectNodes("name").Item(0).InnerXml + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadprdesopbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsDefine.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + '取出Data() + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadprdesopbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsDefine.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + Finally + XmlDoc = Nothing + + End Try + funLoadPRDeSOP = 0 + + End Function + '顯示作業指導書(eSOP) 2016-12-19 + Private Function funDisplayProcess() As Integer + Dim XmlDoc As New XmlDocument() + Dim InXml, OutXml As String + Dim strTempRecord As String = String.Empty + Dim arriveTime As DateTime = DateTime.Now + Dim strERP_URL_eSOP As String + Dim responseValue, code As String + + Dim strSplitFile() As String + + Try + '---- InXml ----- + Dim InXmlDoc As XmlDocument = New XmlDocument() + + ' + Dim nodeParam As XmlElement = InXmlDoc.CreateElement("param") + nodeParam.SetAttribute("key", "std_data") + nodeParam.SetAttribute("type", "xml") + InXmlDoc.AppendChild(nodeParam) + + ' + Dim nodeDataRequest As XmlElement = InXmlDoc.CreateElement("data_request") + nodeParam.AppendChild(nodeDataRequest) + + ' + Dim nodeDataInfo As XmlElement = InXmlDoc.CreateElement("datainfo") + nodeDataRequest.AppendChild(nodeDataInfo) + + ' + Dim nodeParameter As XmlElement = InXmlDoc.CreateElement("parameter") + nodeParameter.SetAttribute("key", "sop_display") + nodeParameter.SetAttribute("type", "data") + nodeDataInfo.AppendChild(nodeParameter) + + ' + Dim nodeData As XmlElement = InXmlDoc.CreateElement("data") + nodeData.SetAttribute("name", "sop_display") + nodeParameter.AppendChild(nodeData) + + For Each drData As DataRow In dsDefine.Tables(tblPRDeSOPBasis).Rows + If drData("POSITIONNO") = "N/A" Then Continue For + 'sop no + strSplitFile = Split(drData("SOPFILE"), ".") + '顯示作業說明書必傳實體檔案,工位,執行時間 + ' + Dim nodeRow As XmlElement = InXmlDoc.CreateElement("row") + nodeRow.SetAttribute("seq", intRow) + nodeData.AppendChild(nodeRow) + + Dim nodeDField As XmlElement + ''sop編號 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_no") + nodeDField.SetAttribute("type", "string") + 'nodeDField.InnerText = strSplitFile(0) + nodeDField.InnerText = "" + nodeRow.AppendChild(nodeDField) + '指定版號: Y:指定 N:不指定 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_ver_assign") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = "" + nodeRow.AppendChild(nodeDField) + '版本 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_ver") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = "" + nodeRow.AppendChild(nodeDField) + '頁數 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_page") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = drData("PAGENO") + nodeRow.AppendChild(nodeDField) + '工位編號 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "station_no") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = drData("POSITIONNO") + nodeRow.AppendChild(nodeDField) + '實體檔名 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_file") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = drData("SOPFILE") + nodeRow.AppendChild(nodeDField) + '傳送時間 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "report_datetime") + nodeDField.SetAttribute("type", "date") + nodeDField.SetAttribute("format", "yyyyMMddHHmmss") + nodeDField.InnerText = Now.ToString("yyyyMMddHHmmss") + nodeRow.AppendChild(nodeDField) + '備註 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "remark") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = "" + nodeRow.AppendChild(nodeDField) + intRow = intRow + 1 + Next + Using obj As New COM_ERP.clsEAI + InXml = obj.funGenerateRequestXML(COM_ERP.clsEAI.ERPName.eSOP, InXmlDoc.InnerXml, "sop.display.process", False) + strERP_URL_eSOP = obj.getERP_WSURL(COM_ERP.clsEAI.ERPName.eSOP) + End Using + + '----- Call Web Service ----- + Using ws As New COM_ERP.wsESOP.eSOPService + + ws.Url = strERP_URL_eSOP + OutXml = ws.sop_display_process(InXml) + End Using + + code = "success" + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + code = "fail" + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + code = "fail" + Finally + + '紀錄TransactionLog + COM_ERP.clsCommon.addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "station.get", My.Computer.Name, + gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "station.get", LogClass:="WIP") + End Try + End Function + +#Region "作業人員" + + ''' + ''' 2016/12/26 YF, 顯示作業人員現況資訊 + ''' + ''' + ''' + Private Sub btnOperator_Click(sender As Object, e As EventArgs) Handles btnOperator.Click + + Dim parameters As Dictionary(Of String, Object) + Dim EquipmentNo As String = "" + + Try + + parameters = New Dictionary(Of String, Object) + + With dsWIP.Tables(tblLotState).Rows(0) + + Select Case .Item("MultiOperatorMode").ToString + Case "0" + ' 作業站 + parameters.Add("OPNo", .Item("OPNo").ToString) + Case "1" + ' 區域 + parameters.Add("AreaNo", .Item("AreaNo").ToString) + Case "2" + ' 設備 + For Each row As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag = True") + EquipmentNo += row("EquipmentNo") & "," + Next + + If (EquipmentNo = "") Then + Throw New iMESException.MESException("0000-103010", "[%PLEASE SELECT%] [%EQUIPMENT%]!") + End If + + EquipmentNo = EquipmentNo.TrimEnd(",") + parameters.Add("EquipmentNo", EquipmentNo) + Case "5" 'Mantis 63873: 增加判斷多人加工模式為生產批, 並傳入資料 + ' 生產批 + parameters.Add("LotNo", .Item("LotNo").ToString) + Case Else + Throw New iMESException.MESException("0000-003000", "[%MultiOperatorMode%]:" & .Item("MultiOperatorMode").ToString & " [%NOT DEFINE%]!") + End Select + + End With + + parameters.Add("EnableSignOut", False) + Me.ObjectFileHandler.Execute(pObjectID:="WP_OperatorOnline", pParameters:=parameters) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + +#End Region + + '2019/01/18 Eric 特殊生產需求顯示 + Private Sub btnSWR_Click(sender As System.Object, e As System.EventArgs) Handles btnSWR.Click + '2019/02/12 Eric 加入判斷有無資料 + If blnShowSWR = True Then + + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("MONo", txtMONo.Text) + Parameters.Add("CustomerLotNo", txtCustomerLotNo.Text) + Parameters.Add("OPNo", txtOPNo.Text) + Parameters.Add("LotNo", txtLotNo.Text) + Parameters.Add("DeviceNo", dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString) + Parameters.Add("CustomerNo", dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString) + Parameters.Add("LogGroupSerial", dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString) + Parameters.Add("blnCICo", False) + Me.ObjectFileHandler.Execute("WP_SWRBasisRead", Parameters) + + btnSWR.Visible = True + + End If + + End Sub + + '2019/02/12 Eric + Private Sub funLoadSWRJoinLog() + + Cursor.Current = Cursors.WaitCursor + + + If Not IsNothing(dsWIP.Tables(tblSWRJoinLog)) Then + dsWIP.Tables.Remove(tblSWRJoinLog) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("loggroupserial", "LogGroupSerial", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString), "") + strParameter += CombineXMLParameter("customerno", "CustomerNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(txtLotNo.Text), "") + strParameter += CombineXMLParameter("deviceno", "DeviceNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString), "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(txtOPNo.Text), "") + strParameter += CombineXMLParameter("customerlotno", "CustomerLotNo", "String", CInput(txtCustomerLotNo.Text), "") + strParameter += CombineXMLParameter("mono", "MONo", "String", CInput(txtMONo.Text), "") + strParameter += CombineXMLParameter("status", "Status", "Integer", 2, "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + + OutXml = InvokeSrv("wsWIP.LoadSWRBasisJoinLog", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSWRJoinLog = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadswrbasisjoinlog").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadswrbasisjoinlog").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadswrbasisjoinlog").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub funLoadAllMaterialLot() + + Dim drAdd As DataRow + Dim drSel As DataRow() + Dim defNullDate As Date = CDate("9999/12/31") '製造日期或保存期限為Null時, 填入9999/12/31, 以防步Null錯誤, 因Null表示不受管控, 可以較後使用, 故填入較大的值 + + dtAllMTLLot = New DataTable("AllMTLLot") + dtAllMTLLot.Columns.Add("MaterialNo", System.Type.GetType("System.String")) '主料號 + dtAllMTLLot.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtAllMTLLot.Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dtAllMTLLot.Columns.Add("MFGDate", System.Type.GetType("System.DateTime")) + dtAllMTLLot.Columns.Add("ExpireDate", System.Type.GetType("System.DateTime")) + dtAllMTLLot.Columns.Add("InputDate", System.Type.GetType("System.DateTime")) + + dtAllMTLLot.Columns.Add("SubstituteMaterialNo", System.Type.GetType("System.String")) '新增一替代料欄位,2010/03/26,by yumei, 實際用料的料號 + dtAllMTLLot.Columns.Add("SubstituteMaterialLevel", System.Type.GetType("System.Int16")) '新增一替代料位階欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("SubstituteMaterialType", System.Type.GetType("System.String")) '新增一替代料類型欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("SubstituteStdQty", System.Type.GetType("System.Decimal")) '新增一替代料標準用量欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) '新增一替代料是否檢查批號欄位,2013/01/08,by Kevin + + dtAllMTLLot.Columns.Add("SeqNo", System.Type.GetType("System.Int16")) '記錄同料號間各料批應被使用的次序 + dtAllMTLLot.Columns.Add("blnExpireDate", System.Type.GetType("System.Boolean")) '紀錄是否有超過有效期限 有:True 沒有:False + + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + + Case "0" ' 發料點(線邊倉或工單) + '將Temp_Material中各主料所有可用料批全數取出, 存入dtAllMTLLot中 + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + If drMTL("LOTNO").ToString <> "" Then + Call funLoadSubstituteMaterial_Main(LotNo, drMTL("MaterialNo"), drMTL("UnitNo")) + For Each drMTLLot As DataRow In dsWIP.Tables(tblSubstituteMaterial).Rows + drAdd = dtAllMTLLot.NewRow + drAdd("MaterialNo") = drMTL("MaterialNo") 'BOM的主料號 + drAdd("MaterialLotNo") = drMTLLot("MaterialLotNo") + drAdd("Qty") = drMTLLot("Qty") + 'drAdd("MFGDate") = drMTLLot("ManufactureDate") + 'drAdd("ExpireDate") = drMTLLot("ExpireDate") + If drMTLLot("ManufactureDate").ToString = "" Then + drAdd("MFGDate") = defNullDate + Else + drAdd("MFGDate") = drMTLLot("ManufactureDate") + End If + If drMTLLot("ExpireDate").ToString = "" Then + drAdd("ExpireDate") = defNullDate + Else + drAdd("ExpireDate") = drMTLLot("ExpireDate") + End If + If drMTLLot("InputDate").ToString = "" Then + drAdd("InputDate") = defNullDate + Else + drAdd("InputDate") = drMTLLot("InputDate") + End If + + drAdd("SubstituteMaterialNo") = drMTLLot("MaterialNo") '實際料號, 有可能與主料號同也有可能是替代料號 + drAdd("SubstituteMaterialLevel") = drMTLLot("SubstituteMaterialLevel") + drAdd("SubstituteMaterialType") = drMTLLot("SubstituteMaterialType") + drAdd("SubstituteStdQty") = drMTLLot("SubstituteStdQty") + drAdd("CheckLotNo") = drMTLLot("CheckLotNo") + dtAllMTLLot.Rows.Add(drAdd) + Next + End If + Next + + '計算同一料號各料批的使用次序 + Dim dvAllMTLLot, dvTemp As DataView + Dim dtTemp As DataTable + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + If drMTL("LOTNO").ToString <> "" Then + 'drSel = dtAllMTLLot.Select("MaterialNo = '" & drMTL("MaterialNo") & "'", "MFGDate, ExpireDate, InputDate") + 'For idx As Integer = 0 To drSel.Length - 1 + ' drSel(idx)("SeqNo") = idx + 1 + 'Next + dvAllMTLLot = New DataView(dtAllMTLLot) + dvAllMTLLot.RowFilter = "MaterialNo = '" & drMTL("MaterialNo") & "'" + dtTemp = dvAllMTLLot.ToTable(True, {"MFGDate", "ExpireDate", "InputDate"}) '對製造日期,有效日期,入庫日做Distinct篩選 + dvTemp = dtTemp.DefaultView + dvTemp.Sort = "MFGDate, ExpireDate, InputDate" + '當MFGDate, ExpireDate, InputDate皆相同時, 需給予相同的SeqNo, 故以Distinct的三個日期下去跑Loop + For idx As Integer = 0 To dvTemp.Count - 1 + drSel = dtAllMTLLot.Select("MaterialNo = '" & drMTL("MaterialNo") & "'" & + "And MFGDate = #" & Format(dvTemp(idx)("MFGDate"), "yyyy/MM/dd HH:mm:ss") & "#" & + " And ExpireDate = #" & Format(dvTemp(idx)("ExpireDate"), "yyyy/MM/dd HH:mm:ss") & "#" & + " And InputDate = #" & Format(dvTemp(idx)("InputDate"), "yyyy/MM/dd HH:mm:ss") & "#") + For j As Integer = 0 To drSel.Length - 1 + drSel(j)("SeqNo") = idx + 1 + If Now > CDate(drSel(j)("EXPIREDATE")) Then '判定是否超過有效期限 + drSel(j)("blnExpireDate") = True + Else + drSel(j)("blnExpireDate") = False + End If + Next + Next + End If + Next + + End Select + + End Sub + +#Region "CheckEQPQCList" + + Private Function funCheckEQPQCList(ByVal EquipmentNo As String, ByRef CheckResult As String) As Integer + + funCheckEQPQCList = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.CheckEQPQCList", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出CheckResult + If XmlDoc.GetElementsByTagName("checkresult").Item(0).SelectNodes("value").Count > 0 Then + CheckResult = XmlDoc.DocumentElement.GetElementsByTagName("checkresult").Item(0).SelectNodes("value").Item(0).InnerText + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funCheckEQPQCList = 0 + + End Function + + Private Function funCheckEQPQCTask(ByVal EquipmentNo As String, Optional ByVal CancelUpdate As Boolean = False) As Integer + + funCheckEQPQCTask = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("cancelupdate", "CancelUpdate", "Boolean", CancelUpdate, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.CheckEQPQCTask", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funCheckEQPQCTask = 0 + + End Function + +#End Region + + +#Region "ChkCIEQPDispatch" + ''2023/05/29 ,0135702: [6.0.7] SDD220425_01-03_進站設備派工查核調整,19245 + Private Sub ChkCIEQPDispatch(ByVal EquipmentNo As String, ByVal LotNo As String, Optional OpNo As String = defString) + + If Not IsNothing(dsEQP) Then + dsEQP.Clear() + dsEQP.Dispose() + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Dim XmlDoc As New XmlDocument + Try + OutXml = InvokeSrv("wsWIP.ChkCIEQPDispatch", InXml) + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + ckhEQPDispatchRule = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("chkcieqpdispatch").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("chkcieqpdispatch").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsEQP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("chkcieqpdispatch").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsEQP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + End Sub + +#End Region + Private Sub DeleteTmpMTLLotNo(ByVal EquipmentNo As String) + + Dim drSelTmpMTL As DataRow() = dsWIP.Tables(tblTmpMTLLotNo).Select("EquipmentNo = '" & EquipmentNo & "'") + For i As Integer = drSelTmpMTL.Count - 1 To 0 Step -1 + drSelTmpMTL(i).Delete() + Next + dsWIP.Tables(tblTmpMTLLotNo).AcceptChanges() + + End Sub + Private Sub LoadMaterialByEquipment(ByVal EquipmentNo As String) + + Try + DeleteTmpMTLLotNo(EquipmentNo) + + Dim MONo As String = dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString + Dim OrgMaterialNo As String + ' 依設備及工單取出設備上料現況 + Dim dtMaterialState As DataTable + If (Not LoadEQPMaterialState(dtMaterialState, EquipmentNo, MONo)) Then + Exit Sub + End If + + ' 寫入暫存表 + For Each r As DataRowView In dtMaterialState.DefaultView + 'Dim drSel() As DataRow = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & r("MaterialNo") & "' ") + '物料表中的materialno是* 改成InputMaterialNo 14278 + Dim drSel() As DataRow = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & r("InputMaterialNo") & "' ") + If drSel.Length > 0 Then + '根据实际用料 投料点 和检查料批 找到用料清单的数据 原物料-------- + Dim drSel1() As DataRow = dsOE.Tables(strMOList).Select("SubstituteMaterialNo='" & r("InputMaterialNo").ToString & "' and PutInPlaceType='" & drSel(0)("PutInPlaceType") & "' AND CheckLotNo='" & drSel(0)("CHECKLOTNO") & "'") + If drSel1.Length > 0 Then + OrgMaterialNo = drSel1(0)("MATERIALNO").ToString() + End If + ''---------------------- + If drSel(0)("PutInPlaceType") = 3 Then + If r("MONO").ToString.ToUpper = MONo.ToUpper Then + Dim drAdd As DataRow = dsWIP.Tables(tblTmpMTLLotNo).NewRow + drAdd("EquipmentNo") = r("EquipmentNo") + 'drAdd("OrgMaterialNo") = r("MaterialNo").ToString 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("OrgMaterialNo") = OrgMaterialNo 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("SUBSTITUTEMATERIALNO") = r("InputMaterialNo").ToString + drAdd("MaterialNo") = r("InputMaterialNo").ToString 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("MaterialLotNo") = r("MaterialLotNo").ToString 'pMaterialLotNo + drAdd("Qty") = r("Qty") + dsWIP.Tables(tblTmpMTLLotNo).Rows.Add(drAdd) + End If + ElseIf drSel(0)("PutInPlaceType") = 2 OrElse drSel(0)("PutInPlaceType") = 4 Then + If r("MONO").ToString.ToUpper = "N/A" Then + Dim drAdd As DataRow = dsWIP.Tables(tblTmpMTLLotNo).NewRow + drAdd("EquipmentNo") = r("EquipmentNo") + 'drAdd("OrgMaterialNo") = r("MaterialNo").ToString 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("OrgMaterialNo") = OrgMaterialNo 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("SUBSTITUTEMATERIALNO") = r("InputMaterialNo").ToString + drAdd("MaterialNo") = r("InputMaterialNo").ToString 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("MaterialLotNo") = r("MaterialLotNo").ToString 'pMaterialLotNo + drAdd("Qty") = r("Qty") + dsWIP.Tables(tblTmpMTLLotNo).Rows.Add(drAdd) + End If + End If + End If + Next + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + Private Sub uegMaterial_KeyIn2_ExpandedStateChanged(sender As Object, e As EventArgs) Handles uegMaterial_KeyIn2.ExpandedStateChanged, uegAttrib_Equipment.ExpandedStateChanged + + If uegMaterial_KeyIn2.Expanded Then + + If uegAttrib_Equipment.Expanded Then + uegMaterial_KeyIn2.Size = New System.Drawing.Size(uegMaterial_KeyIn2.Width, (uplAll.Height - uegLotInfo.Height) / 2 - 10) + uegAttrib_Equipment.Size = New System.Drawing.Size(uegAttrib_Equipment.Width, (uplAll.Height - uegLotInfo.Height) / 2 - 10) + End If + + Else + + If uegAttrib_Equipment.Expanded Then + uegAttrib_Equipment.Size = New System.Drawing.Size(uegAttrib_Equipment.Width, uplAll.Height - uegLotInfo.Height - 20) + End If + + End If + + End Sub +#Region "'//^_^ADD BY H-14278 2023-12-29 新设备上料" + ''' + ''' 获取工单用料清单 + ''' + ''' + ''' + Private Sub funLoadMOMaterialList(ByVal MONo As String, ByVal OPNo As String) '//取出MO MaterialList資料 + + + Dim i, j As Integer + + If Not IsNothing(dsOE.Tables(strMOList)) Then '修正用料清單多次查詢重複計算問題 + dsOE.Tables.Remove(strMOList) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("mono", "MONo", "String", MONo.ToUpper, "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", OPNo.ToUpper, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsOE.LoadMOMaterialListJoinMOBasis(InXml) + OutXml = InvokeSrv("wsOE.LoadMOMaterialListJoinMOBasis", InXml) + + '利用XmlDoc物件處理ReturnValue + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + + strMOList = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmomateriallistjoinmobasis").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmomateriallistjoinmobasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsOE.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmomateriallistjoinmobasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsOE.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + XmlDoc = Nothing + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load MO Material List Failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + + Finally + tmpStringReader = Nothing + End Try + + End Sub + +#End Region + +End Class diff --git a/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/iMES.snk b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/iMES.snk new file mode 100644 index 0000000..4206cdc Binary files /dev/null and b/SRC/MESWin/SXS1/BR_L_CI_GEN_21685/iMES.snk differ diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.sln b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.sln new file mode 100644 index 0000000..6cd5641 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.sln @@ -0,0 +1,42 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BR_L_CO_GEN", "BR_L_CO_GEN.vbproj", "{380C6B38-FB64-49BE-A9A8-5E49015ADFD2}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Test", "..\..\Test\Test.vbproj", "{C4A48E3F-38E4-4E88-A47D-FA5510686E57}" + ProjectSection(ProjectDependencies) = postProject + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2} = {380C6B38-FB64-49BE-A9A8-5E49015ADFD2} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2}.Debug|x86.ActiveCfg = Debug|x86 + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2}.Debug|x86.Build.0 = Debug|x86 + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2}.Release|x86.ActiveCfg = Release|x86 + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2}.Release|x86.Build.0 = Release|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Debug|x86.ActiveCfg = Debug|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Debug|x86.Build.0 = Debug|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Release|x86.ActiveCfg = Release|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(TeamFoundationVersionControl) = preSolution + SccNumberOfProjects = 3 + SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} + SccTeamFoundationServer = http://tfs.imestech.com:8080/tfs/messeries6 + SccLocalPath0 = . + SccProjectUniqueName1 = ..\\..\\Test\\Test.vbproj + SccProjectName1 = ../../Test + SccLocalPath1 = ..\\..\\Test + SccProjectUniqueName2 = BR_L_CO_GEN.vbproj + SccLocalPath2 = . + EndGlobalSection +EndGlobal diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj new file mode 100644 index 0000000..c4c85fc --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj @@ -0,0 +1,247 @@ + + + + + Debug + x86 + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2} + Library + BR_L_CO_GEN + BR_L_CO_GEN + 512 + Windows + v4.6.2 + + SAK + SAK + SAK + SAK + + + true + full + true + true + ..\..\..\MESClient\ + BR_L_CO_GEN.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 0 + false + + + pdbonly + false + true + true + bin\Release\ + BR_L_CO_GEN.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 0 + false + + + On + + + Binary + + + Off + + + On + + + true + true + true + ..\..\..\MESClient\ + BR_L_CO_GEN.xml + 0 + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + full + x86 + MinimumRecommendedRules.ruleset + false + + + true + ..\..\..\MESClient\ + BR_L_CO_GEN.xml + true + 0 + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + pdbonly + x86 + MinimumRecommendedRules.ruleset + false + + + true + + + iMES.snk + + + + False + ..\..\..\MES_C_DLL\iMESWizards.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinGrid.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinEditors.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.Misc.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Shared.v19.1.dll + False + + + False + ..\..\..\MESClient\COM_ERP.dll + False + + + ..\..\..\MESClient\COM_Kit.dll + False + + + False + ..\..\..\MESClient\COM_Search.dll + False + + + False + ..\..\..\MESClient\COM_Utility.dll + False + + + ..\..\..\MES_C_DLL\iMESException.dll + False + + + ..\..\..\MES_C_DLL\iMESExceptionManager.dll + False + + + ..\..\..\MES_C_DLL\iMESUltraGrid.dll + False + + + + + + + + + + + + + + False + ..\..\..\MESClient\WP_Kit.dll + False + + + + + + + + + + + + + + + + + + + + + + + modConstant.vb + + + Form + + + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + frmBinStateAdjust .vb + + + frmBR_L_CO_GEN.vb + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj.user b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj.user new file mode 100644 index 0000000..9b86104 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj.user @@ -0,0 +1,6 @@ + + + + ShowAllFiles + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj.vspscc b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj.vspscc new file mode 100644 index 0000000..b6d3289 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/BR_L_CO_GEN.vbproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Application.Designer.vb b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Application.Designer.vb new file mode 100644 index 0000000..4f9342a --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Application.myapp b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Application.myapp new file mode 100644 index 0000000..758895d --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/AssemblyInfo.vb b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..0e7d318 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' 組件的一般資訊是由下列的屬性集控制。 +' 變更這些屬性的值即可修改組件的相關 +' 資訊。 + +' 檢閱組件屬性的值 + + + + + + + + + + +'下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID + + +' 組件的版本資訊由下列四個值所組成: +' +' 主要版本 +' 次要版本 +' 組建編號 +' 修訂編號 +' +' 您可以指定所有的值,也可以依照以下的方式,使用 '*' 將組建和修訂編號 +' 指定為預設值: +' + + + diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/BuildIncrementVersionInfo.vb b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/BuildIncrementVersionInfo.vb new file mode 100644 index 0000000..5b9b9b2 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/BuildIncrementVersionInfo.vb @@ -0,0 +1 @@ + diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Resources.Designer.vb b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Resources.Designer.vb new file mode 100644 index 0000000..c23eff7 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + '這個類別是自動產生的,是利用 StronglyTypedResourceBuilder + '類別透過 ResGen 或 Visual Studio 這類工具。 + '若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen + '(利用 /str 選項),或重建您的 VS 專案。 + ''' + ''' 用於查詢當地語系化字串等的強類型資源類別。 + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' 傳回這個類別使用的快取的 ResourceManager 執行個體。 + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BR_L_CO_GEN.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有 + ''' 使用這個強類型資源類別的資源查閱。 + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Resources.resx b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Settings.Designer.vb b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Settings.Designer.vb new file mode 100644 index 0000000..df0daf8 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings 自動儲存功能" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.BR_L_CO_GEN.My.MySettings + Get + Return Global.BR_L_CO_GEN.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Settings.settings b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Settings.settings new file mode 100644 index 0000000..f7f176a --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/Settings.settings @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/licenses.licx b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/licenses.licx new file mode 100644 index 0000000..d8bdaee --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/My Project/licenses.licx @@ -0,0 +1,5 @@ +Infragistics.Win.UltraWinEditors.UltraTextEditor, Infragistics4.Win.UltraWinEditors.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraPanel, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraSplitter, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraButton, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraExpandableGroupBox, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBR_L_CO_GEN.resx b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBR_L_CO_GEN.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBR_L_CO_GEN.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBR_L_CO_GEN.vb b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBR_L_CO_GEN.vb new file mode 100644 index 0000000..7532966 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBR_L_CO_GEN.vb @@ -0,0 +1,6624 @@ +Imports iMESExceptionManager + +Imports Infragistics.Win.UltraWinGrid +Imports COM_ERP.clsTipTop +Imports COM_ERP.clsTipTop_ICD +Imports COM_ERP.clsCommon +Imports Infragistics.Win + +''' +''' 2016/12/26 YF, 增加新制多人加工(btnOperator), 先將舊有的多人加工隱藏(btnMultiUser) +''' +Public Class frmBR_L_CO_GEN + Inherits System.Windows.Forms.Form + + '//Public Variables + Public LotNo As String = defString + Public UserId As String = defString + Public PrivFunNo As String = defString + + '//Web Service相關變數 + Dim tmpStringReader As System.IO.StringReader + Dim InXml, OutXml, strIdentity, strParameter, XmlData, XmlSchema As String + + '//資料表相關變數 + Dim dsWIP, dsTemp, dsDefine As New DataSet + Dim dtKeyIn, dtMLot As DataTable + Dim drAdd As DataRow + Dim tbllotbasis, tblLotState, tblTAttrib, tblStuInfo, tblTMaterial, tblTEquipment, tblOPError, tblSYSParameter, tblProductBasis, tblOEMOBasis, tblParameter, tblSWRJoinLog, strBinState, strSysBin As String + Dim tblSubstituteMaterial, tblOPBasis As String + + '//其他共用變數 + Dim PhaseNo As Integer + Dim ugrRow As Infragistics.Win.UltraWinGrid.UltraGridRow + Dim calCustomer As New clsCalculator + Dim dvSysBin As DataView + Dim dtBinNew As DataTable + Dim iGoodBinStateQty As Integer = 0 + 'Reverse + Dim RevLotSerial As String = defString + Dim RevLotStamp As Long = defInteger + Dim strDefaultValue As String + Dim editor As Infragistics.Win.DateTimeEditor + + ' 2016/08/30 YF, ObjectFile物件 + Dim ObjectFileHandler As COM_Utility.ObjectFileHandler + '2019/01/19 Eric 系統參數EnableSWR_CICO + Dim strEnableSWR_CICO As String = defString + '2019/02/12 Eric 特殊生產需求是否有資料 + Dim blnShowSWR As Boolean = False + + '2019/9/5, ning, 料批先進先出與回溫卡控 + Dim dtAllMTLLot As DataTable '所有可用料批資料 + Dim tblTMaterialLot, tblMTLProperty As String + + Dim blnByEQP As Boolean = False + Dim HaveComponent, HaveLevel As Boolean + + Dim strTableName As String + Dim vlMaterialLevel As New ValueList + Dim vlStuInfoIsSelected As New ValueList + Dim dsINV As New DataSet + Dim strRaw As String + '2021/06/10 子設備 + Dim strPara As String + Dim blnChamber As Boolean + '新设备上料14278 + Dim dsOE As New DataSet '資料集:儲存取回之資料? + Dim strMOList As String '儲存取回資料表的名稱? + + Friend WithEvents chkUpdCheckOutTime As CheckBox + Friend WithEvents txtUnionProductNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtUnionProductVersion As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents btnGetProduct As Infragistics.Win.Misc.UltraButton + Friend WithEvents txtUnionProductUnit As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents btnSWR As Infragistics.Win.Misc.UltraButton + Friend WithEvents chkUnionProductNo As CheckBox + Friend WithEvents btnBinStateAdjust As Infragistics.Win.Misc.UltraButton + Friend WithEvents uplAll As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uegMaterial_KeyIn2 As Infragistics.Win.Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel4 As Infragistics.Win.Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel4 As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uplMaterial_KeyIn As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uplKeyIn As Infragistics.Win.Misc.UltraPanel + Friend WithEvents UltraSplitter2 As Infragistics.Win.Misc.UltraSplitter + Friend WithEvents uplMaterial As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uegAttrib_Equipment As Infragistics.Win.Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel2 As Infragistics.Win.Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel2 As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uplAttrib_Equipment As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uplEquipment As Infragistics.Win.Misc.UltraPanel + Friend WithEvents UltraSplitter1 As Infragistics.Win.Misc.UltraSplitter + Friend WithEvents uplAttrib As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uegLotInfo As Infragistics.Win.Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel1 As Infragistics.Win.Misc.UltraExpandableGroupBoxPanel + Friend WithEvents iugStuInfo As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents UltraPanel1 As Infragistics.Win.Misc.UltraPanel + +#Region " Windows Form 設計工具產生的程式碼 " + + Public Sub New() + MyBase.New() + + '此呼叫為 Windows Form 設計工具的必要項。 + + InitializeComponent() + + '在 InitializeComponent() 呼叫之後加入所有的初始設定 + ' 2016/08/30 YF, 開另一條執行緒建立會使用到的物件 + Threading.ThreadPool.QueueUserWorkItem(New Threading.WaitCallback( + Sub(pState As Object) + ' 呼叫COM_Utility.ObjectFileHandler建構子, 傳入要載入的ObjectID + Me.ObjectFileHandler = New COM_Utility.ObjectFileHandler("WP_OperatorLogIn_Lot", "WP_MaterialQtyInput_Main", "WP_SWRBasisRead") + End Sub)) + + End Sub + + 'Form 覆寫 Dispose 以清除元件清單。 + + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing Then + If Not (components Is Nothing) Then + components.Dispose() + End If + End If + MyBase.Dispose(disposing) + End Sub + + '為 Windows Form 設計工具的必要項 + Private components As System.ComponentModel.IContainer + + '注意: 以下為 Windows Form 設計工具所需的程序 + + '您可以使用 Windows Form 設計工具進行修改。 + + '請勿使用程式碼編輯器來修改這些程序。 + + Friend WithEvents txtMaterialLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblMaterialLotNo As System.Windows.Forms.Label + Friend WithEvents btnOperator As Infragistics.Win.Misc.UltraButton + Friend WithEvents SBar1 As System.Windows.Forms.StatusBar + Friend WithEvents SBarPanel1 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel4 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel2 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel3 As System.Windows.Forms.StatusBarPanel + Friend WithEvents txtOPNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblOPDescription As System.Windows.Forms.Label + Friend WithEvents txtProductNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblProductNo As System.Windows.Forms.Label + Friend WithEvents txtCustomerLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtMONo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtShiftNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtEmployeeNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtAreaNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtPriority As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtSysUnitNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtSysQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCurUnitNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCurQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtOPDescription As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblPriority As System.Windows.Forms.Label + Friend WithEvents lblMONo As System.Windows.Forms.Label + Friend WithEvents lblCustomerLotNo As System.Windows.Forms.Label + Friend WithEvents lblShiftNo As System.Windows.Forms.Label + Friend WithEvents lblOPNo As System.Windows.Forms.Label + Friend WithEvents lblEmployeeNo As System.Windows.Forms.Label + Friend WithEvents lblAreaNo As System.Windows.Forms.Label + Friend WithEvents lblSysQty As System.Windows.Forms.Label + Friend WithEvents lblCurQty As System.Windows.Forms.Label + Friend WithEvents lblLotNo As System.Windows.Forms.Label + Friend WithEvents txtLotRecord As System.Windows.Forms.RichTextBox + Friend WithEvents iugKeyIn As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents lblLotRecord As System.Windows.Forms.Label + Friend WithEvents btnClose As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnConfirm As Infragistics.Win.Misc.UltraButton + Friend WithEvents iugMaterial As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugEquipment As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugAttrib As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents gbxLotInfo As System.Windows.Forms.GroupBox + Friend WithEvents txtMaterialNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblMaterialNo As System.Windows.Forms.Label + Friend WithEvents gbxMaterial As System.Windows.Forms.GroupBox + Friend WithEvents btnKeyIn As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnDel As Infragistics.Win.Misc.UltraButton + Friend WithEvents iugError As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents gbxError As System.Windows.Forms.GroupBox + Friend WithEvents txtErrorNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblErrorNo As System.Windows.Forms.Label + Friend WithEvents txtErrorQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblErrorQty As System.Windows.Forms.Label + Friend WithEvents lblupdcheckouttime As System.Windows.Forms.Label + Friend WithEvents dtpcheckouttime As System.Windows.Forms.DateTimePicker + Friend WithEvents txtOPName As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents btnMultiUser As Infragistics.Win.Misc.UltraButton + Private Sub InitializeComponent() + Me.SBar1 = New System.Windows.Forms.StatusBar() + Me.SBarPanel1 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel2 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel3 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel4 = New System.Windows.Forms.StatusBarPanel() + Me.gbxLotInfo = New System.Windows.Forms.GroupBox() + Me.txtOPName = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtOPNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblOPDescription = New System.Windows.Forms.Label() + Me.txtProductNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCustomerLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtMONo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtShiftNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtEmployeeNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtAreaNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtPriority = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtSysUnitNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtSysQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCurUnitNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCurQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtOPDescription = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblPriority = New System.Windows.Forms.Label() + Me.lblMONo = New System.Windows.Forms.Label() + Me.lblCustomerLotNo = New System.Windows.Forms.Label() + Me.lblShiftNo = New System.Windows.Forms.Label() + Me.lblOPNo = New System.Windows.Forms.Label() + Me.lblEmployeeNo = New System.Windows.Forms.Label() + Me.lblAreaNo = New System.Windows.Forms.Label() + Me.lblSysQty = New System.Windows.Forms.Label() + Me.lblCurQty = New System.Windows.Forms.Label() + Me.lblLotNo = New System.Windows.Forms.Label() + Me.lblProductNo = New System.Windows.Forms.Label() + Me.txtLotRecord = New System.Windows.Forms.RichTextBox() + Me.iugKeyIn = New iMESUltraGrid.iMESUltraGridControl() + Me.lblLotRecord = New System.Windows.Forms.Label() + Me.btnClose = New Infragistics.Win.Misc.UltraButton() + Me.btnConfirm = New Infragistics.Win.Misc.UltraButton() + Me.iugMaterial = New iMESUltraGrid.iMESUltraGridControl() + Me.iugEquipment = New iMESUltraGrid.iMESUltraGridControl() + Me.iugAttrib = New iMESUltraGrid.iMESUltraGridControl() + Me.txtMaterialNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblMaterialNo = New System.Windows.Forms.Label() + Me.gbxMaterial = New System.Windows.Forms.GroupBox() + Me.btnKeyIn = New Infragistics.Win.Misc.UltraButton() + Me.txtMaterialLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblMaterialLotNo = New System.Windows.Forms.Label() + Me.btnDel = New Infragistics.Win.Misc.UltraButton() + Me.iugError = New iMESUltraGrid.iMESUltraGridControl() + Me.gbxError = New System.Windows.Forms.GroupBox() + Me.txtErrorQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblErrorQty = New System.Windows.Forms.Label() + Me.txtErrorNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblErrorNo = New System.Windows.Forms.Label() + Me.dtpcheckouttime = New System.Windows.Forms.DateTimePicker() + Me.lblupdcheckouttime = New System.Windows.Forms.Label() + Me.btnMultiUser = New Infragistics.Win.Misc.UltraButton() + Me.btnOperator = New Infragistics.Win.Misc.UltraButton() + Me.chkUpdCheckOutTime = New System.Windows.Forms.CheckBox() + Me.txtUnionProductNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtUnionProductVersion = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.btnGetProduct = New Infragistics.Win.Misc.UltraButton() + Me.txtUnionProductUnit = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.btnSWR = New Infragistics.Win.Misc.UltraButton() + Me.chkUnionProductNo = New System.Windows.Forms.CheckBox() + Me.btnBinStateAdjust = New Infragistics.Win.Misc.UltraButton() + Me.uplAll = New Infragistics.Win.Misc.UltraPanel() + Me.uegMaterial_KeyIn2 = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel4 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel4 = New Infragistics.Win.Misc.UltraPanel() + Me.uplMaterial_KeyIn = New Infragistics.Win.Misc.UltraPanel() + Me.uplKeyIn = New Infragistics.Win.Misc.UltraPanel() + Me.UltraSplitter2 = New Infragistics.Win.Misc.UltraSplitter() + Me.uplMaterial = New Infragistics.Win.Misc.UltraPanel() + Me.uegAttrib_Equipment = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel2 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel2 = New Infragistics.Win.Misc.UltraPanel() + Me.uplAttrib_Equipment = New Infragistics.Win.Misc.UltraPanel() + Me.uplEquipment = New Infragistics.Win.Misc.UltraPanel() + Me.iugStuInfo = New iMESUltraGrid.iMESUltraGridControl() + Me.UltraSplitter1 = New Infragistics.Win.Misc.UltraSplitter() + Me.uplAttrib = New Infragistics.Win.Misc.UltraPanel() + Me.uegLotInfo = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel1 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel1 = New Infragistics.Win.Misc.UltraPanel() + CType(Me.SBarPanel1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel3, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel4, System.ComponentModel.ISupportInitialize).BeginInit() + Me.gbxLotInfo.SuspendLayout() + CType(Me.txtOPName, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtOPNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtProductNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCustomerLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtMONo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtShiftNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtEmployeeNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtAreaNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtPriority, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSysUnitNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSysQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCurUnitNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCurQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtOPDescription, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtMaterialNo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.gbxMaterial.SuspendLayout() + CType(Me.txtMaterialLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.gbxError.SuspendLayout() + CType(Me.txtErrorQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtErrorNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtUnionProductNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtUnionProductVersion, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtUnionProductUnit, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uplAll.ClientArea.SuspendLayout() + Me.uplAll.SuspendLayout() + CType(Me.uegMaterial_KeyIn2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegMaterial_KeyIn2.SuspendLayout() + Me.UltraExpandableGroupBoxPanel4.SuspendLayout() + Me.UltraPanel4.ClientArea.SuspendLayout() + Me.UltraPanel4.SuspendLayout() + Me.uplMaterial_KeyIn.ClientArea.SuspendLayout() + Me.uplMaterial_KeyIn.SuspendLayout() + Me.uplKeyIn.ClientArea.SuspendLayout() + Me.uplKeyIn.SuspendLayout() + Me.uplMaterial.ClientArea.SuspendLayout() + Me.uplMaterial.SuspendLayout() + CType(Me.uegAttrib_Equipment, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegAttrib_Equipment.SuspendLayout() + Me.UltraExpandableGroupBoxPanel2.SuspendLayout() + Me.UltraPanel2.ClientArea.SuspendLayout() + Me.UltraPanel2.SuspendLayout() + Me.uplAttrib_Equipment.ClientArea.SuspendLayout() + Me.uplAttrib_Equipment.SuspendLayout() + Me.uplEquipment.ClientArea.SuspendLayout() + Me.uplEquipment.SuspendLayout() + Me.uplAttrib.ClientArea.SuspendLayout() + Me.uplAttrib.SuspendLayout() + CType(Me.uegLotInfo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegLotInfo.SuspendLayout() + Me.UltraExpandableGroupBoxPanel1.SuspendLayout() + Me.UltraPanel1.ClientArea.SuspendLayout() + Me.UltraPanel1.SuspendLayout() + Me.SuspendLayout() + ' + 'SBar1 + ' + Me.SBar1.Font = New System.Drawing.Font("Times New Roman", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.SBar1.Location = New System.Drawing.Point(0, 710) + Me.SBar1.Name = "SBar1" + Me.SBar1.Panels.AddRange(New System.Windows.Forms.StatusBarPanel() {Me.SBarPanel1, Me.SBarPanel2, Me.SBarPanel3, Me.SBarPanel4}) + Me.SBar1.ShowPanels = True + Me.SBar1.Size = New System.Drawing.Size(1008, 22) + Me.SBar1.TabIndex = 13 + ' + 'SBarPanel1 + ' + Me.SBarPanel1.Name = "SBarPanel1" + ' + 'SBarPanel2 + ' + Me.SBarPanel2.Name = "SBarPanel2" + ' + 'SBarPanel3 + ' + Me.SBarPanel3.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring + Me.SBarPanel3.Name = "SBarPanel3" + Me.SBarPanel3.Width = 641 + ' + 'SBarPanel4 + ' + Me.SBarPanel4.Alignment = System.Windows.Forms.HorizontalAlignment.Right + Me.SBarPanel4.Name = "SBarPanel4" + Me.SBarPanel4.Width = 150 + ' + 'gbxLotInfo + ' + Me.gbxLotInfo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.gbxLotInfo.Controls.Add(Me.txtOPName) + Me.gbxLotInfo.Controls.Add(Me.txtOPNo) + Me.gbxLotInfo.Controls.Add(Me.lblOPDescription) + Me.gbxLotInfo.Controls.Add(Me.txtProductNo) + Me.gbxLotInfo.Controls.Add(Me.txtCustomerLotNo) + Me.gbxLotInfo.Controls.Add(Me.txtMONo) + Me.gbxLotInfo.Controls.Add(Me.txtShiftNo) + Me.gbxLotInfo.Controls.Add(Me.txtEmployeeNo) + Me.gbxLotInfo.Controls.Add(Me.txtAreaNo) + Me.gbxLotInfo.Controls.Add(Me.txtPriority) + Me.gbxLotInfo.Controls.Add(Me.txtSysUnitNo) + Me.gbxLotInfo.Controls.Add(Me.txtSysQty) + Me.gbxLotInfo.Controls.Add(Me.txtCurUnitNo) + Me.gbxLotInfo.Controls.Add(Me.txtCurQty) + Me.gbxLotInfo.Controls.Add(Me.txtOPDescription) + Me.gbxLotInfo.Controls.Add(Me.txtLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblPriority) + Me.gbxLotInfo.Controls.Add(Me.lblMONo) + Me.gbxLotInfo.Controls.Add(Me.lblCustomerLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblShiftNo) + Me.gbxLotInfo.Controls.Add(Me.lblOPNo) + Me.gbxLotInfo.Controls.Add(Me.lblEmployeeNo) + Me.gbxLotInfo.Controls.Add(Me.lblAreaNo) + Me.gbxLotInfo.Controls.Add(Me.lblSysQty) + Me.gbxLotInfo.Controls.Add(Me.lblCurQty) + Me.gbxLotInfo.Controls.Add(Me.lblLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblProductNo) + Me.gbxLotInfo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.gbxLotInfo.Location = New System.Drawing.Point(0, 0) + Me.gbxLotInfo.Name = "gbxLotInfo" + Me.gbxLotInfo.Size = New System.Drawing.Size(1004, 126) + Me.gbxLotInfo.TabIndex = 0 + Me.gbxLotInfo.TabStop = False + Me.gbxLotInfo.Text = "Lot Information" + ' + 'txtOPName + ' + Me.txtOPName.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOPName.Location = New System.Drawing.Point(742, 69) + Me.txtOPName.Name = "txtOPName" + Me.txtOPName.ReadOnly = True + Me.txtOPName.Size = New System.Drawing.Size(258, 22) + Me.txtOPName.TabIndex = 24 + ' + 'txtOPNo + ' + Me.txtOPNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOPNo.Location = New System.Drawing.Point(607, 69) + Me.txtOPNo.Name = "txtOPNo" + Me.txtOPNo.ReadOnly = True + Me.txtOPNo.Size = New System.Drawing.Size(137, 22) + Me.txtOPNo.TabIndex = 23 + ' + 'lblOPDescription + ' + Me.lblOPDescription.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOPDescription.Location = New System.Drawing.Point(3, 97) + Me.lblOPDescription.Name = "lblOPDescription" + Me.lblOPDescription.Size = New System.Drawing.Size(80, 15) + Me.lblOPDescription.TabIndex = 25 + Me.lblOPDescription.Text = "OP Description" + Me.lblOPDescription.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'txtProductNo + ' + Me.txtProductNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtProductNo.Location = New System.Drawing.Point(607, 42) + Me.txtProductNo.Name = "txtProductNo" + Me.txtProductNo.ReadOnly = True + Me.txtProductNo.Size = New System.Drawing.Size(188, 22) + Me.txtProductNo.TabIndex = 14 + ' + 'txtCustomerLotNo + ' + Me.txtCustomerLotNo.Location = New System.Drawing.Point(87, 42) + Me.txtCustomerLotNo.Name = "txtCustomerLotNo" + Me.txtCustomerLotNo.ReadOnly = True + Me.txtCustomerLotNo.Size = New System.Drawing.Size(179, 22) + Me.txtCustomerLotNo.TabIndex = 10 + ' + 'txtMONo + ' + Me.txtMONo.Location = New System.Drawing.Point(341, 42) + Me.txtMONo.Name = "txtMONo" + Me.txtMONo.ReadOnly = True + Me.txtMONo.Size = New System.Drawing.Size(179, 22) + Me.txtMONo.TabIndex = 12 + ' + 'txtShiftNo + ' + Me.txtShiftNo.Location = New System.Drawing.Point(341, 69) + Me.txtShiftNo.Name = "txtShiftNo" + Me.txtShiftNo.ReadOnly = True + Me.txtShiftNo.Size = New System.Drawing.Size(179, 22) + Me.txtShiftNo.TabIndex = 21 + ' + 'txtEmployeeNo + ' + Me.txtEmployeeNo.Location = New System.Drawing.Point(87, 69) + Me.txtEmployeeNo.Name = "txtEmployeeNo" + Me.txtEmployeeNo.ReadOnly = True + Me.txtEmployeeNo.Size = New System.Drawing.Size(179, 22) + Me.txtEmployeeNo.TabIndex = 19 + ' + 'txtAreaNo + ' + Me.txtAreaNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtAreaNo.Location = New System.Drawing.Point(607, 15) + Me.txtAreaNo.Name = "txtAreaNo" + Me.txtAreaNo.ReadOnly = True + Me.txtAreaNo.Size = New System.Drawing.Size(188, 22) + Me.txtAreaNo.TabIndex = 5 + ' + 'txtPriority + ' + Me.txtPriority.Location = New System.Drawing.Point(341, 15) + Me.txtPriority.Name = "txtPriority" + Me.txtPriority.ReadOnly = True + Me.txtPriority.Size = New System.Drawing.Size(179, 22) + Me.txtPriority.TabIndex = 3 + ' + 'txtSysUnitNo + ' + Me.txtSysUnitNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtSysUnitNo.Location = New System.Drawing.Point(960, 42) + Me.txtSysUnitNo.Name = "txtSysUnitNo" + Me.txtSysUnitNo.ReadOnly = True + Me.txtSysUnitNo.Size = New System.Drawing.Size(40, 22) + Me.txtSysUnitNo.TabIndex = 17 + ' + 'txtSysQty + ' + Me.txtSysQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtSysQty.Location = New System.Drawing.Point(858, 42) + Me.txtSysQty.Name = "txtSysQty" + Me.txtSysQty.ReadOnly = True + Me.txtSysQty.Size = New System.Drawing.Size(102, 22) + Me.txtSysQty.TabIndex = 16 + ' + 'txtCurUnitNo + ' + Me.txtCurUnitNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCurUnitNo.Location = New System.Drawing.Point(960, 15) + Me.txtCurUnitNo.Name = "txtCurUnitNo" + Me.txtCurUnitNo.ReadOnly = True + Me.txtCurUnitNo.Size = New System.Drawing.Size(40, 22) + Me.txtCurUnitNo.TabIndex = 8 + ' + 'txtCurQty + ' + Me.txtCurQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCurQty.Location = New System.Drawing.Point(858, 15) + Me.txtCurQty.Name = "txtCurQty" + Me.txtCurQty.ReadOnly = True + Me.txtCurQty.Size = New System.Drawing.Size(102, 22) + Me.txtCurQty.TabIndex = 7 + ' + 'txtOPDescription + ' + Me.txtOPDescription.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOPDescription.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtOPDescription.Location = New System.Drawing.Point(87, 96) + Me.txtOPDescription.Name = "txtOPDescription" + Me.txtOPDescription.ReadOnly = True + Me.txtOPDescription.Size = New System.Drawing.Size(913, 22) + Me.txtOPDescription.TabIndex = 26 + ' + 'txtLotNo + ' + Me.txtLotNo.Location = New System.Drawing.Point(87, 15) + Me.txtLotNo.Name = "txtLotNo" + Me.txtLotNo.ReadOnly = True + Me.txtLotNo.Size = New System.Drawing.Size(179, 22) + Me.txtLotNo.TabIndex = 1 + ' + 'lblPriority + ' + Me.lblPriority.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblPriority.Location = New System.Drawing.Point(271, 18) + Me.lblPriority.Name = "lblPriority" + Me.lblPriority.Size = New System.Drawing.Size(64, 15) + Me.lblPriority.TabIndex = 2 + Me.lblPriority.Text = "Priority" + Me.lblPriority.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblMONo + ' + Me.lblMONo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMONo.Location = New System.Drawing.Point(271, 45) + Me.lblMONo.Name = "lblMONo" + Me.lblMONo.Size = New System.Drawing.Size(64, 15) + Me.lblMONo.TabIndex = 11 + Me.lblMONo.Text = "MONo" + Me.lblMONo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblCustomerLotNo + ' + Me.lblCustomerLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCustomerLotNo.Location = New System.Drawing.Point(3, 45) + Me.lblCustomerLotNo.Name = "lblCustomerLotNo" + Me.lblCustomerLotNo.Size = New System.Drawing.Size(80, 15) + Me.lblCustomerLotNo.TabIndex = 9 + Me.lblCustomerLotNo.Text = "Customer Lot No" + Me.lblCustomerLotNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblShiftNo + ' + Me.lblShiftNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblShiftNo.Location = New System.Drawing.Point(271, 72) + Me.lblShiftNo.Name = "lblShiftNo" + Me.lblShiftNo.Size = New System.Drawing.Size(64, 15) + Me.lblShiftNo.TabIndex = 20 + Me.lblShiftNo.Text = "Shift No" + Me.lblShiftNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblOPNo + ' + Me.lblOPNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOPNo.Location = New System.Drawing.Point(527, 72) + Me.lblOPNo.Name = "lblOPNo" + Me.lblOPNo.Size = New System.Drawing.Size(75, 15) + Me.lblOPNo.TabIndex = 22 + Me.lblOPNo.Text = "OP No" + Me.lblOPNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblEmployeeNo + ' + Me.lblEmployeeNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblEmployeeNo.Location = New System.Drawing.Point(3, 72) + Me.lblEmployeeNo.Name = "lblEmployeeNo" + Me.lblEmployeeNo.Size = New System.Drawing.Size(80, 15) + Me.lblEmployeeNo.TabIndex = 18 + Me.lblEmployeeNo.Text = "Employee No" + Me.lblEmployeeNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblAreaNo + ' + Me.lblAreaNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblAreaNo.Location = New System.Drawing.Point(527, 18) + Me.lblAreaNo.Name = "lblAreaNo" + Me.lblAreaNo.Size = New System.Drawing.Size(75, 15) + Me.lblAreaNo.TabIndex = 4 + Me.lblAreaNo.Text = "Area No" + Me.lblAreaNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblSysQty + ' + Me.lblSysQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblSysQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblSysQty.Location = New System.Drawing.Point(791, 45) + Me.lblSysQty.Name = "lblSysQty" + Me.lblSysQty.Size = New System.Drawing.Size(64, 15) + Me.lblSysQty.TabIndex = 15 + Me.lblSysQty.Text = "Sys Qty" + Me.lblSysQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblCurQty + ' + Me.lblCurQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblCurQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCurQty.Location = New System.Drawing.Point(791, 18) + Me.lblCurQty.Name = "lblCurQty" + Me.lblCurQty.Size = New System.Drawing.Size(64, 15) + Me.lblCurQty.TabIndex = 6 + Me.lblCurQty.Text = "Cur Qty" + Me.lblCurQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblLotNo + ' + Me.lblLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblLotNo.Location = New System.Drawing.Point(3, 18) + Me.lblLotNo.Name = "lblLotNo" + Me.lblLotNo.Size = New System.Drawing.Size(80, 15) + Me.lblLotNo.TabIndex = 0 + Me.lblLotNo.Text = "Lot No" + Me.lblLotNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblProductNo + ' + Me.lblProductNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblProductNo.Location = New System.Drawing.Point(527, 45) + Me.lblProductNo.Name = "lblProductNo" + Me.lblProductNo.Size = New System.Drawing.Size(75, 15) + Me.lblProductNo.TabIndex = 13 + Me.lblProductNo.Text = "Product No" + Me.lblProductNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'txtLotRecord + ' + Me.txtLotRecord.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtLotRecord.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtLotRecord.Location = New System.Drawing.Point(96, 229) + Me.txtLotRecord.Name = "txtLotRecord" + Me.txtLotRecord.Size = New System.Drawing.Size(233, 64) + Me.txtLotRecord.TabIndex = 6 + Me.txtLotRecord.Text = "" + ' + 'iugKeyIn + ' + Me.iugKeyIn.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugKeyIn.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugKeyIn.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugKeyIn.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugKeyIn.Identity = "IMes" + Me.iugKeyIn.IdentityForm = "" + Me.iugKeyIn.LayOutFilePath = "" + Me.iugKeyIn.Location = New System.Drawing.Point(8, 187) + Me.iugKeyIn.Name = "iugKeyIn" + Me.iugKeyIn.PrintFitWidthToPages = 0 + Me.iugKeyIn.PrintLandscape = True + Me.iugKeyIn.PrintPageFooter = "" + Me.iugKeyIn.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKeyIn.PrintPageFooterHeight = 20 + Me.iugKeyIn.PrintPageHeader = "" + Me.iugKeyIn.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKeyIn.PrintPageHeaderHeight = 20 + Me.iugKeyIn.PrintZoom = 1.0R + Me.iugKeyIn.Size = New System.Drawing.Size(643, 143) + Me.iugKeyIn.TabIndex = 7 + Me.iugKeyIn.UserNo = "IMes" + ' + 'lblLotRecord + ' + Me.lblLotRecord.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblLotRecord.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblLotRecord.Location = New System.Drawing.Point(27, 232) + Me.lblLotRecord.Name = "lblLotRecord" + Me.lblLotRecord.Size = New System.Drawing.Size(66, 16) + Me.lblLotRecord.TabIndex = 5 + Me.lblLotRecord.Text = "Lot Record" + Me.lblLotRecord.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'btnClose + ' + Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnClose.Location = New System.Drawing.Point(925, 673) + Me.btnClose.Name = "btnClose" + Me.btnClose.Size = New System.Drawing.Size(80, 32) + Me.btnClose.TabIndex = 12 + Me.btnClose.Text = "Close" + ' + 'btnConfirm + ' + Me.btnConfirm.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnConfirm.Location = New System.Drawing.Point(839, 673) + Me.btnConfirm.Name = "btnConfirm" + Me.btnConfirm.Size = New System.Drawing.Size(80, 32) + Me.btnConfirm.TabIndex = 11 + Me.btnConfirm.Text = "Confirm" + ' + 'iugMaterial + ' + Me.iugMaterial.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugMaterial.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugMaterial.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugMaterial.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugMaterial.Identity = "IMes" + Me.iugMaterial.IdentityForm = "" + Me.iugMaterial.LayOutFilePath = "" + Me.iugMaterial.Location = New System.Drawing.Point(5, 41) + Me.iugMaterial.Name = "iugMaterial" + Me.iugMaterial.PrintFitWidthToPages = 0 + Me.iugMaterial.PrintLandscape = True + Me.iugMaterial.PrintPageFooter = "" + Me.iugMaterial.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugMaterial.PrintPageFooterHeight = 20 + Me.iugMaterial.PrintPageHeader = "" + Me.iugMaterial.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugMaterial.PrintPageHeaderHeight = 20 + Me.iugMaterial.PrintZoom = 1.0R + Me.iugMaterial.Size = New System.Drawing.Size(643, 128) + Me.iugMaterial.TabIndex = 6 + Me.iugMaterial.UserNo = "IMes" + ' + 'iugEquipment + ' + Me.iugEquipment.Anchor = System.Windows.Forms.AnchorStyles.Left + Me.iugEquipment.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugEquipment.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugEquipment.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugEquipment.Identity = "IMes" + Me.iugEquipment.IdentityForm = "" + Me.iugEquipment.LayOutFilePath = "" + Me.iugEquipment.Location = New System.Drawing.Point(0, 0) + Me.iugEquipment.Name = "iugEquipment" + Me.iugEquipment.PrintFitWidthToPages = 0 + Me.iugEquipment.PrintLandscape = True + Me.iugEquipment.PrintPageFooter = "" + Me.iugEquipment.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugEquipment.PrintPageFooterHeight = 20 + Me.iugEquipment.PrintPageHeader = "" + Me.iugEquipment.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugEquipment.PrintPageHeaderHeight = 20 + Me.iugEquipment.PrintZoom = 1.0R + Me.iugEquipment.Size = New System.Drawing.Size(276, 137) + Me.iugEquipment.TabIndex = 2 + Me.iugEquipment.UserNo = "IMes" + ' + 'iugAttrib + ' + Me.iugAttrib.Dock = System.Windows.Forms.DockStyle.Fill + Me.iugAttrib.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugAttrib.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugAttrib.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugAttrib.Identity = "IMes" + Me.iugAttrib.IdentityForm = "" + Me.iugAttrib.LayOutFilePath = "" + Me.iugAttrib.Location = New System.Drawing.Point(0, 0) + Me.iugAttrib.Name = "iugAttrib" + Me.iugAttrib.PrintFitWidthToPages = 0 + Me.iugAttrib.PrintLandscape = True + Me.iugAttrib.PrintPageFooter = "" + Me.iugAttrib.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugAttrib.PrintPageFooterHeight = 20 + Me.iugAttrib.PrintPageHeader = "" + Me.iugAttrib.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugAttrib.PrintPageHeaderHeight = 20 + Me.iugAttrib.PrintZoom = 1.0R + Me.iugAttrib.Size = New System.Drawing.Size(340, 137) + Me.iugAttrib.TabIndex = 1 + Me.iugAttrib.UserNo = "IMes" + ' + 'txtMaterialNo + ' + Me.txtMaterialNo.Location = New System.Drawing.Point(77, 13) + Me.txtMaterialNo.Name = "txtMaterialNo" + Me.txtMaterialNo.Size = New System.Drawing.Size(145, 22) + Me.txtMaterialNo.TabIndex = 1 + ' + 'lblMaterialNo + ' + Me.lblMaterialNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMaterialNo.Location = New System.Drawing.Point(7, 16) + Me.lblMaterialNo.Name = "lblMaterialNo" + Me.lblMaterialNo.Size = New System.Drawing.Size(65, 15) + Me.lblMaterialNo.TabIndex = 0 + Me.lblMaterialNo.Text = "Material No" + Me.lblMaterialNo.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'gbxMaterial + ' + Me.gbxMaterial.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.gbxMaterial.Controls.Add(Me.btnKeyIn) + Me.gbxMaterial.Controls.Add(Me.txtMaterialLotNo) + Me.gbxMaterial.Controls.Add(Me.lblMaterialLotNo) + Me.gbxMaterial.Controls.Add(Me.btnDel) + Me.gbxMaterial.Controls.Add(Me.iugMaterial) + Me.gbxMaterial.Controls.Add(Me.txtMaterialNo) + Me.gbxMaterial.Controls.Add(Me.lblMaterialNo) + Me.gbxMaterial.Location = New System.Drawing.Point(3, 4) + Me.gbxMaterial.Name = "gbxMaterial" + Me.gbxMaterial.Size = New System.Drawing.Size(653, 177) + Me.gbxMaterial.TabIndex = 4 + Me.gbxMaterial.TabStop = False + ' + 'btnKeyIn + ' + Me.btnKeyIn.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnKeyIn.Location = New System.Drawing.Point(580, 12) + Me.btnKeyIn.Name = "btnKeyIn" + Me.btnKeyIn.Size = New System.Drawing.Size(64, 24) + Me.btnKeyIn.TabIndex = 4 + Me.btnKeyIn.Text = "Key In" + ' + 'txtMaterialLotNo + ' + Me.txtMaterialLotNo.Location = New System.Drawing.Point(321, 13) + Me.txtMaterialLotNo.Name = "txtMaterialLotNo" + Me.txtMaterialLotNo.Size = New System.Drawing.Size(117, 22) + Me.txtMaterialLotNo.TabIndex = 3 + ' + 'lblMaterialLotNo + ' + Me.lblMaterialLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMaterialLotNo.Location = New System.Drawing.Point(230, 16) + Me.lblMaterialLotNo.Name = "lblMaterialLotNo" + Me.lblMaterialLotNo.Size = New System.Drawing.Size(86, 15) + Me.lblMaterialLotNo.TabIndex = 2 + Me.lblMaterialLotNo.Text = "Material Lot No" + Me.lblMaterialLotNo.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'btnDel + ' + Me.btnDel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnDel.Location = New System.Drawing.Point(579, 11) + Me.btnDel.Name = "btnDel" + Me.btnDel.Size = New System.Drawing.Size(64, 24) + Me.btnDel.TabIndex = 5 + Me.btnDel.Text = "Del" + Me.btnDel.Visible = False + ' + 'iugError + ' + Me.iugError.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugError.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugError.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugError.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugError.Identity = "IMes" + Me.iugError.IdentityForm = "" + Me.iugError.LayOutFilePath = "" + Me.iugError.Location = New System.Drawing.Point(6, 45) + Me.iugError.Name = "iugError" + Me.iugError.PrintFitWidthToPages = 0 + Me.iugError.PrintLandscape = True + Me.iugError.PrintPageFooter = "" + Me.iugError.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugError.PrintPageFooterHeight = 20 + Me.iugError.PrintPageHeader = "" + Me.iugError.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugError.PrintPageHeaderHeight = 20 + Me.iugError.PrintZoom = 1.0R + Me.iugError.Size = New System.Drawing.Size(323, 170) + Me.iugError.TabIndex = 4 + Me.iugError.UserNo = "IMes" + ' + 'gbxError + ' + Me.gbxError.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.gbxError.Controls.Add(Me.txtErrorQty) + Me.gbxError.Controls.Add(Me.lblErrorQty) + Me.gbxError.Controls.Add(Me.txtErrorNo) + Me.gbxError.Controls.Add(Me.lblErrorNo) + Me.gbxError.Controls.Add(Me.iugError) + Me.gbxError.Location = New System.Drawing.Point(0, 0) + Me.gbxError.Name = "gbxError" + Me.gbxError.Size = New System.Drawing.Size(335, 223) + Me.gbxError.TabIndex = 3 + Me.gbxError.TabStop = False + ' + 'txtErrorQty + ' + Me.txtErrorQty.Location = New System.Drawing.Point(253, 12) + Me.txtErrorQty.Name = "txtErrorQty" + Me.txtErrorQty.Size = New System.Drawing.Size(76, 22) + Me.txtErrorQty.TabIndex = 3 + ' + 'lblErrorQty + ' + Me.lblErrorQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblErrorQty.Location = New System.Drawing.Point(183, 16) + Me.lblErrorQty.Name = "lblErrorQty" + Me.lblErrorQty.Size = New System.Drawing.Size(64, 15) + Me.lblErrorQty.TabIndex = 2 + Me.lblErrorQty.Text = "Error Qty" + Me.lblErrorQty.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'txtErrorNo + ' + Me.txtErrorNo.Location = New System.Drawing.Point(72, 13) + Me.txtErrorNo.Name = "txtErrorNo" + Me.txtErrorNo.Size = New System.Drawing.Size(105, 22) + Me.txtErrorNo.TabIndex = 1 + ' + 'lblErrorNo + ' + Me.lblErrorNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblErrorNo.Location = New System.Drawing.Point(7, 16) + Me.lblErrorNo.Name = "lblErrorNo" + Me.lblErrorNo.Size = New System.Drawing.Size(60, 15) + Me.lblErrorNo.TabIndex = 0 + Me.lblErrorNo.Text = "Error No" + Me.lblErrorNo.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'dtpcheckouttime + ' + Me.dtpcheckouttime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.dtpcheckouttime.CustomFormat = "yyyy/MM/dd HH:mm:ss" + Me.dtpcheckouttime.Format = System.Windows.Forms.DateTimePickerFormat.Custom + Me.dtpcheckouttime.Location = New System.Drawing.Point(155, 680) + Me.dtpcheckouttime.Name = "dtpcheckouttime" + Me.dtpcheckouttime.Size = New System.Drawing.Size(128, 21) + Me.dtpcheckouttime.TabIndex = 9 + ' + 'lblupdcheckouttime + ' + Me.lblupdcheckouttime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblupdcheckouttime.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblupdcheckouttime.Location = New System.Drawing.Point(1, 683) + Me.lblupdcheckouttime.Name = "lblupdcheckouttime" + Me.lblupdcheckouttime.Size = New System.Drawing.Size(126, 18) + Me.lblupdcheckouttime.TabIndex = 8 + Me.lblupdcheckouttime.Text = "Update CheckOut Time" + ' + 'btnMultiUser + ' + Me.btnMultiUser.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnMultiUser.Location = New System.Drawing.Point(385, 675) + Me.btnMultiUser.Name = "btnMultiUser" + Me.btnMultiUser.Size = New System.Drawing.Size(80, 32) + Me.btnMultiUser.TabIndex = 10 + Me.btnMultiUser.Text = "Multi User" + Me.btnMultiUser.Visible = False + ' + 'btnOperator + ' + Me.btnOperator.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnOperator.Location = New System.Drawing.Point(299, 675) + Me.btnOperator.Name = "btnOperator" + Me.btnOperator.Size = New System.Drawing.Size(80, 32) + Me.btnOperator.TabIndex = 157 + Me.btnOperator.Text = "Operator" + Me.btnOperator.Visible = False + ' + 'chkUpdCheckOutTime + ' + Me.chkUpdCheckOutTime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.chkUpdCheckOutTime.AutoSize = True + Me.chkUpdCheckOutTime.Location = New System.Drawing.Point(133, 683) + Me.chkUpdCheckOutTime.Name = "chkUpdCheckOutTime" + Me.chkUpdCheckOutTime.Size = New System.Drawing.Size(15, 14) + Me.chkUpdCheckOutTime.TabIndex = 158 + Me.chkUpdCheckOutTime.UseVisualStyleBackColor = True + ' + 'txtUnionProductNo + ' + Me.txtUnionProductNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.txtUnionProductNo.Location = New System.Drawing.Point(96, 308) + Me.txtUnionProductNo.Name = "txtUnionProductNo" + Me.txtUnionProductNo.ReadOnly = True + Me.txtUnionProductNo.Size = New System.Drawing.Size(151, 22) + Me.txtUnionProductNo.TabIndex = 160 + ' + 'txtUnionProductVersion + ' + Me.txtUnionProductVersion.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.txtUnionProductVersion.Location = New System.Drawing.Point(258, 308) + Me.txtUnionProductVersion.Name = "txtUnionProductVersion" + Me.txtUnionProductVersion.ReadOnly = True + Me.txtUnionProductVersion.Size = New System.Drawing.Size(41, 22) + Me.txtUnionProductVersion.TabIndex = 3 + ' + 'btnGetProduct + ' + Me.btnGetProduct.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnGetProduct.Location = New System.Drawing.Point(303, 308) + Me.btnGetProduct.Name = "btnGetProduct" + Me.btnGetProduct.Size = New System.Drawing.Size(24, 24) + Me.btnGetProduct.TabIndex = 161 + Me.btnGetProduct.Text = "..." + ' + 'txtUnionProductUnit + ' + Me.txtUnionProductUnit.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.txtUnionProductUnit.Location = New System.Drawing.Point(348, 308) + Me.txtUnionProductUnit.Name = "txtUnionProductUnit" + Me.txtUnionProductUnit.ReadOnly = True + Me.txtUnionProductUnit.Size = New System.Drawing.Size(41, 22) + Me.txtUnionProductUnit.TabIndex = 162 + ' + 'btnSWR + ' + Me.btnSWR.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnSWR.Location = New System.Drawing.Point(658, 673) + Me.btnSWR.Name = "btnSWR" + Me.btnSWR.Size = New System.Drawing.Size(80, 32) + Me.btnSWR.TabIndex = 163 + Me.btnSWR.Text = "SWR" + ' + 'chkUnionProductNo + ' + Me.chkUnionProductNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.chkUnionProductNo.Location = New System.Drawing.Point(5, 311) + Me.chkUnionProductNo.Name = "chkUnionProductNo" + Me.chkUnionProductNo.Size = New System.Drawing.Size(99, 19) + Me.chkUnionProductNo.TabIndex = 5 + Me.chkUnionProductNo.Text = "UnionProductNo" + Me.chkUnionProductNo.UseVisualStyleBackColor = True + ' + 'btnBinStateAdjust + ' + Me.btnBinStateAdjust.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnBinStateAdjust.Location = New System.Drawing.Point(744, 673) + Me.btnBinStateAdjust.Name = "btnBinStateAdjust" + Me.btnBinStateAdjust.Size = New System.Drawing.Size(89, 32) + Me.btnBinStateAdjust.TabIndex = 165 + Me.btnBinStateAdjust.Text = "BinStateAdj" + Me.btnBinStateAdjust.Visible = False + ' + 'uplAll + ' + Me.uplAll.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + ' + 'uplAll.ClientArea + ' + Me.uplAll.ClientArea.Controls.Add(Me.uegMaterial_KeyIn2) + Me.uplAll.ClientArea.Controls.Add(Me.uegAttrib_Equipment) + Me.uplAll.ClientArea.Controls.Add(Me.uegLotInfo) + Me.uplAll.Location = New System.Drawing.Point(0, 0) + Me.uplAll.Name = "uplAll" + Me.uplAll.Size = New System.Drawing.Size(1013, 667) + Me.uplAll.TabIndex = 172 + ' + 'uegMaterial_KeyIn2 + ' + Me.uegMaterial_KeyIn2.Controls.Add(Me.UltraExpandableGroupBoxPanel4) + Me.uegMaterial_KeyIn2.Dock = System.Windows.Forms.DockStyle.Fill + Me.uegMaterial_KeyIn2.ExpandedSize = New System.Drawing.Size(1013, 357) + Me.uegMaterial_KeyIn2.Location = New System.Drawing.Point(0, 310) + Me.uegMaterial_KeyIn2.Name = "uegMaterial_KeyIn2" + Me.uegMaterial_KeyIn2.Size = New System.Drawing.Size(1013, 357) + Me.uegMaterial_KeyIn2.TabIndex = 163 + Me.uegMaterial_KeyIn2.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel4 + ' + Me.UltraExpandableGroupBoxPanel4.Controls.Add(Me.UltraPanel4) + Me.UltraExpandableGroupBoxPanel4.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel4.Location = New System.Drawing.Point(2, 18) + Me.UltraExpandableGroupBoxPanel4.Name = "UltraExpandableGroupBoxPanel4" + Me.UltraExpandableGroupBoxPanel4.Size = New System.Drawing.Size(1009, 337) + Me.UltraExpandableGroupBoxPanel4.TabIndex = 0 + ' + 'UltraPanel4 + ' + ' + 'UltraPanel4.ClientArea + ' + Me.UltraPanel4.ClientArea.Controls.Add(Me.uplMaterial_KeyIn) + Me.UltraPanel4.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel4.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel4.Name = "UltraPanel4" + Me.UltraPanel4.Size = New System.Drawing.Size(1009, 337) + Me.UltraPanel4.TabIndex = 0 + ' + 'uplMaterial_KeyIn + ' + ' + 'uplMaterial_KeyIn.ClientArea + ' + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.uplKeyIn) + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.UltraSplitter2) + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.uplMaterial) + Me.uplMaterial_KeyIn.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplMaterial_KeyIn.Location = New System.Drawing.Point(0, 0) + Me.uplMaterial_KeyIn.Name = "uplMaterial_KeyIn" + Me.uplMaterial_KeyIn.Size = New System.Drawing.Size(1009, 337) + Me.uplMaterial_KeyIn.TabIndex = 0 + ' + 'uplKeyIn + ' + ' + 'uplKeyIn.ClientArea + ' + Me.uplKeyIn.ClientArea.Controls.Add(Me.gbxMaterial) + Me.uplKeyIn.ClientArea.Controls.Add(Me.iugKeyIn) + Me.uplKeyIn.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplKeyIn.Location = New System.Drawing.Point(347, 0) + Me.uplKeyIn.Name = "uplKeyIn" + Me.uplKeyIn.Size = New System.Drawing.Size(662, 337) + Me.uplKeyIn.TabIndex = 4 + ' + 'UltraSplitter2 + ' + Me.UltraSplitter2.Location = New System.Drawing.Point(340, 0) + Me.UltraSplitter2.Name = "UltraSplitter2" + Me.UltraSplitter2.RestoreExtent = 479 + Me.UltraSplitter2.Size = New System.Drawing.Size(7, 337) + Me.UltraSplitter2.TabIndex = 3 + ' + 'uplMaterial + ' + ' + 'uplMaterial.ClientArea + ' + Me.uplMaterial.ClientArea.Controls.Add(Me.gbxError) + Me.uplMaterial.ClientArea.Controls.Add(Me.lblLotRecord) + Me.uplMaterial.ClientArea.Controls.Add(Me.txtLotRecord) + Me.uplMaterial.ClientArea.Controls.Add(Me.txtUnionProductUnit) + Me.uplMaterial.ClientArea.Controls.Add(Me.txtUnionProductNo) + Me.uplMaterial.ClientArea.Controls.Add(Me.btnGetProduct) + Me.uplMaterial.ClientArea.Controls.Add(Me.chkUnionProductNo) + Me.uplMaterial.ClientArea.Controls.Add(Me.txtUnionProductVersion) + Me.uplMaterial.Dock = System.Windows.Forms.DockStyle.Left + Me.uplMaterial.Location = New System.Drawing.Point(0, 0) + Me.uplMaterial.Name = "uplMaterial" + Me.uplMaterial.Size = New System.Drawing.Size(340, 337) + Me.uplMaterial.TabIndex = 0 + ' + 'uegAttrib_Equipment + ' + Me.uegAttrib_Equipment.Controls.Add(Me.UltraExpandableGroupBoxPanel2) + Me.uegAttrib_Equipment.Dock = System.Windows.Forms.DockStyle.Top + Me.uegAttrib_Equipment.ExpandedSize = New System.Drawing.Size(1013, 157) + Me.uegAttrib_Equipment.Location = New System.Drawing.Point(0, 153) + Me.uegAttrib_Equipment.Name = "uegAttrib_Equipment" + Me.uegAttrib_Equipment.Size = New System.Drawing.Size(1013, 157) + Me.uegAttrib_Equipment.TabIndex = 162 + Me.uegAttrib_Equipment.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel2 + ' + Me.UltraExpandableGroupBoxPanel2.Controls.Add(Me.UltraPanel2) + Me.UltraExpandableGroupBoxPanel2.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel2.Location = New System.Drawing.Point(2, 18) + Me.UltraExpandableGroupBoxPanel2.Name = "UltraExpandableGroupBoxPanel2" + Me.UltraExpandableGroupBoxPanel2.Size = New System.Drawing.Size(1009, 137) + Me.UltraExpandableGroupBoxPanel2.TabIndex = 0 + ' + 'UltraPanel2 + ' + ' + 'UltraPanel2.ClientArea + ' + Me.UltraPanel2.ClientArea.Controls.Add(Me.uplAttrib_Equipment) + Me.UltraPanel2.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel2.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel2.Name = "UltraPanel2" + Me.UltraPanel2.Size = New System.Drawing.Size(1009, 137) + Me.UltraPanel2.TabIndex = 0 + ' + 'uplAttrib_Equipment + ' + ' + 'uplAttrib_Equipment.ClientArea + ' + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.uplEquipment) + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.UltraSplitter1) + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.uplAttrib) + Me.uplAttrib_Equipment.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplAttrib_Equipment.Location = New System.Drawing.Point(0, 0) + Me.uplAttrib_Equipment.Name = "uplAttrib_Equipment" + Me.uplAttrib_Equipment.Size = New System.Drawing.Size(1009, 137) + Me.uplAttrib_Equipment.TabIndex = 162 + ' + 'uplEquipment + ' + ' + 'uplEquipment.ClientArea + ' + Me.uplEquipment.ClientArea.Controls.Add(Me.iugStuInfo) + Me.uplEquipment.ClientArea.Controls.Add(Me.iugEquipment) + Me.uplEquipment.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplEquipment.Location = New System.Drawing.Point(347, 0) + Me.uplEquipment.Name = "uplEquipment" + Me.uplEquipment.Size = New System.Drawing.Size(662, 137) + Me.uplEquipment.TabIndex = 1 + ' + 'iugStuInfo + ' + Me.iugStuInfo.Anchor = System.Windows.Forms.AnchorStyles.Right + Me.iugStuInfo.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugStuInfo.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugStuInfo.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugStuInfo.Identity = "IMes" + Me.iugStuInfo.IdentityForm = "" + Me.iugStuInfo.LayOutFilePath = "" + Me.iugStuInfo.Location = New System.Drawing.Point(277, 0) + Me.iugStuInfo.Name = "iugStuInfo" + Me.iugStuInfo.PrintFitWidthToPages = 0 + Me.iugStuInfo.PrintLandscape = True + Me.iugStuInfo.PrintPageFooter = "" + Me.iugStuInfo.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugStuInfo.PrintPageFooterHeight = 20 + Me.iugStuInfo.PrintPageHeader = "" + Me.iugStuInfo.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugStuInfo.PrintPageHeaderHeight = 20 + Me.iugStuInfo.PrintZoom = 1.0R + Me.iugStuInfo.Size = New System.Drawing.Size(376, 137) + Me.iugStuInfo.TabIndex = 3 + Me.iugStuInfo.UserNo = "IMes" + ' + 'UltraSplitter1 + ' + Me.UltraSplitter1.Location = New System.Drawing.Point(340, 0) + Me.UltraSplitter1.Name = "UltraSplitter1" + Me.UltraSplitter1.RestoreExtent = 479 + Me.UltraSplitter1.Size = New System.Drawing.Size(7, 137) + Me.UltraSplitter1.TabIndex = 1 + ' + 'uplAttrib + ' + ' + 'uplAttrib.ClientArea + ' + Me.uplAttrib.ClientArea.Controls.Add(Me.iugAttrib) + Me.uplAttrib.Dock = System.Windows.Forms.DockStyle.Left + Me.uplAttrib.Location = New System.Drawing.Point(0, 0) + Me.uplAttrib.Name = "uplAttrib" + Me.uplAttrib.Size = New System.Drawing.Size(340, 137) + Me.uplAttrib.TabIndex = 0 + ' + 'uegLotInfo + ' + Me.uegLotInfo.Controls.Add(Me.UltraExpandableGroupBoxPanel1) + Me.uegLotInfo.Dock = System.Windows.Forms.DockStyle.Top + Me.uegLotInfo.ExpandedSize = New System.Drawing.Size(1013, 153) + Me.uegLotInfo.Location = New System.Drawing.Point(0, 0) + Me.uegLotInfo.Name = "uegLotInfo" + Me.uegLotInfo.Size = New System.Drawing.Size(1013, 153) + Me.uegLotInfo.TabIndex = 161 + Me.uegLotInfo.Text = "Lot Information" + Me.uegLotInfo.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel1 + ' + Me.UltraExpandableGroupBoxPanel1.Controls.Add(Me.UltraPanel1) + Me.UltraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel1.Location = New System.Drawing.Point(2, 22) + Me.UltraExpandableGroupBoxPanel1.Name = "UltraExpandableGroupBoxPanel1" + Me.UltraExpandableGroupBoxPanel1.Size = New System.Drawing.Size(1009, 129) + Me.UltraExpandableGroupBoxPanel1.TabIndex = 0 + ' + 'UltraPanel1 + ' + ' + 'UltraPanel1.ClientArea + ' + Me.UltraPanel1.ClientArea.Controls.Add(Me.gbxLotInfo) + Me.UltraPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel1.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel1.Name = "UltraPanel1" + Me.UltraPanel1.Size = New System.Drawing.Size(1009, 129) + Me.UltraPanel1.TabIndex = 0 + ' + 'frmBR_L_CO_GEN + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14) + Me.ClientSize = New System.Drawing.Size(1008, 732) + Me.Controls.Add(Me.uplAll) + Me.Controls.Add(Me.btnBinStateAdjust) + Me.Controls.Add(Me.btnSWR) + Me.Controls.Add(Me.chkUpdCheckOutTime) + Me.Controls.Add(Me.btnOperator) + Me.Controls.Add(Me.btnMultiUser) + Me.Controls.Add(Me.dtpcheckouttime) + Me.Controls.Add(Me.lblupdcheckouttime) + Me.Controls.Add(Me.btnClose) + Me.Controls.Add(Me.btnConfirm) + Me.Controls.Add(Me.SBar1) + Me.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.MinimizeBox = False + Me.Name = "frmBR_L_CO_GEN" + Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "General Check Out" + CType(Me.SBarPanel1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel3, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel4, System.ComponentModel.ISupportInitialize).EndInit() + Me.gbxLotInfo.ResumeLayout(False) + Me.gbxLotInfo.PerformLayout() + CType(Me.txtOPName, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtOPNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtProductNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCustomerLotNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtMONo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtShiftNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtEmployeeNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtAreaNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtPriority, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSysUnitNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSysQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCurUnitNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCurQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtOPDescription, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtLotNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtMaterialNo, System.ComponentModel.ISupportInitialize).EndInit() + Me.gbxMaterial.ResumeLayout(False) + Me.gbxMaterial.PerformLayout() + CType(Me.txtMaterialLotNo, System.ComponentModel.ISupportInitialize).EndInit() + Me.gbxError.ResumeLayout(False) + Me.gbxError.PerformLayout() + CType(Me.txtErrorQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtErrorNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtUnionProductNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtUnionProductVersion, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtUnionProductUnit, System.ComponentModel.ISupportInitialize).EndInit() + Me.uplAll.ClientArea.ResumeLayout(False) + Me.uplAll.ResumeLayout(False) + CType(Me.uegMaterial_KeyIn2, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegMaterial_KeyIn2.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel4.ResumeLayout(False) + Me.UltraPanel4.ClientArea.ResumeLayout(False) + Me.UltraPanel4.ResumeLayout(False) + Me.uplMaterial_KeyIn.ClientArea.ResumeLayout(False) + Me.uplMaterial_KeyIn.ResumeLayout(False) + Me.uplKeyIn.ClientArea.ResumeLayout(False) + Me.uplKeyIn.ResumeLayout(False) + Me.uplMaterial.ClientArea.ResumeLayout(False) + Me.uplMaterial.ClientArea.PerformLayout() + Me.uplMaterial.ResumeLayout(False) + CType(Me.uegAttrib_Equipment, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegAttrib_Equipment.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel2.ResumeLayout(False) + Me.UltraPanel2.ClientArea.ResumeLayout(False) + Me.UltraPanel2.ResumeLayout(False) + Me.uplAttrib_Equipment.ClientArea.ResumeLayout(False) + Me.uplAttrib_Equipment.ResumeLayout(False) + Me.uplEquipment.ClientArea.ResumeLayout(False) + Me.uplEquipment.ResumeLayout(False) + Me.uplAttrib.ClientArea.ResumeLayout(False) + Me.uplAttrib.ResumeLayout(False) + CType(Me.uegLotInfo, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegLotInfo.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel1.ResumeLayout(False) + Me.UltraPanel1.ClientArea.ResumeLayout(False) + Me.UltraPanel1.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + +#End Region + + Private Sub frmBR_L_CO_GEN_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load + + Dim editorSettings As New Infragistics.Win.UltraWinEditors.DefaultEditorOwnerSettings + editorSettings.DataType = GetType(System.DateTime) + editorSettings.MaskInput = "yyyy/mm/dd hh:mm:ss" + editor = New Infragistics.Win.DateTimeEditor(New Infragistics.Win.UltraWinEditors.DefaultEditorOwner(editorSettings)) + + vlMaterialLevel = COM_Utility.ValueListProvider.GetInstance.GetValueList("TBLWIPTEMP_MATERIAL", "MATERIALLEVEL") + vlStuInfoIsSelected = COM_Utility.ValueListProvider.GetInstance.GetValueList("STUDENTINFO", "ISSELECTED") + + btnConfirm.Enabled = False + btnMultiUser.Enabled = False + Me.btnKeyIn.Visible = False + + '2017/11/06 KunYuan:變更結束加工時間checkbox預設不勾選 + chkUpdCheckOutTime.Checked = False + + If LotNo = defString Or UserId = defString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%LotNo%] [%or%] [%UserId%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '2022/2/25 0104829: SDD211216_02-01 / HaveComponent、HaveLevel判斷抽換成共用function + funGetLotStateIncludeData() + + + Dim drSel As DataRow() + + Cursor.Current = Cursors.WaitCursor + Call funLoadParameter("ChamberManage") + ' 2016/01/05 YF, 左下角的時間預設為AP SERVER的時間 + Me.dtpcheckouttime.Value = funGetAPServerTime() + + '1.取出生產批資訊 -------------------------------------------------------------------------------------------- + If funLoadLotState() Then Exit Sub + If dsWIP.Tables(tblLotState).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200003", "[%LotNo%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + If funGetShift() Then Exit Sub + If funLoadTemp_AttribJoinBasis() Then Exit Sub + If funLoadTemp_Equipment() Then Exit Sub + If funLoadTemp_Material() Then Exit Sub + + '[Mantis:86124]2021/01/19,Boyi,Add BinAssign + ' + If HaveLevel Then + Call funLoadSystemBin() + Call funLoadGoodBinState() + dtBinNew = dsWIP.Tables(strBinState).Clone 'copy schema to new datatable + + '93358: SDD210525_01-01/TriggerPS調整 93359: SDD210525_01-02/企業邏輯調整 若GoodBinState沒有資料 則不顯示KeyIn按鈕 Edison 21/06/01 + If dsWIP.Tables(strBinState).Rows.Count > 0 Then + btnBinStateAdjust.Visible = True + End If + End If + + txtLotNo.Text = LotNo + txtEmployeeNo.Text = UserId + Call funLotInfo_Show() + + '2.生產參數 --------------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + '轉換抽樣參數 + If funGetSampleData() Then Exit Sub + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "AttribSource <> 0 And AttribSource <> 1 And (AttribPhase = " & PhaseNo & " or AttribPhase = 99)" 'Source = Not KeyIn, Not Calculate ,Current and All Phase + iugAttrib.iMESUltraGrid.DataSource = dsWIP.Tables(tblTAttrib).DefaultView + End If + + '3.KeyIn Attrib ---------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + dtKeyIn = New DataTable("KeyIn") + dtKeyIn.DefaultView.AllowNew = False + dtKeyIn.DefaultView.AllowDelete = False + dtKeyIn.DefaultView.AllowEdit = True + '建立KeyIn Table的欄位 + dtKeyIn.Columns.Add("AttribNo", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribName", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribValue", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribSequence", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("InputType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("DataType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("ValueType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("QCItemNo", System.Type.GetType("System.String")) '2015-12-18, Joe, Add + + '取出KeyIn Attrib + For Each dr As DataRow In dsWIP.Tables(tblTAttrib).Rows + '將資料存入KeyIn Table + If dr("AttribSource") = 0 AndAlso (dr("AttribPhase") = PhaseNo OrElse dr("AttribPhase") = 99) Then + drAdd = dtKeyIn.NewRow() + drAdd("AttribNo") = dr("AttribNo") + drAdd("AttribName") = dr("AttribName") + drAdd("AttribSequence") = dr("AttribSequence") + drAdd("AttribValue") = dr("AttribValue") + drAdd("InputType") = dr("InputType") + drAdd("DataType") = dr("DataType") + drAdd("ValueType") = dr("ValueType") + drAdd("QCItemNo") = dr("QCItemNo") '2015-12-18, Joe, Add + dtKeyIn.Rows.Add(drAdd) + End If + Next + + iugKeyIn.iMESUltraGrid.DataSource = dtKeyIn.DefaultView + End If + + Call funLoadLotBasis() + + Call funLoadOEMOBasis() + + '4.Error + If funLoadOPError() Then Exit Sub + + '5.OP Description + If funGetOPDescription() Then Exit Sub + + If funLoadSYSParameter() Then Exit Sub + + '6.Initialize + Call funInitialize() + + Call funLoadStuInfo() + + '7.語系切換 + Call ExeChangeResource(Me, gLanguageMode) + ExeGroupControlPriv(Me, PrivFunNo) + + txtMaterialNo.Focus() 'Gary Lu 20131105:開啟畫面時游標在物料批號輸入文字方塊內 + + '判斷系統參數EnableSWR_CICO 0:否 1:是 + strEnableSWR_CICO = "0" '預設為否 + drSel = dsWIP.Tables(tblSYSParameter).Select("ParameterNo = 'EnableSWR_CICO'") + If drSel.Length > 0 Then + strEnableSWR_CICO = drSel(0)("ParameterValue").ToString + End If + + btnSWR.Visible = False + + If strEnableSWR_CICO = "1" Then '系統參數EnableSWR_CICO為1才需要顯示特殊生產需求 + + '2019/02/12 Eric 無資料不顯示SWR視窗 + Call funLoadSWRJoinLog() + If dsWIP.Tables(tblSWRJoinLog).Rows.Count > 0 Then + blnShowSWR = True + End If + + btnSWR.Visible = True + + End If + + '自動依CI刷入的料批給定標準用量 + Call funAutoSetMaterialLot() + + Cursor.Current = Cursors.Default + Exit Sub + + + End Sub + + Private Sub frmBR_L_CO_GEN_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated + + If Not dsWIP.Tables(tblTMaterial) Is Nothing AndAlso dsWIP.Tables(tblTMaterial).Rows.Count > 0 Then + txtMaterialNo.Focus() + Else + If iugKeyIn.iMESUltraGrid.Rows.Count > 0 Then + 'iugKeyIn.iMESUltraGrid.ActiveCell = iugKeyIn.iMESUltraGrid.Rows(0).Cells("AttribValue") + iugKeyIn.iMESUltraGrid.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, False, False) + End If + End If + + End Sub + + Private Sub frmBR_L_CO_GEN_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing + + If Not dsWIP Is Nothing Then dsWIP.Dispose() + If Not dtKeyIn Is Nothing Then dtKeyIn.Dispose() + If Not dtMLot Is Nothing Then dtMLot.Dispose() + '2019/12/17 OwenLiu, Mantis:0063698, 修正強制關閉企業邏輯,未正確執行ReverseTriggerOP的問題 + ' Call ExeReverseTriggerOP(UserId, LotNo, RevLotSerial, RevLotStamp) + '2020/3/17,Ning,不啟用Reverse時的ReverseTriggerOP + Call ExeReverseTriggerOP_NotUseUndo(UserId, LotNo, RevLotSerial, RevLotStamp) + + End Sub + + Protected Overrides Sub Finalize() + MyBase.Finalize() + End Sub + +#Region "Buttons" + + Private Sub btnConfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirm.Click + + Cursor.Current = Cursors.WaitCursor + + '1.基本檢查--------------------------------------------------------------------------------------------------- + Dim drSel(), drSelMTLLot(), drSelSeq() As DataRow + Dim blnH_Scrap, blnH_Defect As Boolean + Dim decScrapQty As Decimal = 0 + Dim decDefectQty As Decimal = 0 + Dim decLossQty As Decimal = 0 + Dim decGoodQty As Decimal = 0 + Dim decT_ScrapQty As Decimal = 0 + Dim decT_DefectQty As Decimal = 0 + Dim decBinQty_Sum As Decimal = 0 + Dim strNewBin As String = defString + Dim bBinNew As Boolean = False + Dim i As Integer + + drSel = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSel.Length = 0 Then + blnH_Scrap = False '沒有定義ScrapQty + Else + blnH_Scrap = True '有定義ScrapQty + If IsNumeric(drSel(0)("AttribValue")) Then + decScrapQty = drSel(0)("AttribValue") + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%ScrapQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + drSel = dtKeyIn.Select("AttribNo = 'DefectQty'") + If drSel.Length = 0 Then + blnH_Defect = False '沒有定義DefectQty + Else + blnH_Defect = True '有定義DefectQty + If IsNumeric(drSel(0)("AttribValue")) Then + decDefectQty = drSel(0)("AttribValue") + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%DefectQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + drSel = dtKeyIn.Select("AttribNo = 'GoodQty'") + If drSel.Length > 0 Then + If IsNumeric(drSel(0)("AttribValue")) Then + decGoodQty = drSel(0)("AttribValue") + + If CDec(drSel(0)("AttribValue")) < 0 Then '輸入的值需要大於或等於0 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200016", "[%GoodQty%] [%MUST BE GREATER THAN OR EQUAL TO%] 0 !!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%GoodQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + + drSel = dtKeyIn.Select("AttribNo = 'LossQty'") + If drSel.Length <> 0 Then + If IsNumeric(drSel(0)("AttribValue")) Then + decLossQty = drSel(0)("AttribValue") + End If + End If + + '不良原因輸入檢查 + If blnH_Scrap Then + '計算總不良數 + drSel = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i = 0 To drSel.Length - 1 + If drSel(i)("ErrorQty") <= 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "[%ErrorNo%]:" & drSel(i)("ErrorNo") & ",[%ErrorQty%] <0 !!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + decT_ScrapQty = decT_ScrapQty + drSel(i)("ErrorQty") + Next + If decScrapQty <> decT_ScrapQty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203085", "[%ScrapQty%] [%IS NOT EQUAL TO%] [%TOTAL SCRAP REASONN QTY%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + + '缺點原因輸入檢查 + If blnH_Defect Then + '計算總缺點數 + drSel = dsWIP.Tables(tblOPError).Select("ReasonType=1 And CheckFlag=" & True) + For i = 0 To drSel.Length - 1 + If drSel(i)("ErrorQty") <= 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "[%ErrorNo%]:" & drSel(i)("ErrorNo") & ",[%ErrorQty%] [%IS LESS THAN%] 0"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + decT_DefectQty = decT_DefectQty + drSel(i)("ErrorQty") + Next + If decDefectQty <> decT_DefectQty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203085", "[%DefectQty%] [%IS NOT EQUAL TO%] [%TOTAL DEFECT REASON QTY%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + + Dim NewBinQty_Sun As Integer = 0 + + '[Mantis:86124]2021/01/19,Boyi,Check BinAssign + '93358: SDD210525_01-01/TriggerPS調整 93359: SDD210525_01-02/企業邏輯調整 若GoodBinState沒有資料 則不卡控 Edison 21/06/01 + If HaveLevel AndAlso iGoodBinStateQty <> 0 Then + + If (CInt(decGoodQty) <> iGoodBinStateQty) Then + bBinNew = True + If dtBinNew.Rows.Count > 0 Then + '0111211: [49-1]扫脚_check-out_bin分布调整 + '原卡控:比較最後bin分布數量是否=BR介面上的curQty + '移除此卡控。新邏輯:點選按鈕'bin分布調整'後,將'最終bin分布之總和'回壓至GoodQty + 'For Each drTemp As DataRow In dsWIP.Tables(strSysBin).Rows + ' NewBinQty_Sun += CInt(dtBinNew.Rows(0)(drTemp("BinNo").ToString)) + 'Next + 'If (NewBinQty_Sun <> decGoodQty) Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200060", "[%BinStateAdjust Qty is not equal GoodQty%]"), MsgBoxStyle.Exclamation, Me.Text) + ' Exit Sub + 'End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200005", "[%Please Assign BinState%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + Else + bBinNew = False + End If + '0111211: [49-1]扫脚_check-out_bin分布调整 + '介面上的良品數與損壞數之總和,必須=curQty + If decGoodQty + decScrapQty + CInt(decLossQty) <> CInt(txtCurQty.Text) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "[%Sum of GoodQty and ScrapQty%]: " & decGoodQty + decScrapQty & " [%NOTEQUALTO%][%CurQty%]: " & txtCurQty.Text & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + + + '2.格式化資料Attrib-------------------------------------------------------------------------------------------- + Dim strAttrib As String = "" + Dim strTemp As String + + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + 'Temp:Attrib + 'dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "Not (AttribPhase = " & PhaseNo & " And AttribSource = 0)" '所有Attrib,除了Current Phase KeyIn + 'BR只處理CurPhase & AllPhase的Attrib(不包含KeyIn,KeyIn於後處理),其他非本Phase不可更動. + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "(AttribPhase = " & PhaseNo & " or AttribPhase = 99) And AttribSource <> 0" + For i = 0 To dsWIP.Tables(tblTAttrib).DefaultView.Count - 1 + strTemp = CombineXMLValue("attribno", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribNo"))) & + CombineXMLValue("attribtype", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribType")) & + CombineXMLValue("attribsequence", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribSequence")) & + CombineXMLValue("attribsource", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribSource")) & + CombineXMLValue("attribphase", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribPhase")) & + CombineXMLValue("savetolotpropertyno", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("SaveToLotPropertyNo"))) + If IsDBNull(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribValue")) Then + strTemp += CombineXMLValue("attribvalue", "") + Else + strTemp += CombineXMLValue("attribvalue", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribValue"))) + End If + strAttrib += CombineXMLValueTag(strTemp) + Next + '還原顯示 + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "AttribSource <> 0 And AttribSource <> 1 And (AttribPhase = " & PhaseNo & " or AttribPhase = 99)" 'Source = Not KeyIn, Not Calculate ,Current and All phase + + 'Temp:Attrib_KeyIn + For i = 0 To dtKeyIn.Rows.Count - 1 + If IsDBNull(dtKeyIn.Rows(i)("AttribValue")) = True Then + dtKeyIn.Rows(i)("AttribValue") = "" + End If + 'R1102001 改由ChkControlRule時才判斷 By Acer 2011/02/21 + 'If dtKeyIn.Rows(i)("AttribValue") = "" Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%AttribValue%] of [%AttribNo%]:" & dtKeyIn.Rows(i)("AttribNo") & " is empty!!"), MsgBoxStyle.Exclamation, Me.Text) + ' GoTo lblExitProcedure + 'End If + + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo='" & dtKeyIn.Rows(i)("AttribNo") & "'") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203010", "[%AttribNo%]:" & dtKeyIn.Rows(i)("AttribNo")), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + Else + strTemp = CombineXMLValue("attribno", CInput(dtKeyIn.Rows(i)("AttribNo"))) & + CombineXMLValue("attribtype", drSel(0)("AttribType")) & + CombineXMLValue("attribsequence", drSel(0)("AttribSequence")) & + CombineXMLValue("attribsource", drSel(0)("AttribSource")) & + CombineXMLValue("attribphase", drSel(0)("AttribPhase")) & + CombineXMLValue("attribvalue", CInput(dtKeyIn.Rows(i)("AttribValue"))) & + CombineXMLValue("savetolotpropertyno", CInput(drSel(0)("SaveToLotPropertyNo"))) + '2015-12-18, Joe, Add QCItemNo + If IsDBNull(drSel(0)("QCItemNo")) Then + strTemp += CombineXMLValue("qcitemno", "") + Else + strTemp += CombineXMLValue("qcitemno", CInput(drSel(0)("QCItemNo"))) + End If + strAttrib += CombineXMLValueTag(strTemp) + End If + Next + End If + + '3.格式化資料Equipment----------------------------------------------------------------------------------------------- + Dim strEquipment As String = "" + Dim strEquipmentChamber As String = "" + If Not dsWIP.Tables(tblTEquipment) Is Nothing Then + For i = 0 To dsWIP.Tables(tblTEquipment).Rows.Count - 1 + strEquipment += CombineXMLValueTag(CombineXMLValue("equipmentno", CInput(dsWIP.Tables(tblTEquipment).Rows(i)("EquipmentNo")))) + Next + End If + If Not dsWIP.Tables("Chamber") Is Nothing Then + For Each dr As DataRow In dsWIP.Tables("Chamber").Rows + strEquipmentChamber += CombineXMLValueTag( + CombineXMLValue("equipmentno", CInput(dr("EquipmentNo"))) & + CombineXMLValue("belongequipmentno", dr("BelongEquipmentNo"))) + Next + End If + + '4.格式化資料Material----------------------------------------------------------------------------------------------- + Dim strMaterial As String = "" + Dim strMaterialExeCO As String = "" + Dim strMaterialLot As String = "" + Dim dtJoin As New DataTable 'Join兩個table + Dim dtMaterialLotNo As New DataTable + Dim drData As DataRow + Dim drSelect, drSub As DataRow() + + If (Not dsWIP.Tables(tblTMaterial) Is Nothing) AndAlso (dsWIP.Tables(tblTMaterial).Rows.Count > 0) Then + + '新建一Table,彙整主物料及其替代料(合併dsWIP.Tables(tblTMaterial)和dtMLot) + dtJoin = dsWIP.Tables(tblTMaterial).Copy + '新增OrgMaterialNo,紀錄原來的主物料用 + Dim colOrgMaterialNo As New DataColumn With { + .ColumnName = "OrgMaterialNo", + .DataType = System.Type.GetType("System.String"), + .DefaultValue = 0, + .AllowDBNull = False + } + dtJoin.Columns.Add(colOrgMaterialNo) + + '紀錄原來的主物料 + For i = 0 To dtJoin.Rows.Count - 1 + dtJoin.Rows(i)("OrgMaterialNo") = dtJoin.Rows(i)("MaterialNo") + Next + + For i = 0 To dtMLot.Rows.Count - 1 + drSelect = dtJoin.Select("MaterialNo='" & dtMLot.Rows(i)("SubstituteMaterialNo") & "' And OrgMaterialNo='" & dtMLot.Rows(i)("MaterialNo") & "'") + If drSelect.Length > 0 Then + drSub = dtMLot.Select("SubstituteMaterialNo='" & drSelect(0)("MaterialNo") & "'") + Dim intSumUseQty As Decimal = 0 '使用數量加總 + For j = 0 To drSub.Length - 1 + intSumUseQty = intSumUseQty + drSub(j)("UseQty") + Next + drSelect(0)("UseQty") = intSumUseQty + Else + drSelect = dtJoin.Select("MaterialNo='" & dtMLot.Rows(i)("MaterialNo") & "'") + + '如果只有選取替代料而無選取主料,要將主料的UseQty設為0 + drSub = dtMLot.Select("SubstituteMaterialNo='" & drSelect(0)("MaterialNo") & "' And MaterialNo='" & drSelect(0)("OrgMaterialNo") & "'") + If drSub.Length = 0 Then drSelect(0)("UseQty") = 0 + + drData = dtJoin.NewRow() + drData("OrgMaterialNo") = dtMLot.Rows(i)("MaterialNo") '紀錄原來的主物料 + drData("MaterialNo") = dtMLot.Rows(i)("SubstituteMaterialNo") '把MaterialNo替換成SubstituteMaterialNo + drData("MaterialType") = dtMLot.Rows(i)("SubstituteMaterialType") + drData("MaterialLevelShow") = dtMLot.Rows(i)("SubstituteMaterialLevel") + drData("UseQty") = dtMLot.Rows(i)("UseQty") + drData("CheckLotNo") = dtMLot.Rows(i)("CheckLotNo") + + '物料WIP INV投料點為2,半成品WIP INV投料點為4 + '因用料清單是紀錄主料的投料點如果主料與替代料的物料位階不同,則投料點需替換。 + If drSelect(0)("MaterialLevelShow") = 0 Then + If dtMLot.Rows(i)("SubstituteMaterialLevel") = 1 Then + If drSelect(0)("PutInPlaceType") = 2 Then + drData("PutInPlaceType") = 4 + Else + drData("PutInPlaceType") = drSelect(0)("PutInPlaceType") + End If + Else + drData("PutInPlaceType") = drSelect(0)("PutInPlaceType") + End If + Else + If dtMLot.Rows(i)("SubstituteMaterialLevel") = 0 Then + If drSelect(0)("PutInPlaceType") = 4 Then + drData("PutInPlaceType") = 2 + Else + drData("PutInPlaceType") = drSelect(0)("PutInPlaceType") + End If + Else + drData("PutInPlaceType") = drSelect(0)("PutInPlaceType") + End If + End If + drData("StdQty") = dtMLot.Rows(i)("SubstituteStdQty") + drData("DecreaseRate") = drSelect(0)("DecreaseRate") + drData("UnitNo") = drSelect(0)("UnitNo") + dtJoin.Rows.Add(drData) + End If + Next + + For Each drRow As DataRow In dsWIP.Tables(tblTMaterial).Rows + If drRow("UseQty") = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200017", "[%MaterialNo%]: " & drRow("MaterialNo") & ", [%USEQTY%] [%MUST BE GREATER THAN%] 0"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + Next + + '傳入匯整後的資料 + For i = 0 To dtJoin.Rows.Count - 1 + If dtJoin.Rows(i)("UseQty") > 0 Then '過濾UseQty為零的 + strMaterial += CombineXMLValueTag( + CombineXMLValue("orgmaterialno", CInput(dtJoin.Rows(i)("OrgMaterialNo"))) & + CombineXMLValue("materialno", CInput(dtJoin.Rows(i)("MaterialNo"))) & + CombineXMLValue("materialtype", CInput(dtJoin.Rows(i)("MaterialType"))) & + CombineXMLValue("materiallevel", dtJoin.Rows(i)("MaterialLevelShow")) & + CombineXMLValue("useqty", dtJoin.Rows(i)("UseQty")) & + CombineXMLValue("checklotno", CInput(dtJoin.Rows(i)("CheckLotNo"))) & + CombineXMLValue("putinplacetype", dtJoin.Rows(i)("PutInPlaceType")) & + CombineXMLValue("stdqty", dtJoin.Rows(i)("StdQty")) & + CombineXMLValue("decreaserate", dtJoin.Rows(i)("DecreaseRate")) & + CombineXMLValue("unitno", CInput(dtJoin.Rows(i)("UnitNo")))) + End If + Next + + '因OrgMaterialNo在作Exe_CheckOut時不使用,Exe_CheckOut所使用的物料用量資料先合併 + Dim dtMaterialNo As New DataTable + Dim drAddMNo As DataRow + Dim drSelMNo As DataRow() + dtMaterialNo.Columns.Add("MaterialNo", System.Type.GetType("System.String")) + dtMaterialNo.Columns.Add("MaterialType", System.Type.GetType("System.String")) + dtMaterialNo.Columns.Add("MaterialLevel", System.Type.GetType("System.String")) + dtMaterialNo.Columns.Add("UseQty", System.Type.GetType("System.Decimal")) + dtMaterialNo.Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) + dtMaterialNo.Columns.Add("PutInPlaceType", System.Type.GetType("System.Int16")) + dtMaterialNo.Columns.Add("StdQty", System.Type.GetType("System.Decimal")) + dtMaterialNo.Columns.Add("DecreaseRate", System.Type.GetType("System.Decimal")) + dtMaterialNo.Columns.Add("UnitNo", System.Type.GetType("System.String")) + For i = 0 To dtJoin.Rows.Count - 1 + '過濾UseQty為零的 + If dtJoin.Rows(i)("UseQty") > 0 Then + drSelMNo = dtMaterialNo.Select("MaterialNo = '" & dtJoin.Rows(i)("MaterialNo") & "'") + If drSelMNo.Length = 0 Then + drAddMNo = dtMaterialNo.NewRow + drAddMNo("MaterialNo") = dtJoin.Rows(i)("MaterialNo") + drAddMNo("MaterialType") = dtJoin.Rows(i)("MaterialType") + drAddMNo("MaterialLevel") = dtJoin.Rows(i)("MaterialLevelShow") + drAddMNo("UseQty") = dtJoin.Rows(i)("UseQty") + drAddMNo("CheckLotNo") = dtJoin.Rows(i)("CheckLotNo") + drAddMNo("PutInPlaceType") = dtJoin.Rows(i)("PutInPlaceType") + drAddMNo("StdQty") = dtJoin.Rows(i)("StdQty") + drAddMNo("DecreaseRate") = dtJoin.Rows(i)("DecreaseRate") + drAddMNo("UnitNo") = dtJoin.Rows(i)("UnitNo") + dtMaterialNo.Rows.Add(drAddMNo) + Else + drSelMNo(0)("UseQty") += dtJoin.Rows(i)("UseQty") + drSelMNo(0)("StdQty") += dtJoin.Rows(i)("StdQty") + drSelMNo(0)("DecreaseRate") = (drSelect(0)("DecreaseRate") + dtJoin.Rows(i)("DecreaseRate")) / 2 + End If + End If + Next + + '執行Exe_CheckOut與物料總用量檢查時所傳入的strMaterial + For i = 0 To dtMaterialNo.Rows.Count - 1 + strMaterialExeCO += CombineXMLValueTag( + CombineXMLValue("materialno", CInput(dtMaterialNo.Rows(i)("MaterialNo"))) & + CombineXMLValue("materialtype", CInput(dtMaterialNo.Rows(i)("MaterialType"))) & + CombineXMLValue("materiallevel", dtMaterialNo.Rows(i)("MaterialLevel")) & + CombineXMLValue("useqty", dtMaterialNo.Rows(i)("UseQty")) & + CombineXMLValue("checklotno", CInput(dtMaterialNo.Rows(i)("CheckLotNo"))) & + CombineXMLValue("putinplacetype", dtMaterialNo.Rows(i)("PutInPlaceType")) & + CombineXMLValue("stdqty", dtMaterialNo.Rows(i)("StdQty")) & + CombineXMLValue("decreaserate", dtMaterialNo.Rows(i)("DecreaseRate")) & + CombineXMLValue("unitno", CInput(dtMaterialNo.Rows(i)("UnitNo")))) + Next + + '------------------------------------------物料料批資訊strMaterialLot--------------------------------------------- + '因替代料有可能相同,故相同的替代料料批要合併 + Dim drAddMLotNo As DataRow + Dim drSelMLotNo As DataRow() + dtMaterialLotNo.Columns.Add("EquipmentNo", System.Type.GetType("System.String")) + dtMaterialLotNo.Columns.Add("MaterialNo", System.Type.GetType("System.String")) + dtMaterialLotNo.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtMaterialLotNo.Columns.Add("UseQty", System.Type.GetType("System.Decimal")) + ' 2016/10/26 YF, 設備用料管理替代料不用合併, 需依主料&替代料來判斷扣料 + dtMaterialLotNo.Columns.Add("OrgMaterialNo", System.Type.GetType("System.String")) + + For i = 0 To dtMLot.Rows.Count - 1 + + If (dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString = "1") Then + ' 2016/10/26 YF, 設備用料管理 + drAddMLotNo = dtMaterialLotNo.NewRow + drAddMLotNo("EquipmentNo") = dtMLot.Rows(i)("EquipmentNo") + drAddMLotNo("MaterialNo") = dtMLot.Rows(i)("SubstituteMaterialNo") + drAddMLotNo("OrgMaterialNo") = dtMLot.Rows(i)("MaterialNo") + drAddMLotNo("MaterialLotNo") = dtMLot.Rows(i)("MaterialLotNo") + drAddMLotNo("UseQty") = dtMLot.Rows(i)("UseQty") + dtMaterialLotNo.Rows.Add(drAddMLotNo) + Else + drSelMLotNo = dtMaterialLotNo.Select("MaterialNo = '" & dtMLot.Rows(i)("SubstituteMaterialNo") & "' And MaterialLotNo ='" & dtMLot.Rows(i)("MaterialLotNo") & "'") + If drSelMLotNo.Length = 0 Then + drAddMLotNo = dtMaterialLotNo.NewRow + drAddMLotNo("EquipmentNo") = dtMLot.Rows(i)("EquipmentNo") + drAddMLotNo("MaterialNo") = dtMLot.Rows(i)("SubstituteMaterialNo") + drAddMLotNo("OrgMaterialNo") = dtMLot.Rows(i)("MaterialNo") + drAddMLotNo("MaterialLotNo") = dtMLot.Rows(i)("MaterialLotNo") + drAddMLotNo("UseQty") = dtMLot.Rows(i)("UseQty") + dtMaterialLotNo.Rows.Add(drAddMLotNo) + Else + drSelMLotNo(0)("UseQty") += dtMLot.Rows(i)("UseQty") + End If + End If + Next + + For i = 0 To dtMaterialLotNo.Rows.Count - 1 + If dtMaterialLotNo.Rows(i)("UseQty") > 0 Then + strMaterialLot += CombineXMLValueTag( + CombineXMLValue("materialno", CInput(dtMaterialLotNo.Rows(i)("MaterialNo"))) & + CombineXMLValue("orgmaterialno", CInput(dtMaterialLotNo.Rows(i)("OrgMaterialNo").ToString)) & + CombineXMLValue("materiallotno", CInput(dtMaterialLotNo.Rows(i)("MaterialLotNo"))) & + CombineXMLValue("qty", dtMaterialLotNo.Rows(i)("UseQty")) & + CombineXMLValue("equipmentno", CInput(dtMaterialLotNo.Rows(i)("EquipmentNo")))) + End If + Next + End If + + '5.格式化不良原因------------------------------------------------------------------------------------------------- + Dim strError As String = "" + + drSel = dsWIP.Tables(tblOPError).Select("CheckFlag=" & True) + For i = 0 To drSel.Length - 1 + strError += CombineXMLValueTag( + CombineXMLValue("errorno", CInput(drSel(i)("ErrorNo"))) & + CombineXMLValue("errorqty", drSel(i)("ErrorQty")) & + CombineXMLValue("errorlevel", drSel(i)("ReasonLevel"))) + Next + + '聯產品有勾起則必需有聯產品資料 + Dim blnPRDChgDetail As Boolean = False + + If chkUnionProductNo.Checked Then + If txtUnionProductNo.Text = "" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%UnionProductNo%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + '若為新模式變更, 但此BR不為作業站最後一個BR時, 需提示不可變更聯產品 + drSel = dsWIP.Tables(tblSYSParameter).Select("ParameterNo = 'ProductChangeUpdDetail'") + If drSel.Length > 0 Then + If drSel(0)("ParameterValue").ToString = "1" Then + blnPRDChgDetail = True + End If + End If + End If + + '6.檢查是否允許執行 ---------------------------------------------------------------------------------------------- + If ChkLotStamp(LotNo, UserId, dsWIP.Tables(tblLotState).Rows(0)("LotStamp")) < 0 Then GoTo lblExitProcedure + + + Dim strMsg As String + + '8.Control Rule Check -------------------------------------------------------------------------------------------- + Dim strLinkName As String + Dim strMailGroupNo As String = "" + Dim strRuleNo As String = defString + Dim intERFType As Integer = defInteger + Dim dsTestValue As DataSet + Dim strERFMsg As String + Dim strHoldLotNo As String = defString + + If ChkControlRule(LotNo, UserId, dsWIP.Tables(tblLotState).Rows(0)("LotStamp"), + strAttrib, strLinkName, strMsg, strRuleNo, intERFType, strMailGroupNo, strError, , , dsTestValue) < 0 Then GoTo lblExitProcedure + + '2015-12-07, Joe, Check SPC Contorl + If funChkSPCControl_Var(LotNo, strAttrib, dsTestValue, strLinkName, intERFType, strERFMsg) < 0 Then GoTo lblExitProcedure + strERFMsg = ChgTranslateErrorMsg(strERFMsg) + + '7.ChkMaterial--------------------------------------------------------------------------------------------- + '2022/8/23,Ning, 117535: 厦门云天--生产批进站后设备故障再修复,出站报错, 無用料資訊不需查核存量 + If Not dsWIP.Tables(tblTMaterial) Is Nothing AndAlso dsWIP.Tables(tblTMaterial).Rows.Count > 0 Then + If funCheckMTLForBR(dtMLot.Copy, strLinkName, intERFType, strRuleNo) = False Then + GoTo lblExitProcedure + End If + End If + + '若需變更明細, 則需檢查此BR是否為此作業站最後一個BR + If chkUnionProductNo.Checked AndAlso blnPRDChgDetail = True Then + If funChkLastBR(strLinkName) = False Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "[%Current BR is not the last BR in OP, cannot change Product%]!"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + End If + + '9.Execute CheckOut ----------------------------------------------------------------------------------------------- + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("linkname", "LinkName", "String", CInput(strLinkName), "") + strParameter += CombineXMLParameter("lotstamp", "LotStamp", "Decimal", dsWIP.Tables(tblLotState).Rows(0)("LotStamp"), "") + strParameter += CombineXMLParameter("shiftno", "ShiftNo", "String", CInput(txtShiftNo.Text), "") + 'strParameter += CombineXMLParameter("checkouttime", "CheckOutTime", "String", dtpcheckouttime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") '2017/11/06 mark by KunYuan:移至下方處理 + strParameter += CombineXMLParameterMultiValue("attrib", "Attrib", "String", strAttrib, "") + strParameter += CombineXMLParameterMultiValue("equipment", "Equipment", "String", strEquipment, "") + strParameter += CombineXMLParameterMultiValue("material", "Material", "String", strMaterialExeCO, "") 'Kevin 2012/11/22,修改傳入的物料資訊 + strParameter += CombineXMLParameterMultiValue("materiallot", "MaterialLot", "String", strMaterialLot, "") + If (bBinNew = True) Then + For Each drTemp As DataRow In dsWIP.Tables(strSysBin).Rows + strNewBin += CombineXMLValueTag( + CombineXMLValue("binno", CInput(drTemp("BinNo").ToString)) & + CombineXMLValue("binqty", CInput(dtBinNew.Rows(0)(drTemp("BinNo").ToString)))) + + Next + + strParameter += CombineXMLParameterMultiValue("newbin", "NewBin", "String", strNewBin, "") + End If + strParameter += CombineXMLParameterMultiValue("error", "Error", "String", strError, "") + strParameter += CombineXMLParameter("lotrecord", "LotRecord", "String", CInput(txtLotRecord.Text), "") + strParameter += CombineXMLParameter("ruleno", "RuleNo", "String", CInput(strRuleNo), "") 'Added by Jialing 2011/02/17 + '20180105 KevinChang 若有選取則加入聯產品資訊 + '2020/6/10, Mantis 0073105: [6.0.5] 產品變更_L_CO_GEN 調整, 有勾起聯產品才傳入聯產品資訊 + If Not IsDBNull(txtUnionProductNo.Text) AndAlso Not String.IsNullOrEmpty(txtUnionProductNo.Text) Then + strParameter += CombineXMLParameter("fromproductno", "FromProductNo", "String", dsWIP.Tables(tbllotbasis).Rows(0)("ProductNo").ToString, "") + strParameter += CombineXMLParameter("fromproductversion", "FromProductVersion", "String", dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString, "") + strParameter += CombineXMLParameter("toproductno", "ToProductNo", "String", CInput(txtUnionProductNo.Text), "") + strParameter += CombineXMLParameter("toproductversion", "ToProductVersion", "String", CInput(txtUnionProductVersion.Text), "") + strParameter += CombineXMLParameter("toproductunitno", "ToProductUnitNo", "String", CInput(txtUnionProductUnit.Text), "") + End If + + '2017/11/06 KunYuan:當有勾選『變更結束加工時間』,再傳入CheckOutTime + If chkUpdCheckOutTime.Checked Then + strParameter += CombineXMLParameter("checkouttime", "CheckOutTime", "String", dtpcheckouttime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") + End If + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + '2019/06/20 Lena, Mantis: 0058845 [WIP] CI/CO執行時間紀錄 + '新增參數 LogOn = True, 記錄執行時間. + OutXml = InvokeSrv("wsWIP.Exe_CheckOut", InXml, LogOn:=True) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then '找出Exception訊並顯示出來 + '成功執行完成,避免再按下一次 + btnConfirm.Enabled = False + + '2017/11/06 KunYuan:變更結束加工時間checkbox預設不勾選 + chkUpdCheckOutTime.Checked = False + + '惟全:判斷是否開立異常單 + If XmlDoc.GetElementsByTagName("holdlotno").Count > 0 Then + If XmlDoc.GetElementsByTagName("holdlotno").Item(0).SelectNodes("value").Count > 0 Then + strHoldLotNo = XmlDoc.DocumentElement.GetElementsByTagName("holdlotno").Item(0).SelectNodes("value").Item(0).InnerText + + '2021/11/24,Ning, 102031: 【瑶华】qtime卡控不断触发 + strLinkName = "HOLD" + End If + End If + + If strLinkName <> "HOLD" And strLinkName <> "WAIT" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-000001", "[%LotNo%]:" & LotNo & " [%Check Out%] [%Successfully%]"), MsgBoxStyle.Information, Me.Text) + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + GoTo lblExitProcedure + End If + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + GoTo lblExitProcedure + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + GoTo lblExitProcedure + End Try + + Me.Close() + + '惟全:判斷是否開立異常單 + If strHoldLotNo <> defString Then + If intERFType = defInteger Then + intERFType = 0 + End If + + '89904: 6.0.5.12 L_CO_GEN出站觸發Hold 開立異常單未帶出異常說明 2021/03/23 + '開立異常單 + '//CCC 07,0608: 傳入過帳人員 + ' 2016/08/12 YF, WP_BRERFCreate + 'Dim parameters As New Dictionary(Of String, Object) + 'parameters.Add("LotNo", strHoldLotNo) + 'parameters.Add("UserId", UserId) + 'parameters.Add("ERFType", 1) + 'parameters.Add("RuleNo", strExceedTime_Rule) + 'Me.ObjectFileHandler.Execute("WP_BRERFCreate", parameters) + 'Exit Sub + If strRuleNo <> defString Then + strRuleNo += "," & strExceedTime_Rule + Else + strRuleNo = strExceedTime_Rule + End If + + End If + + '10.Mail------------------------------------------------------------------------------------------------------------- + '以下的執行,不管成功失敗,都讓FormClose,代表此BR已完成 + + If strMailGroupNo <> "" Then + Call SendEmailToERFGroup_NoneERF(LotNo, UserId, strMailGroupNo, strMsg, + dsWIP.Tables(tblLotState).Rows(0)("OPNo"), dsWIP.Tables(tblLotState).Rows(0)("OPName"), dsWIP.Tables(tblLotState).Rows(0)("BRNo")) + End If + + '11.Transfer Lot----------------------------------------------------------------------------------------------------- + '以下的執行,不管成功失敗,都讓FormClose,代表此BR已完成 + '若再執行Confirm一次則不正確,同一BR會執行多次 + '2015-12-21, Joe, 加ERFMsg + '2020/6/11, Ning, 若有變更產品且為新模式, LinkName = PASS則不需TransferLot + If chkUnionProductNo.Checked = True AndAlso blnPRDChgDetail = True AndAlso strLinkName.ToUpper = "PASS" Then + Else + Call BRTransferLot(LotNo, UserId, strLinkName, intERFType, strRuleNo, , strERFMsg) + End If + + gReturnKeyValue = LotNo + + +lblExitProcedure: + + Cursor.Current = Cursors.Default + Exit Sub + + End Sub + + Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click + + Cursor.Current = Cursors.WaitCursor + + '檢查此 BR 是否此站第一次執行,若是第一次執行則以Reverse取消Trigger OP的動作 + Try + '2019/12/17 OwenLiu, Mantis:0063698, ReverseTriggerOP統一呼叫 WIP_Kit共用函式 + 'Call ExeReverseTriggerOP(UserId, LotNo, RevLotSerial, RevLotStamp) + + '2020/3/17,Ning,不啟用Reverse時的ReverseTriggerOP + '2022/9/19,Ning, 116091: 各BR 在畫面關閉動作執行ReverseTriggerOP,若有執行失敗須把訊息顯示:統一在form_closing時處理 + 'Call ExeReverseTriggerOP_NotUseUndo(UserId, LotNo, RevLotSerial, RevLotStamp) + + Catch e1 As Exception + Finally + Me.Close() + End Try + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub btnMultiUser_Click(sender As System.Object, e As System.EventArgs) Handles btnMultiUser.Click + + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Dim parameters As New Dictionary(Of String, Object) + parameters.Add("CallType", 2) + parameters.Add("UserID", UserId) + parameters.Add("CheckOutTime", dtpcheckouttime.Value) + parameters.Add("drLotInfo", dsWIP.Tables(tblLotState).Rows(0)) + '2019/10/18 Grace 調整ObjectID + Me.ObjectFileHandler.Execute("WP_OperatorLogIn_Lot", parameters) + 'Me.ObjectFileHandler.Execute("WP_OperatorLogin_Lot", parameters) + 'Dim frmLogin As New frmOperatorLogin_Lot + 'frmLogin.CallType = 2 'CO + 'frmLogin.UserID = UserId + 'frmLogin.CheckOutTime = dtpcheckouttime.Value + 'frmLogin.drLotInfo = dsWIP.Tables(tblLotState).Rows(0) + 'frmLogin.ShowDialog() + 'frmLogin.Dispose() + + End Sub + +#End Region + +#Region "--- Material ---" + + Private Sub txtMaterialNo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMaterialNo.KeyPress + + If e.KeyChar <> Convert.ToChar(13) Then Exit Sub + + If dsWIP.Tables(tblTMaterial) Is Nothing OrElse txtMaterialNo.Text.Trim = "" Then Exit Sub + txtMaterialNo.Text = txtMaterialNo.Text.ToUpper '輸入小寫自動轉成大寫 + 'Gary Lu:刷完物料編號後準備刷物料批號 + txtMaterialLotNo.Focus() + + 'Cursor.Current = Cursors.WaitCursor + + 'Dim drSel() As DataRow + 'drSel = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & txtMaterialNo.Text & "'") + 'If drSel.Length > 0 Then + ' Dim frmMaterial As frmMaterialQtyInput_Main + ' frmMaterial = New frmMaterialQtyInput_Main + ' frmMaterial.drMaterial = drSel(0) + ' 'frmMaterial.LotStateQty = txtCurQty.Text + ' 'If drSel(0)("CheckLotNo") = 1 Then frmMaterial.dtMLot = dtMLot + ' frmMaterial.dtMLot = dtMLot + ' 'Show Form + ' frmMaterial.ShowDialog() + + ' 'Return Value + ' 'If drSel(0)("CheckLotNo") = 1 Then dtMLot = frmMaterial.dtMLot '將MaterialLot輸入資料取回 + ' dtMLot = frmMaterial.dtMLot '將MaterialLot輸入資料取回 + ' If gReturnKeyValue <> defString Then '更新數量 + ' drSel(0).BeginEdit() + ' drSel(0)("UseQty") = gReturnKeyValue + ' drSel(0).EndEdit() + ' End If + ' frmMaterial.Dispose() + 'End If + + 'Cursor.Current = Cursors.Default + + End Sub + + Private Sub btnKeyIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeyIn.Click + + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + + Cursor.Current = Cursors.WaitCursor + + '找出DataSet中在目前游標列的資料列(DataRow) + Dim strMaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + Dim drSel() As DataRow = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & strMaterialNo & "'") + If drSel.Length = 0 Then Exit Sub + + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Dim drTMaterial As DataRow = drSel(0) + Dim parameters As New Dictionary(Of String, Object) From { + {"drMaterial", drTMaterial}, + {"dtMLot", dtMLot} + } + Me.ObjectFileHandler.Execute("WP_MaterialQtyInput_Main", parameters) + + dtMLot = parameters("dtMLot") + For Each drMLot As DataRow In dtMLot.Rows + If drMLot("UseQty") <= 0 Then + drMLot("UseQty") = funCalculateUseQty(drTMaterial, drMLot) + End If + Next + + funUpdateSumUseQty(drTMaterial) + + 'ActiveRow若消失→ActiveRow設定在上一層的UltraGrid上 + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then + iugMaterial.iMESUltraGrid.ActiveRow = FindRecordPosition(iugMaterial, "MaterialNo", strMaterialNo) + End If + + 'Gary Lu 20131105:使用者改用「輸入」方式選擇要扣那些料批的料後,物料編號和物料批號兩個輸入方塊全清空 + txtMaterialLotNo.Clear() + txtMaterialNo.Clear() + txtMaterialNo.Focus() + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDel.Click + + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + + Cursor.Current = Cursors.WaitCursor + Dim strMaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + '找出DataSet中在目前游標列的資料列(DataRow) + Dim drSel() As DataRow + 'Gary Lu 20131106:判斷使用者要刪除的是怎樣的資料 + If iugMaterial.iMESUltraGrid.ActiveRow.Band.Key = tblTMaterial Then + '要刪除的是主料的用料資訊 + drSel = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & strMaterialNo & "'") + If drSel.Length > 0 Then + dsWIP.Tables(tblTMaterial).Rows.Remove(drSel(0)) + dsWIP.Tables(tblTMaterial).AcceptChanges() + End If + 'dtMLot關於此主料資訊一併清除 + drSel = dtMLot.Select("MaterialNo = '" & strMaterialNo & "'") + For i As Integer = 0 To drSel.Length - 1 + dtMLot.Rows.Remove(drSel(i)) + Next + + dtMLot.AcceptChanges() + + ElseIf iugMaterial.iMESUltraGrid.ActiveRow.Band.Key = dtMLot.TableName Then + Dim strSubstituteMaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("SubstituteMaterialNo").Value + + '要刪除的是使用者所選的一筆要扣料的資訊 + drSel = dtMLot.Select("MaterialNo='" & strMaterialNo & + "' and SubstituteMaterialNo='" & strSubstituteMaterialNo & + "' and MaterialLotNo='" & iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialLotNo").Value & "'") + '紀錄物料編號 + + Dim decMaterialUseQty As Decimal = iugMaterial.iMESUltraGrid.ActiveRow.Cells("UseQty").Value + If drSel.Length > 0 Then + dtMLot.Rows.Remove(drSel(0)) + dtMLot.AcceptChanges() + End If + 'TempMaterial中的使用數量必須更新 + drSel = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & strMaterialNo & "'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("UseQty") -= decMaterialUseQty + drSel(0).EndEdit() + End If + + '更新ActiveRow的位置 + drSel = dtMLot.Select("MaterialNo='" & strMaterialNo & "'") + If drSel.Length > 0 Then + '還有主料本身或替代料的用料資訊 + iugMaterial.iMESUltraGrid.ActiveRow = FindRecordPosition(iugMaterial, "MaterialNo", strMaterialNo).GetChild(ChildRow.First) + Else + '已沒有用料資訊了 + iugMaterial.iMESUltraGrid.ActiveRow = FindRecordPosition(iugMaterial, "MaterialNo", strMaterialNo) + End If + End If + drSel = Nothing + + Cursor.Current = Cursors.Default + + End Sub + + +#End Region + +#Region "--- Error ---" + + Private Sub txtErrorNo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtErrorNo.KeyPress + + If e.KeyChar = Convert.ToChar(13) Then + If txtErrorNo.Text.Trim = "" Then Exit Sub + txtErrorQty.Focus() + End If + + End Sub + + Private Sub txtErrorQty_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtErrorQty.KeyPress, txtUnionProductVersion.KeyPress + + If e.KeyChar <> Convert.ToChar(13) Then Exit Sub + + If txtErrorNo.Text.Trim = "" Then Exit Sub + If txtErrorQty.Text.Trim = "" Then Exit Sub + + Cursor.Current = Cursors.WaitCursor + + If IsNumeric(txtErrorQty.Text) Then + If txtErrorQty.Text <= 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200017", "[%ErrorQty%]"), MsgBoxStyle.Exclamation, Me.Text) + txtErrorQty.Focus() + Exit Sub + End If + 'If InStr(txtErrorQty.Text, ".", CompareMethod.Text) > 0 Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "ErrorQty can't be decimal!!"), MsgBoxStyle.Exclamation, Me.Text) + ' txtErrorQty.Focus() + ' Exit Sub + 'End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%ErrorQty%]"), MsgBoxStyle.Exclamation, Me.Text) + txtErrorQty.Focus() + Exit Sub + End If + + Dim drSel() As DataRow + Dim strErrorNo As String + strErrorNo = txtErrorNo.Text.Trim.ToUpper + drSel = dsWIP.Tables(tblOPError).Select("ErrorNo='" & strErrorNo & "'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("CheckFlag") = True + drSel(0)("ErrorQty") = txtErrorQty.Text + drSel(0).EndEdit() + + 'Focus在勾選的Row. + iugError.iMESUltraGrid.Selected.Rows.Clear() + ugrRow = FindRecordPosition(iugError, "ErrorNo", strErrorNo) + If Not ugrRow Is Nothing Then + iugError.iMESUltraGrid.ActiveRow = ugrRow + iugError.iMESUltraGrid.ActiveRow.Selected = True + End If + + '加入後清除 + txtErrorNo.Text = "" + txtErrorQty.Text = "" + txtErrorNo.Focus() + Else + txtErrorNo.Focus() + End If + drSel = Nothing + 'Elena 2011/11/8 R1111002 自動計算GoodQty、ScrapQty及DefectQty數量 + If funGetParameter("SysInfo", "CalculateQty") = 1 Then + Dim drSelError() As DataRow + Dim decScrapQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decScrapQty = decScrapQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decScrapQty + End If + drSelError = dtKeyIn.Select("AttribNo = 'GoodQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = CDec(txtCurQty.Text) - decScrapQty + End If + + Dim decDefectQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=1 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decDefectQty = decDefectQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'DefectQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decDefectQty + End If + drSelError = Nothing + End If + Cursor.Current = Cursors.Default + + End Sub + + +#End Region + +#Region "--- Control Enter,KeyPress ---" + + Private Sub txtLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLotNo.Enter + txtLotNo.SelectAll() + End Sub + Private Sub txtLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtLotNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtPriority_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPriority.Enter + txtPriority.SelectAll() + End Sub + Private Sub txtPriority_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtPriority.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtAreaNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtAreaNo.Enter + txtAreaNo.SelectAll() + End Sub + Private Sub txtAreaNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtAreaNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCurQty_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCurQty.Enter + txtCurQty.SelectAll() + End Sub + Private Sub txtCurQty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCurQty.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCurUnitNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCurUnitNo.Enter + txtCurUnitNo.SelectAll() + End Sub + Private Sub txtCurUnitNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCurUnitNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtSysQty_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSysQty.Enter + txtSysQty.SelectAll() + End Sub + Private Sub txtSysQty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSysQty.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtSysUnitNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSysUnitNo.Enter + txtSysUnitNo.SelectAll() + End Sub + Private Sub txtSysUnitNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSysUnitNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtOPNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOPNo.Enter + txtOPNo.SelectAll() + End Sub + Private Sub txtOPNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtOPNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtOPDescription_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOPDescription.Enter + txtOPDescription.SelectAll() + End Sub + Private Sub txtOPDescription_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtOPDescription.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCustomerLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCustomerLotNo.Enter + txtCustomerLotNo.SelectAll() + End Sub + Private Sub txtCustomerLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCustomerLotNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtMONo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMONo.Enter + txtMONo.SelectAll() + End Sub + Private Sub txtMONo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMONo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtEmployeeNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEmployeeNo.Enter + txtEmployeeNo.SelectAll() + End Sub + Private Sub txtEmployeeNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtEmployeeNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtShiftNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtShiftNo.Enter + txtShiftNo.SelectAll() + End Sub + Private Sub txtShiftNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtShiftNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtLotRecord_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLotRecord.Enter + txtLotRecord.SelectAll() + End Sub + + Private Sub txtProductNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtProductNo.Enter + txtProductNo.SelectAll() + End Sub + Private Sub txtProductNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtProductNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtMaterialLotNo_Enter(sender As System.Object, e As System.EventArgs) Handles txtMaterialLotNo.Enter + txtMaterialLotNo.SelectAll() + End Sub + Private Sub txtMaterialLotNo_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtMaterialLotNo.KeyPress + + If e.KeyChar <> Convert.ToChar(13) Then + Exit Sub + End If + + If txtMaterialLotNo.Text.Trim = "" Then + Exit Sub + End If + + ' 2016/10/27 YF, 依作業站用料選項處理用料機制 + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + Case "0" + ' 發料點(線邊倉或工單) + AutoFeedingByPutinPlace(txtMaterialNo.Text, txtMaterialLotNo.Text) + Case "1" + ' 設備 + '2019/9/6,Ning,Co時不允許設備上料 + 'AutoFeedingByEQP() + Case "2" + ' 生產線, 待組裝版再實作 + Case "3" + ' 工位, 待組裝版再實作 + Case Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-003000", "[%MaterialOption%]:" & dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString & " [%NOT DEFINE%]!"), MsgBoxStyle.Exclamation, Me.Text) + End Select + + End Sub + +#End Region + +#Region "--- Ultra Grid ---" + + Private Sub iugAttrib_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugAttrib.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblTAttrib).Columns.Count - 1 + Select Case dsWIP.Tables(tblTAttrib).Columns(i).ColumnName.ToUpper + Case "ATTRIBNO" + With .Bands(tblTAttrib).Columns("AttribNo") + .Header.Caption = "AttribNo" + .Width = 70 + .Header.VisiblePosition = 1 + End With + Case "ATTRIBNAME" + With .Bands(tblTAttrib).Columns("AttribName") + .Header.Caption = "AttribName" + .Width = 95 + .Header.VisiblePosition = 2 + End With + Case "ATTRIBVALUE" + With .Bands(tblTAttrib).Columns("AttribValue") + .Header.Caption = "AttribValue" + .Width = 80 + .Header.VisiblePosition = 3 + End With + Case "ATTRIBSOURCE" + With .Bands(tblTAttrib).Columns("AttribSource") + .Header.Caption = "AttribSource" + .Width = 65 + .Header.VisiblePosition = 4 + .ValueList = iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists("ASource") + End With + Case Else + With .Bands(tblTAttrib).Columns(dsWIP.Tables(tblTAttrib).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + End With + + + End Sub + + Private Sub iugAttrib_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugAttrib.iMESUltraGrid_InitializeRow + + Dim strAttribValue As String + strAttribValue = e.Row.Cells("AttribValue").Value.ToString.Trim + + '\\Server\01A.pdf + If Mid(strAttribValue, 1, 2) = "\\" Then + e.Row.Cells("AttribValue").Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + '\\HTTP + If Mid(strAttribValue.ToUpper, 1, 4) = "HTTP" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + '\\HTTPS + If Mid(strAttribValue.ToUpper, 1, 5) = "HTTPS" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + + End Sub + + Private Sub iugAttrib_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugAttrib.iMESUltraGrid_ClickCellButton + + Cursor.Current = Cursors.WaitCursor + + Dim strFilePath As String + + strFilePath = e.Cell.Row.Cells("AttribValue").Value.ToString.Trim + + If strFilePath = "" Then Exit Sub + + Try + Dim objProcess As New Process + objProcess.Start(strFilePath) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugMaterial.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblTMaterial).Columns.Count - 1 + Select Case dsWIP.Tables(tblTMaterial).Columns(i).ColumnName.ToUpper + Case "MATERIALLEVELSHOW" + With .Bands(tblTMaterial).Columns("MaterialLevelShow") + .Header.Caption = "MaterialLevelShow" + .Hidden = False + .CalculateAutoResizeWidth(PerformAutoSizeType.VisibleRows, True) + .Header.VisiblePosition = 0 + .ValueList = vlMaterialLevel + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "MATERIALNO" + With .Bands(tblTMaterial).Columns("MaterialNo") + .Header.Caption = "MaterialNo" + .Width = 110 + .Header.VisiblePosition = 1 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "STDQTY" + With .Bands(tblTMaterial).Columns("StdQty") + .Header.Caption = "StdQty" + .Width = 100 + .Header.VisiblePosition = 2 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .Format = "0.########" + .TabStop = False + End With + Case "STDUSEQTY" + With .Bands(tblTMaterial).Columns("StdUseQty") + .Header.Caption = "StdUseQty" + .Width = 80 + .Header.VisiblePosition = 3 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "USEQTY" + With .Bands(tblTMaterial).Columns("UseQty") + .Header.Caption = "UseQty" + .Width = 80 + .Header.VisiblePosition = 4 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .CellAppearance.BackColor = System.Drawing.Color.White + .CellAppearance.ForeColor = System.Drawing.Color.Blue + End With + Case "UNITNO" + With .Bands(tblTMaterial).Columns("UnitNo") + .Header.Caption = "UnitNo" + .Width = 40 + .Header.VisiblePosition = 5 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case Else + With .Bands(tblTMaterial).Columns(dsWIP.Tables(tblTMaterial).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + If Not dtMLot Is Nothing Then + For Each dc As DataColumn In dsWIP.Tables(dsWIP.Tables(dtMLot.TableName).TableName).Columns + With .Bands(dsWIP.Tables(dtMLot.TableName).TableName).Columns(dc.ColumnName.ToUpper) + .Hidden = True + End With + Next + + With .Bands(dsWIP.Tables(dtMLot.TableName).TableName) + With .Columns("EquipmentNo") + .Width = 110 + .Header.VisiblePosition = 1 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + If blnByEQP = True Then + .Hidden = False + Else + .Hidden = True + End If + End With + With .Columns("MaterialNo") + .Width = 110 + .Header.VisiblePosition = 1 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Hidden = True + End With + With .Columns("SubstituteMaterialNo") + .Width = 110 + .Header.VisiblePosition = 2 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Hidden = False + End With + With .Columns("MaterialLotNo") + .Width = 100 + .Header.VisiblePosition = 3 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Hidden = False + End With + With .Columns("Qty") + .Width = 100 + .Header.VisiblePosition = 4 + .Format = "0.########" + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .Hidden = False + End With + With .Columns("UseQty") + .Width = 80 + .Header.VisiblePosition = 5 + .Format = "0.########" + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .CellAppearance.BackColor = System.Drawing.Color.White + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .Hidden = False + End With + .SortedColumns.Add("SubstituteMaterialNo", False, False) + .SortedColumns.Add("MaterialLotNo", False, False) + End With + End If + + iugMaterial.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + + End With + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugMaterial.iMESUltraGrid_InitializeRow + + If e.Row.Band.Key = tblTMaterial Then + 'If e.Row.Cells("CheckLotNo").Value = 1 Then '不允許直接編輯 + + e.Row.Cells("UseQty").Activation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + e.Row.Cells("UseQty").Appearance.BackColor = System.Drawing.Color.Gainsboro + 'End If + End If + + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_BeforeCellUpdate(sender As System.Object, e As Infragistics.Win.UltraWinGrid.BeforeCellUpdateEventArgs) Handles iugMaterial.iMESUltraGrid_BeforeCellUpdate + If e.Cell.Column.Key.ToUpper = "USEQTY" Then + If IsNumeric(e.NewValue) Then + If e.NewValue < 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200017", "[%USEQTY%]"), MsgBoxStyle.Exclamation, Me.Text) + e.Cancel = True + Exit Sub + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%USEQTY%]"), MsgBoxStyle.Exclamation, Me.Text) + e.Cancel = True + Exit Sub + End If + End If + End Sub + + Private Sub iugMaterial_iMESUltraGrid_AfterCellUpdate(sender As System.Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugMaterial.iMESUltraGrid_AfterCellUpdate + If e.Cell.Column.Key.ToUpper <> "USEQTY" Then + Exit Sub + End If + + Dim strMaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + Dim strMaterialLotNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialLotNo").Value + + Dim drTMaterial() As DataRow + drTMaterial = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & strMaterialNo & "'") + If drTMaterial.Length > 0 Then + If e.Cell.Row.Cells("Qty").Value >= e.Cell.Row.Cells("USEQTY").Value Then + '更新數量 + funUpdateSumUseQty(drTMaterial(0)) + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203083", "[%USEQTY%] > [%MATERIALSTATE%], [%MaterialLotNo%]: " & strMaterialLotNo), MsgBoxStyle.Exclamation, Me.Text) + + e.Cell.Row.Cells("USEQTY").Value = 0 + Exit Sub + End If + End If + End Sub + + Private Sub iugEquipment_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugEquipment.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + 'Equipment + For i = 0 To dsWIP.Tables(tblTEquipment).Columns.Count - 1 + Select Case dsWIP.Tables(tblTEquipment).Columns(i).ColumnName.ToUpper + Case "EQUIPMENTNO" + With .Bands(tblTEquipment).Columns("EquipmentNo") + .Header.Caption = "EquipmentNo" + .Width = 120 + .Header.VisiblePosition = 2 + End With + Case "EQUIPMENTTYPE" + With .Bands(tblTEquipment).Columns("EquipmentType") + .Header.Caption = "EquipmentType" + .Width = 100 + .Header.VisiblePosition = 3 + End With + Case Else + With .Bands(tblTEquipment).Columns(dsWIP.Tables(tblTEquipment).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + If Not dsWIP.Tables("Chamber") Is Nothing Then + For i = 0 To dsWIP.Tables("Chamber").Columns.Count - 1 + Select Case dsWIP.Tables("Chamber").Columns(i).ColumnName.ToUpper + Case "EQUIPMENTNO" + With .Bands("Chamber").Columns("EquipmentNo") + .Header.Caption = "EquipmentNo" + .Width = 150 + .Header.VisiblePosition = 1 + End With + Case "EQUIPMENTNAME" + With .Bands("Chamber").Columns("EquipmentName") + .Header.Caption = "Equipment Name" + .Width = 150 + .Header.VisiblePosition = 2 + End With + Case "EQUIPMENTTYPE" + With .Bands("Chamber").Columns("EquipmentType") + .Header.Caption = "EquipmentType" + .Width = 100 + .Header.VisiblePosition = 3 + End With + Case Else + With .Bands("Chamber").Columns(dsWIP.Tables("Chamber").Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End If + + 'Kevin 14/02/18,不顯示模治具數量 + If Not dsWIP.Tables("ContAcc") Is Nothing Then + With .Bands("ContAccessory").Columns("UseQty") + .Hidden = True + End With + + '[Mantis:0107151]L_CO_GEN,配件(模治具)開始時間格式不正確 + With .Bands("ContAccessory").Columns("StartTime") + .Format = "yyyy/MM/dd HH:mm:ss" + .Width = 120 + End With + + With .Bands("ContAccessory").Columns("EndTime") + .Format = "yyyy/MM/dd HH:mm:ss" + .Width = 120 + End With + + End If + + End With + + + 'UltraGrid + iugEquipment.iMESUltraGrid.Rows.ExpandAll(True) + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugKeyIn.iMESUltraGrid_InitializeLayOut + + With e.Layout + With .Bands("KeyIn").Columns("AttribNo") + .Header.Caption = "AttribNo" + .Width = 90 + .Header.VisiblePosition = 1 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribName") + .Header.Caption = "AttribName" + .Width = 150 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribValue") + .Header.Caption = "AttribValue" + .Width = 130 + .Header.VisiblePosition = 3 + .CellAppearance.BackColor = System.Drawing.Color.White + End With + '2015-12-18, Joe, Add + With .Bands("KeyIn").Columns("QCItemNo") + .Header.Caption = "QCItemNo" + .Width = 100 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribSequence") + .Hidden = True + End With + With .Bands("KeyIn").Columns("InputType") + .Hidden = True + End With + With .Bands("KeyIn").Columns("DataType") + .Hidden = True + End With + With .Bands("KeyIn").Columns("ValueType") + .Hidden = True + End With + End With + + 'UltraGrid + iugKeyIn.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugKeyIn.iMESUltraGrid_InitializeRow + Dim strAttribValue As String + + Try + strAttribValue = e.Row.Cells("AttribNo").Value.ToString.Trim + + 'InputType=1 清單選擇 + If e.Row.Cells("InputType").Value = 1 Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + ElseIf e.Row.Cells("DataType").Value = 3 Then + e.Row.Cells("AttribValue").Style = ColumnStyle.DateTime + e.Row.Cells("AttribValue").Editor = editor + e.Row.Cells("AttribValue").Appearance.BackColor = Color.White + End If + + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugKeyIn.iMESUltraGrid_ClickCellButton + + Dim intValueType As Integer + + Cursor.Current = Cursors.WaitCursor + + Try + + intValueType = iugKeyIn.iMESUltraGrid.ActiveRow.Cells("ValueType").Value + + If intValueType = 3 OrElse intValueType = 1 Then 'Reference System Parameter / Assign Valid Value + If Not IsNothing(dsWIP.Tables(strDefaultValue)) Then + dsWIP.Tables.Remove(strDefaultValue) + End If + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("elementno", "PropertyType", "String", iugKeyIn.iMESUltraGrid.ActiveRow.Cells("AttribNo").Value, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsSYS.LoadElementValue", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出Data + strDefaultValue = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadelementvalue").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadelementvalue").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadelementvalue").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" And XmlData <> "fail" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + + Dim fSearch As New frmCOMSearch + '如果 PropertyNo 的有效性檢查來自 MESParameter,則取出有效值提供選擇 + fSearch.dvSearch = dsWIP.Tables(strDefaultValue).DefaultView + fSearch.strFindColumnName = dsWIP.Tables(strDefaultValue).Columns(0).ColumnName + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If Not drSearch Is Nothing Then + If Not IsDBNull(drSearch(0).ToString) Then + iugKeyIn.iMESUltraGrid.ActiveRow.Cells("AttribValue").Value = drSearch(0).ToString + End If + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + End Sub + + Private Sub iugError_iMESUltraGrid_AfterCellActivate(sender As Object, e As System.EventArgs) Handles iugError.iMESUltraGrid_AfterCellActivate + 'Elena 2011/11/8 R1111002 自動計算GoodQty、ScrapQty及DefectQty數量 + If funGetParameter("SysInfo", "CalculateQty") = 1 Then + Dim drSelError() As DataRow + Dim decScrapQty As Decimal = 0 + Dim decLossQty As Decimal = 0 + + drSelError = dtKeyIn.Select("AttribNo = 'LossQty'") + If drSelError.Length <> 0 Then + If IsNumeric(drSelError(0)("AttribValue")) Then + decLossQty = drSelError(0)("AttribValue") + End If + End If + + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decScrapQty = decScrapQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decScrapQty + End If + drSelError = dtKeyIn.Select("AttribNo = 'GoodQty'") + Dim blnCalulate As Boolean = True '0111211: [49-1]扫脚_check-out_bin分布调整,若有bin分佈調整, 則不自動計算GoodQty + If drSelError.Length <> 0 Then + If HaveLevel AndAlso iGoodBinStateQty <> 0 Then + If Not IsNothing(dtBinNew) AndAlso dtBinNew.Rows.Count > 0 Then + blnCalulate = False + End If + End If + If blnCalulate Then + drSelError(0)("AttribValue") = CDec(txtCurQty.Text) - decScrapQty - decLossQty + End If + End If + + Dim decDefectQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=1 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decDefectQty = decDefectQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'DefectQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decDefectQty + End If + drSelError = Nothing + End If + End Sub + + Private Sub iugError_iMESUltraGrid_InitializeLayOut(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugError.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblOPError).Columns.Count - 1 + With .Bands(tblOPError).Columns(dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper) + .Header.VisiblePosition = 99 + .Hidden = True + End With + Next + + With .Bands(tblOPError).Columns("CheckFlag") + .Header.Caption = "Check" + .Width = 30 + .Header.VisiblePosition = 1 + .CellAppearance.BackColor = System.Drawing.Color.White + .Hidden = False + End With + With .Bands(tblOPError).Columns("ErrorNo") + .Header.Caption = "ErrorNo" + .Width = 80 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .Hidden = False + End With + With .Bands(tblOPError).Columns("ReasonName") + .Header.Caption = "ReasonName" + .Width = 100 + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .Hidden = False + End With + With .Bands(tblOPError).Columns("ErrorQty") + .Header.Caption = "ErrorQty" + .Width = 50 + .Header.VisiblePosition = 4 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .CellAppearance.BackColor = System.Drawing.Color.White + .Hidden = False + End With + With .Bands(tblOPError).Columns("ReasonType") + .ValueList = iugError.iMESUltraGrid.DisplayLayout.ValueLists("AReasonType") + End With + + 'GroupBy + Dim G1 As Infragistics.Win.UltraWinGrid.UltraGridColumn + G1 = iugError.iMESUltraGrid.DisplayLayout.Bands(tblOPError).Columns("ReasonType") + iugError.iMESUltraGrid.DisplayLayout.Bands(tblOPError).SortedColumns.Add(G1, False, True) + iugError.iMESUltraGrid.Rows.ExpandAll(True) + + '客製化加總欄位 + .Bands(tblOPError).Summaries.Add("ErrorQtySum", Infragistics.Win.UltraWinGrid.SummaryType.Custom, + calCustomer, .Bands(tblOPError).Columns("ErrorQty"), Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn, Nothing) + + .Bands(tblOPError).Summaries("ErrorQtySum").Appearance.TextHAlign = Infragistics.Win.HAlign.Right + + '小數點不會顯示,改為Format(decTotal, "0.####")回傳時先format. + .Bands(tblOPError).Summaries("ErrorQtySum").DisplayFormat = "Sum={0:####}" + End With + + iugError.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + + End Sub + + Private Sub iugError_iMESUltraGrid_AfterCellUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugError.iMESUltraGrid_AfterCellUpdate + + If e.Cell.Column.Key = "CheckFlag" Then + If e.Cell.Value = False AndAlso e.Cell.Row.Cells("ErrorQty").Value > 0 Then + Dim drSel() As DataRow + drSel = dsWIP.Tables(tblOPError).Select("ErrorNo='" & e.Cell.Row.Cells("ErrorNo").Value & "'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("ErrorQty") = 0 + drSel(0).EndEdit() + End If + drSel = Nothing + End If + End If + 'Elena 2011/11/8 R1111002 自動計算GoodQty、ScrapQty及DefectQty數量 + If funGetParameter("SysInfo", "CalculateQty") = 1 Then + Dim drSelError() As DataRow + Dim decScrapQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decScrapQty = decScrapQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decScrapQty + End If + drSelError = dtKeyIn.Select("AttribNo = 'GoodQty'") + Dim blnCalulate As Boolean = True '0111211: [49-1]扫脚_check-out_bin分布调整,若有bin分佈調整, 則不自動計算GoodQty + If drSelError.Length <> 0 Then + If HaveLevel AndAlso iGoodBinStateQty <> 0 Then + If Not IsNothing(dtBinNew) AndAlso dtBinNew.Rows.Count > 0 Then + blnCalulate = False + End If + End If + If blnCalulate Then + drSelError(0)("AttribValue") = CDec(txtCurQty.Text) - decScrapQty + End If + End If + + Dim decDefectQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=1 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decDefectQty = decDefectQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'DefectQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decDefectQty + End If + drSelError = Nothing + End If + End Sub + + Private Sub iugError_iMESUltraGrid_BeforeCellUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeCellUpdateEventArgs) Handles iugError.iMESUltraGrid_BeforeCellUpdate + + If e.Cell.Column.Key = "ErrorQty" Then + If Not IsNumeric(e.NewValue) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%ErrorQty%]"), MsgBoxStyle.Exclamation, Me.Text) + e.Cancel = True + Exit Sub + End If + If e.NewValue < 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200016", "[%ErrorQty%]"), MsgBoxStyle.Exclamation, Me.Text) + e.Cancel = True + Exit Sub + End If + 'If InStr(e.NewValue, ".", CompareMethod.Text) > 0 Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "ErrorQty can't be decimal!!"), MsgBoxStyle.Exclamation, Me.Text) + ' e.Cancel = True + ' Exit Sub + 'End If + End If + + End Sub + +#End Region + +#Region "--- Load functions ---" + + Private Function funLoadLotBasis() As String + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("baselotno", "BaseLotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadLotBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tbllotbasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadlotbasis").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + funLoadLotBasis = "suceess" + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + End Function + + Private Function funLoadLotState() As Integer + + funLoadLotState = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadLotBasisJoinState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblLotState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadlotbasisjoinstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasisjoinstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasisjoinstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadLotState = 0 + + End Function + + Private Function funLoadTemp_AttribJoinBasis() As Integer + + funLoadTemp_AttribJoinBasis = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_AttribJoinBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTAttrib = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_attrib").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_attrib").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_attrib").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + Call funAddValueList_Attrib() + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_AttribJoinBasis = 0 + + + End Function + + Private Function funLoadTemp_Equipment() As Integer + + funLoadTemp_Equipment = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + 'strParameter +=CombineXMLParameter("getmaterial", "GetMaterial", "Boolean", True, "") + strParameter += CombineXMLParameter("getrecipe", "GetRecipe", "Boolean", True, "") + + strParameter += CombineXMLParameter("getchamber", "GetChamber", "Boolean", True, "") + + If dsWIP.Tables(tblParameter).Rows.Count > 0 Then + If dsWIP.Tables(tblParameter).Rows(0).Item("ParameterValue") = "1" Then + strParameter += CombineXMLParameter("chambermanage", "ChamberManage", "Boolean", True, "") + Else + strParameter += CombineXMLParameter("chambermanage", "ChamberManage", "Boolean", False, "") + End If + Else + strParameter += CombineXMLParameter("chambermanage", "ChamberManage", "Boolean", False, "") + + End If + + strParameter += CombineXMLParameter("getcontaccessory", "GetContAccessory", "Boolean", True, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_Equipment", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTEquipment = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_equipment").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_equipment").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_equipment").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If Not dsWIP.Tables("ContAcc") Is Nothing Then + If dsWIP.Tables("ContAcc").Rows.Count = 0 Then + dsWIP.Relations.Remove("ContAccessory") + dsWIP.Tables.Remove("ContAcc") + End If + End If + If Not dsWIP.Tables("RecipeDetail") Is Nothing Then + If dsWIP.Tables("RecipeDetail").Rows.Count = 0 Then + dsWIP.Relations.Remove("Recipe") + dsWIP.Tables.Remove("RecipeDetail") + End If + End If + + iugEquipment.iMESUltraGrid.DataSource = dsWIP.Tables(tblTEquipment) + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_Equipment = 0 + + + End Function + + Private Function funLoadTemp_Material() As Integer + + funLoadTemp_Material = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_Material", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTMaterial = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_material").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_material").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_material").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If dsWIP.Tables(tblTMaterial).Rows.Count > 0 Then + '加入標準用量欄位 + Dim colStdQty As New DataColumn + colStdQty.ColumnName = "StdUseQty" + colStdQty.DataType = System.Type.GetType("System.Decimal") + colStdQty.DefaultValue = 0 + colStdQty.AllowDBNull = False + dsWIP.Tables(tblTMaterial).Columns.Add(colStdQty) + '加入實際用量欄位 + Dim colQty As New DataColumn + colQty.ColumnName = "UseQty" + colQty.DataType = System.Type.GetType("System.Decimal") + colQty.DefaultValue = 0 + colQty.AllowDBNull = False + dsWIP.Tables(tblTMaterial).Columns.Add(colQty) + + dsWIP.Tables(tblTMaterial).Columns("MaterialLevel").ColumnName = "MaterialLevelShow" + + '計算標準使用量 + Dim decCurQty, decStdQty As Decimal + Dim i As Integer + decCurQty = dsWIP.Tables(tblLotState).Rows(0)("CurQty") + For i = 0 To dsWIP.Tables(tblTMaterial).Rows.Count - 1 + decStdQty = decCurQty * dsWIP.Tables(tblTMaterial).Rows(i)("StdQty") * (1 + dsWIP.Tables(tblTMaterial).Rows(i)("DecreaseRate")) + dsWIP.Tables(tblTMaterial).Rows(i)("StdUseQty") = Format(decStdQty, "0.########") + dsWIP.Tables(tblTMaterial).Rows(i)("UseQty") = Format(0, "0.########") + ' 2016/10/20 YF, 一律自動計算標準使用量 + 'If dsWIP.Tables(tblTMaterial).Rows(i)("CountWay") = 0 Then 'Standard才要預設實際用量. + ' dsWIP.Tables(tblTMaterial).Rows(i)("UseQty") = Format(decStdQty, "0.######") + 'End If + Next + dsWIP.Tables(tblTMaterial).AcceptChanges() + + 'Create Material Lot Table + dtMLot = New DataTable("MaterialLot") + dtMLot.Columns.Add("EquipmentNo", System.Type.GetType("System.String")) + dtMLot.Columns.Add("MaterialNo", System.Type.GetType("System.String")) + dtMLot.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtMLot.Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dtMLot.Columns.Add("UseQty", System.Type.GetType("System.Decimal")) + dtMLot.Columns.Add("SubstituteMaterialNo", System.Type.GetType("System.String")) '新增一替代料欄位,2010/03/26,by yumei + dtMLot.Columns.Add("SubstituteMaterialLevel", System.Type.GetType("System.Int16")) '新增一替代料位階欄位,2013/01/08,by Kevin + dtMLot.Columns.Add("SubstituteMaterialType", System.Type.GetType("System.String")) '新增一替代料類型欄位,2013/01/08,by Kevin + dtMLot.Columns.Add("SubstituteStdQty", System.Type.GetType("System.Decimal")) '新增一替代料標準用量欄位,2013/01/08,by Kevin + dtMLot.Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) '新增一替代料是否檢查批號欄位,2013/01/08,by Kevin + dtMLot.Columns.Add("AccDate", System.Type.GetType("System.DateTime")) '新增回溫時間, 只有設備上料會有值 + + '建立Relation + dsWIP.Tables.Add(dtMLot) + + Dim parentColFI(0) As DataColumn + Dim childColFI(0) As DataColumn + + parentColFI(0) = dsWIP.Tables(tblTMaterial).Columns("MaterialNo") + childColFI(0) = dsWIP.Tables(dtMLot.TableName).Columns("MaterialNo") + + '建立主從關係(RelationName會影響WinForm資料的顯示) + Dim tmpRe1 As DataRelation + tmpRe1 = New DataRelation("MaterialLot", parentColFI, childColFI, False) + dsWIP.Relations.Add(tmpRe1) + '获取当前工单的物料清单 新设备上料14278 + Call funLoadMOMaterialList(dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString, dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString) + ' 2016/10/20 YF, 取得上料資訊 + GetFeedingData() + End If + + 'Binding + iugMaterial.iMESUltraGrid.DataSource = dsWIP.Tables(tblTMaterial) + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_Material = 0 + + + End Function + + Private Function funLoadTemp_MaterialLot() As Integer + + Dim drSel As DataRow() + + funLoadTemp_MaterialLot = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_MaterialLot", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTMaterialLot = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_materiallot").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_materiallot").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_materiallot").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + dsWIP.Tables(tblTMaterialLot).Columns.Add("MainMaterialNo", System.Type.GetType("System.String")) 'BOM中的主料號 + dsWIP.Tables(tblTMaterialLot).Columns.Add("SubstituteMaterialLevel", System.Type.GetType("System.Int16")) '新增一替代料位階欄位,2013/01/08,by Kevin + dsWIP.Tables(tblTMaterialLot).Columns.Add("SubstituteMaterialType", System.Type.GetType("System.String")) '新增一替代料類型欄位,2013/01/08,by Kevin + dsWIP.Tables(tblTMaterialLot).Columns.Add("SubstituteStdQty", System.Type.GetType("System.Decimal")) '新增一替代料標準用量欄位,2013/01/08,by Kevin + dsWIP.Tables(tblTMaterialLot).Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) '新增一替代料是否檢查批號欄位,2013/01/08,by Kevin + dsWIP.Tables(tblTMaterialLot).Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dsWIP.Tables(tblTMaterialLot).Columns.Add("MFGDate", System.Type.GetType("System.DateTime")) + dsWIP.Tables(tblTMaterialLot).Columns.Add("ExpireDate", System.Type.GetType("System.DateTime")) + dsWIP.Tables(tblTMaterialLot).Columns.Add("InputDate", System.Type.GetType("System.DateTime")) + + For Each drTLot As DataRow In dsWIP.Tables(tblTMaterialLot).Rows + drSel = dtAllMTLLot.Select("SubstituteMaterialNo = '" & drTLot("MaterialNo") & "' And MaterialLotNo = '" & drTLot("MaterialLotNo") & "'") + If drSel.Length > 0 Then + drTLot.BeginEdit() + drTLot("MainMaterialNo") = drSel(0)("MaterialNo") + drTLot("SubstituteMaterialLevel") = drSel(0)("SubstituteMaterialLevel") + drTLot("SubstituteMaterialType") = drSel(0)("SubstituteMaterialType") + drTLot("SubstituteStdQty") = drSel(0)("SubstituteStdQty") + drTLot("CheckLotNo") = drSel(0)("CheckLotNo") + drTLot("Qty") = drSel(0)("Qty") + drTLot("MFGDate") = drSel(0)("MFGDate") + drTLot("ExpireDate") = drSel(0)("ExpireDate") + drTLot("InputDate") = drSel(0)("InputDate") + drTLot.EndEdit() + Else + '已不存在庫存中 + End If + Next + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_MaterialLot = 0 + + + End Function + + + Private Function funGetShift() As Integer + + funGetShift = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("userno", "UserNo", "String", UserId, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsUSR.GetShift", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出ShiftNo + If XmlDoc.GetElementsByTagName("shiftno").Item(0).SelectNodes("value").Count > 0 Then + txtShiftNo.Text = XmlDoc.DocumentElement.GetElementsByTagName("shiftno").Item(0).SelectNodes("value").Item(0).InnerText + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funGetShift = 0 + + End Function + + Private Function funGetOPDescription() As Integer + + funGetOPDescription = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.GetLotOPDescription", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + If XmlDoc.GetElementsByTagName("opdescription").Count > 0 Then + If XmlDoc.GetElementsByTagName("opdescription").Item(0).SelectNodes("value").Count > 0 Then + txtOPDescription.Text = XmlDoc.DocumentElement.GetElementsByTagName("opdescription").Item(0).SelectNodes("value").Item(0).InnerText + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funGetOPDescription = 0 + + End Function + + Private Function funLoadOPError() As Integer + + funLoadOPError = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + '將OPNo加上CInput轉換特殊字元,2010/04/08,by yumei + strParameter = CombineXMLParameter("opno", "OPNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsOP.LoadOPErrorJoinBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblOPError = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadoperrorjoinbasis").Item(0).SelectNodes("name").Item(0).InnerXml + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadoperrorjoinbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadoperrorjoinbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + '將不使用的資料移除 + Dim i As Integer + For i = dsWIP.Tables(tblOPError).Columns.Count - 1 To 0 Step -1 + If dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper <> "ERRORNO" AndAlso + dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper <> "REASONNAME" AndAlso + dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper <> "REASONLEVEL" AndAlso + dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper <> "REASONTYPE" Then + dsWIP.Tables(tblOPError).Columns.Remove(dsWIP.Tables(tblOPError).Columns(i)) + End If + Next + + '加入CheckFlag,ErrorQty欄位. + Dim colCheck As New DataColumn + colCheck.ColumnName = "CheckFlag" + colCheck.DataType = System.Type.GetType("System.Boolean") + colCheck.DefaultValue = False + colCheck.AllowDBNull = False + dsWIP.Tables(tblOPError).Columns.Add(colCheck) + + Dim colQty As New DataColumn + colQty.ColumnName = "ErrorQty" + colQty.DataType = System.Type.GetType("System.Decimal") + colQty.DefaultValue = 0 + colQty.AllowDBNull = False + dsWIP.Tables(tblOPError).Columns.Add(colQty) + + Call funAddValueList_Error() + + 'Binding + iugError.iMESUltraGrid.DataSource = dsWIP.Tables(tblOPError) + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + Finally + End Try + + funLoadOPError = 0 + + + End Function + + Private Function funLoadSubstituteMaterial_Main(ByVal strMaterialNo As String, + ByVal strUnitNo As String) As Integer + funLoadSubstituteMaterial_Main = -1 + + If Not IsNothing(dsWIP.Tables(tblSubstituteMaterial)) Then + dsWIP.Tables.Remove(tblSubstituteMaterial) + End If + + Dim XmlDoc As New XmlDocument + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(strMaterialNo), "") + strParameter += CombineXMLParameter("unitno", "UnitNo", "String", CInput(strUnitNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadSubstituteMaterial_Main", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSubstituteMaterial = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadsubstitutematerial_main").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadsubstitutematerial_main").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadsubstitutematerial_main").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadSubstituteMaterial_Main = 0 + End Function + + '2019/01/19 Eric + Private Sub funLoadParameter(ByVal ParameterNo As String) + + If Not dsWIP.Tables(tblParameter) Is Nothing Then + dsWIP.Tables.Remove(tblParameter) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("parameterno", "ParameterNo", "String", CInput(ParameterNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsSYS.LoadParameter", InXml) + + Dim XmlDoc As New XmlDocument '//處理Xml字串之物件 + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblParameter = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadparameter").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If dsWIP.Tables(tblParameter).Rows.Count > 0 Then + strEnableSWR_CICO = dsWIP.Tables(tblParameter).Rows(0)("ParameterValue").ToString + Else + strEnableSWR_CICO = "0" + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load OP Error define relative data Failed!! , " & e1.Message) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + End Try + + End Sub + + + '2019/10/17 Grace 查詢作業站資料 + Private Sub funLoadOPBasis(ByVal OPNo As String) + + If Not IsNothing(dsTemp.Tables(tblOPBasis)) Then + dsTemp.Tables.Remove(tblOPBasis) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("opno", "OPNo", "String", CInput(OPNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Dim XmlDoc As New XmlDocument + + Try + ' 2016 YF, Using wsOP As New wsOP.wsOP + ' 2016 YF, wsOP.Url = LocalizeWebService(wsOP.Url.ToString) + ' 2016 YF, wsOP.EnableDecompression = True + ' 2016 YF, OutXml = wsOP.LoadOPBasis(InXml) + OutXml = InvokeSrv("wsOP.LoadOPBasis", InXml) + + ' 2016 YF, End Using + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出 Tablename + tblOPBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadopbasis").Item(0).SelectNodes("name").Item(0).InnerXml + '//取出 Table Schma + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadopbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '//取出Attrib Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadopbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + End Sub +#End Region + +#Region "--- Others ---" + + Private Function funInitialize() + + iugAttrib.iMESUltraGrid.Text = "Attrib" + iugAttrib.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugAttrib.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugAttrib.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugAttrib.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugAttrib.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + iugEquipment.iMESUltraGrid.Text = "Equipment" + iugEquipment.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugEquipment.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugEquipment.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugEquipment.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugEquipment.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + iugStuInfo.iMESUltraGrid.Text = "StuInfo" + + iugMaterial.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugMaterial.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugMaterial.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugMaterial.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugMaterial.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + iugMaterial.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + '只有子階有資料時,才有+號. + iugMaterial.iMESUltraGrid.DisplayLayout.Override.ExpansionIndicator = ShowExpansionIndicator.CheckOnDisplay + '當子階有資料時,+號自動展開. + iugMaterial.iMESUltraGrid.Rows.ExpandAll(True) + + iugKeyIn.iMESUltraGrid.Text = "Key In" + iugKeyIn.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugKeyIn.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugKeyIn.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugKeyIn.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugKeyIn.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + iugKeyIn.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + + iugError.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugError.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugError.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugError.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugError.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + iugError.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + + SBar1.Panels(0).Text = "UserNo:" & UserId + SBar1.Panels(3).Text = Format(Now, "yyyy/MM/dd H:mm:ss") + + txtPriority.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + txtCurQty.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + txtSysQty.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + + 'CHECKLXL + iugStuInfo.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + + btnConfirm.Enabled = True + 'btnMultiUser.Enabled = True + + ' 2016/12/26 YF, 依系統參數是否啟動多人加工來決定是否顯示"作業人員"按鈕 + Me.btnOperator.Visible = Val(funGetParameter("SysInfo", "MultiOperator")) + + '2019/10/17 Grace 依系統參數是否啟動多人加工, 且多人加工模式為生產批, 來決定是否顯示"多人加工"按鈕 + btnMultiUser.Visible = False + btnMultiUser.Enabled = False + + If Val(funGetParameter("SysInfo", "MultiOperator")) Then + Call funLoadOPBasis(txtOPNo.Text) + If Not IsNothing(dsTemp.Tables(tblOPBasis)) Then + If dsTemp.Tables(tblOPBasis).Rows.Count > 0 Then + If dsTemp.Tables(tblOPBasis).Rows(0)("MultiOperatorMode").ToString = "5" Then + btnMultiUser.Visible = True + btnMultiUser.Enabled = True + End If + End If + End If + End If + + End Function + + Private Function funLotInfo_Show() + + RevLotSerial = dsWIP.Tables(tblLotState).Rows(0)("LotSerial") + RevLotStamp = dsWIP.Tables(tblLotState).Rows(0)("LotStamp") + + txtCurQty.Text = Format(dsWIP.Tables(tblLotState).Rows(0)("CurQty"), "0.####") + txtCurUnitNo.Text = dsWIP.Tables(tblLotState).Rows(0)("CurUnitNo").ToString + txtSysQty.Text = Format(dsWIP.Tables(tblLotState).Rows(0)("SysQty"), "0.####") + txtSysUnitNo.Text = dsWIP.Tables(tblLotState).Rows(0)("SysUnitNo").ToString + txtOPNo.Text = dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString + txtOPName.Text = dsWIP.Tables(tblLotState).Rows(0)("OPName").ToString + txtAreaNo.Text = dsWIP.Tables(tblLotState).Rows(0)("AreaNo").ToString + txtProductNo.Text = dsWIP.Tables(tblLotState).Rows(0)("ProductNo").ToString + PhaseNo = dsWIP.Tables(tblLotState).Rows(0)("PhaseNo") + + txtPriority.Text = dsWIP.Tables(tblLotState).Rows(0)("Priority") + If dsWIP.Tables(tblLotState).Rows(0)("Priority") = 1 Then + txtPriority.BackColor = System.Drawing.Color.Red + ElseIf dsWIP.Tables(tblLotState).Rows(0)("Priority") = 2 Then + txtPriority.BackColor = System.Drawing.Color.Yellow + ElseIf dsWIP.Tables(tblLotState).Rows(0)("Priority") = 3 Then + txtPriority.BackColor = System.Drawing.Color.LimeGreen + End If + txtMONo.Text = dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString + txtCustomerLotNo.Text = dsWIP.Tables(tblLotState).Rows(0)("CustomerLotNo").ToString + + End Function + + Private Sub funAddValueList_Attrib() + + iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists.Add("ASource") + With iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists("ASource").ValueListItems + .Clear() + .Add(0, "KeyIn") + .Add(1, "Calculate") + .Add(2, "System") + .Add(3, "Setup") + End With + + End Sub + + Private Sub gbxError_Enter(sender As Object, e As EventArgs) Handles gbxError.Enter + + End Sub + + Private Sub funAddValueList_Error() + + iugError.iMESUltraGrid.DisplayLayout.ValueLists.Add("AReasonType") + With iugError.iMESUltraGrid.DisplayLayout.ValueLists("AReasonType").ValueListItems + .Clear() + .Add(0, "Scrap") + .Add(1, "Defect") + End With + + + End Sub + + Private Function funGetSampleData() + + Cursor.Current = Cursors.WaitCursor + + '轉換抽樣參數 + Dim strAQLType, strAQL, strQCLevel, strTemp As String + + If dsWIP.Tables(tblTAttrib) Is Nothing Then Exit Function + + Dim drSel() As DataRow + '若已轉換,不再轉 + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'SampleQty'") + If drSel.Length > 0 Then + If Not IsDBNull(drSel(0)("AttribValue")) Then + If drSel(0)("AttribValue") <> "" Then + Exit Function + End If + End If + End If + + 'AQLType + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AQLType'") + If drSel.Length > 0 Then + strAQLType = drSel(0)("AttribValue") + Else + strAQLType = defString + End If + 'AQL + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AQL'") + If drSel.Length > 0 Then + strAQL = drSel(0)("AttribValue") + Else + strAQL = defString + End If + 'QCLevel + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'QCLevel'") + If drSel.Length > 0 Then + strQCLevel = drSel(0)("AttribValue") + Else + strQCLevel = defString + End If + + drSel = Nothing + + If strAQLType = defString Or strAQL = defString Or strQCLevel = defString Then Exit Function + + '取出抽樣數 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("aqltype", "AQLType", "String", strAQLType, "") + strParameter += CombineXMLParameter("qty", "QTY", "Decimal", dsWIP.Tables(tblLotState).Rows(0)("CurQty"), "") + strParameter += CombineXMLParameter("qclevel", "QCLevel", "String", strQCLevel, "") + strParameter += CombineXMLParameter("aql", "AQL", "String", strAQL, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + Try + OutXml = InvokeSrv("wsQC.GetAQLQty", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + 'SampleQty + If XmlDoc.GetElementsByTagName("sampleqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("sampleqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'SampleQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%SampleQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + 'AcceptQty + If XmlDoc.GetElementsByTagName("acceptqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("acceptqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AcceptQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%AcceptQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + 'RejectQty + If XmlDoc.GetElementsByTagName("rejectqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("rejectqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'RejectQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%RejectQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + Cursor.Current = Cursors.Default + + + End Function + + Private Function funLoadSYSParameter() As Integer + + funLoadSYSParameter = -1 + + '先判斷是否dataset中已有此datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblSYSParameter)) Then + dsWIP.Tables.Remove(tblSYSParameter) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + InXml = CombineXMLRequest(strIdentity, "") + + Try + Dim XmlDoc As New XmlDocument + OutXml = InvokeSrv("wsSYS.LoadParameter", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSYSParameter = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadparameter").Item(0).SelectNodes("name").Item(0).InnerXml + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadSYSParameter = 0 + + End Function + + Private Sub funLoadProduct(Optional UnionProductNo As String = defString, Optional blnIssueState As Boolean = True) + + '先判斷是否dataset中已有此datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblProductBasis)) Then + dsWIP.Tables.Remove(tblProductBasis) + End If + + '組InXml的字串 + strParameter = "" + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + If blnIssueState Then + strParameter = CombineXMLParameter("issuestate", "IssueState", "Integer", 2, "") + End If + If UnionProductNo <> defString Then + strParameter = CombineXMLParameter("productno", "ProductNo", "String", UnionProductNo, "") + End If + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsPRD.LoadProduct(InXml) + If blnIssueState = False Then + OutXml = InvokeSrv("wsPRD.LoadCusProduct", InXml) + Else + OutXml = InvokeSrv("wsPRD.LoadProduct", InXml) + End If + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblProductBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadproduct").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadproduct").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadproduct").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + 'MsgBox("Unexpected Error. Load System Parameter failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + Private Sub funLoadOEMOBasis() + + '先判斷是否dataset中已有此datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblOEMOBasis)) Then + dsWIP.Tables.Remove(tblOEMOBasis) + End If + + '組InXml的字串 + strParameter = "" + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("issuestate", "IssueState", "Integer", 2, "") + strParameter = CombineXMLParameter("mono", "MONO", "String", CInput(txtMONo.Text), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsPRD.LoadProduct(InXml) + OutXml = InvokeSrv("wsOE.LoadMOBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblOEMOBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmobasis").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmobasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmobasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + 'MsgBox("Unexpected Error. Load System Parameter failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + Private Sub btnBinAssign_Click(sender As Object, e As EventArgs) Handles btnBinStateAdjust.Click + + Dim fBinStateAdjust As New frmBinStateAdjust + fBinStateAdjust.LotNo = LotNo + fBinStateAdjust.dvSysBin = dvSysBin + fBinStateAdjust.dtGoodBin = dsWIP.Tables(strBinState) + fBinStateAdjust.dtBinNew = dtBinNew + fBinStateAdjust.ShowDialog(Me) + fBinStateAdjust.Dispose() + If gReturnKeyValue <> "" Then + If dtBinNew.Rows.Count > 0 Then + Dim NewBinQty_Sun As Integer = 0 + For Each drTemp As DataRow In dsWIP.Tables(strSysBin).Rows + NewBinQty_Sun += CInt(dtBinNew.Rows(0)(drTemp("BinNo").ToString)) + Next + Dim drSel As DataRow() + drSel = dtKeyIn.Select("AttribNo = 'GoodQty'") + If drSel.Length > 0 Then + drSel(0)("AttribValue") = NewBinQty_Sun + dtKeyIn.AcceptChanges() + End If + End If + End If + End Sub + Private Function funCombineTTInXml(ByVal FromProductNo As String) + + Dim code As String = String.Empty + Dim sqlcode As String = String.Empty + Dim description As String = String.Empty + Dim strAccess As String = String.Empty + Dim strParameter As String = String.Empty + Dim strMaster As String = String.Empty + Dim strDetail As String = String.Empty + + Dim strTempField As String = String.Empty + Dim strTempRecord As String = String.Empty + Dim XmlDoc As New XmlDocument() + Dim dtUnionProduct As DataTable + Dim arriveTime As DateTime = Now + + '---- InXml ----- + ' + '2011/12/05 Aaron, 增加系統變數TPERPUseMESUserNo,設定是否使用MES帳號或是tiptop內建帳號進行單據拋送 + + Try + If funGetParameter("SysInfo", "TPERPUseMESUserNo") = 1 Then + strAccess = cbXMLAccess_TP(gUserNo) + Else + strAccess = cbXMLAccess_TP() + End If + + ' + strTempField = cbXMLField_TP("condition", "ima01 LIKE '" & FromProductNo & "%'") + 'strTempField += cbXMLField_TP("vdate", Format(dsWIP.Tables(tbllotbasis).Rows(0)("CreateDate"), "yyyy/MM/dd")) + strTempField += cbXMLField_TP("vdate", "") + strTempRecord = cbXMLRecord_TP(strTempField) + + ' + strTempRecord = cbXMLRecord_TP(strTempField) + strParameter = cbXMLParameter_TP(strTempRecord) + + InXml = cbXMLRequest_TP(strAccess, strParameter, strMaster, strDetail) + + '----- Call ERP Web Service ----- + Using ws As New COM_ERP.wsERP_TT.TIPTOPServiceGateWay + ws.Url = gERPWSURL + OutXml = ws.GetJointProductData(InXml) + End Using + + XmlDoc.LoadXml(OutXml) + + '----- 取得ERP執行結果 code, sqlcode, description ----- + chkExecutionStatus_TP(XmlDoc, code, sqlcode, description) + + If code <> "0" Then + If description <> String.Empty Then + 'MsgBox(description, , "ERP Return Message") + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Return Message%]" & vbCrLf & description), MsgBoxStyle.Exclamation, Me.Text) + Else + 'MsgBox("ERP Fail !") + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Fail%]"), MsgBoxStyle.Exclamation, Me.Text) + + End If + Exit Function + End If + + '取得ERP回傳之聯產品資訊 + dtUnionProduct = getResponseContentDetail_TP(XmlDoc) + + '開窗給使用者選擇 + Cursor.Current = Cursors.WaitCursor + + If dtUnionProduct.DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP DID NOT RETURN THE JOINT PRODUCT INFORMATION%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dtUnionProduct.DefaultView + fSearch.strFindColumnName = "UnionProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Function + + '檢查聯產品資料是否存在系統中以及是否有版本資訊 + funLoadProduct(drSearch("UnionProductNo").ToString.ToUpper, False) + + If dsWIP.Tables(tblProductBasis).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("IssueState") <> 2 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%EDATA%][%Unfrozen%] "), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString <> dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%NOTHINGSTATE%][%CURVERSION%][%PRODUCTINFO%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + txtUnionProductNo.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductNo").ToString + txtUnionProductVersion.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString + txtUnionProductUnit.Text = dsWIP.Tables(tblProductBasis).Rows(0)("UnitNo").ToString + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + End If + + Cursor.Current = Cursors.Default + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + + '紀錄TransactionLog + addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "GetJointProductData", My.Computer.Name, gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "CreateStockInData", LogClass:="WIP") + End Try + + End Function + Private Function funCombineTTICDInXml(ByVal FromProductNo As String) + + Dim code As String = String.Empty + Dim sqlcode As String = String.Empty + Dim description As String = String.Empty + Dim strAccess As String = String.Empty + Dim strParameter As String = String.Empty + Dim strMaster As String = String.Empty + Dim strDetail As String = String.Empty + + Dim strTempField As String = String.Empty + Dim strTempRecord As String = String.Empty + Dim XmlDoc As New XmlDocument() + Dim dtUnionProduct As DataTable + Dim arriveTime As DateTime = Now + + '---- InXml ----- + ' + '2011/12/05 Aaron, 增加系統變數TPERPUseMESUserNo,設定是否使用MES帳號或是tiptopicd內建帳號進行單據拋送 + + Try + If funGetParameter("SysInfo", "TPERPUseMESUserNo") = 1 Then + strAccess = cbXMLAccess_TTICD(gUserNo) + Else + strAccess = cbXMLAccess_TTICD() + End If + + ' + strTempField = cbXMLField_TTICD("condition", "ima01 LIKE '" & FromProductNo & "%'") + 'strTempField += cbXMLField_TTICD("vdate", Format(dsWIP.Tables(tbllotbasis).Rows(0)("CreateDate"), "yyyy/MM/dd")) + strTempField += cbXMLField_TTICD("vdate", "") + strTempRecord = cbXMLRecord_TTICD(strTempField) + + ' + strTempRecord = cbXMLRecord_TTICD(strTempField) + strParameter = cbXMLParameter_TTICD(strTempRecord) + + InXml = cbXMLRequest_TTICD(strAccess, strParameter, strMaster, strDetail) + + '----- Call ERP Web Service ----- + Using ws As New COM_ERP.wsERP_TT.TIPTOPServiceGateWay + ws.Url = gERPWSURL + OutXml = ws.GetJointProductData(InXml) + End Using + + XmlDoc.LoadXml(OutXml) + + '----- 取得ERP執行結果 code, sqlcode, description ----- + chkExecutionStatus_TTICD(XmlDoc, code, sqlcode, description) + + If code <> "0" Then + If description <> String.Empty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Return Message%]" & vbCrLf & description), MsgBoxStyle.Exclamation, Me.Text) + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Fail%]"), MsgBoxStyle.Exclamation, Me.Text) + End If + Exit Function + End If + + '取得ERP回傳之聯產品資訊 + dtUnionProduct = getResponseContentDetail_TTICD(XmlDoc) + + '開窗給使用者選擇 + Cursor.Current = Cursors.WaitCursor + + If dtUnionProduct.DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP DID NOT RETURN THE JOINT PRODUCT INFORMATION%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dtUnionProduct.DefaultView + fSearch.strFindColumnName = "UnionProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Function + + '檢查聯產品資料是否存在系統中以及是否有版本資訊 + funLoadProduct(drSearch("UnionProductNo").ToString.ToUpper, False) + + If dsWIP.Tables(tblProductBasis).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("IssueState") <> 2 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%EDATA%][%Unfrozen%] "), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString <> dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%NOTHINGSTATE%][%CURVERSION%][%PRODUCTINFO%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + txtUnionProductNo.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductNo").ToString + txtUnionProductVersion.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString + txtUnionProductUnit.Text = dsWIP.Tables(tblProductBasis).Rows(0)("UnitNo").ToString + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + End If + + Cursor.Current = Cursors.Default + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + + '紀錄TransactionLog + addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "GetJointProductData", My.Computer.Name, gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "CreateStockInData", LogClass:="WIP") + End Try + + End Function + Structure MethodNames + ''' 檢查物料數量 + Const funCheckMTLQuantity = "funCheckMTLQuantity" + ''' 膠類時效卡控 + Const funCheckMTLGumDefrostHour = "funCheckMTLGumDefrostHour" + End Structure + Private Function funCheckMTLForBR(ByVal dtMaterialLot As DataTable, + ByRef strLinkName As String, ByRef intERFType As Int16, ByRef strRuleNo As String) As Boolean + + funOrganizeDtMaterialLot(LotNo, dtMaterialLot) + dtMaterialLot.DefaultView.RowFilter = "Qty>0" + dtMaterialLot = dtMaterialLot.DefaultView.ToTable() + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter &= CombineXMLParameter("checkin", "CheckIn", "Boolean", CInput(False), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP_Material.CheckMTLForBR", InXml, dtMaterialLot.Copy) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If Not ChkExecutionSuccess(XmlDoc) Then + '找出Exception訊並顯示出來 + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Return False + End If + + Dim xmlList As XmlNodeList = XmlDoc.GetElementsByTagName("message") + If xmlList.Count > 0 Then + xmlList = xmlList(0).SelectNodes("note") + If xmlList.Count > 0 Then + For Each xmlNode As XmlNode In xmlList + If funProcessMessages(xmlNode, strLinkName, intERFType, strRuleNo) = False Then Return False + Next + End If + End If + + Return True + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Return False + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Return False + End Try + + End Function + Private Function funProcessMessages(ByVal xmlNode As XmlNode, + ByRef strLinkName As String, ByRef intERFType As Int16, ByRef strRuleNo As String) As Boolean + + Dim MCode, MType, MMsg As String + MCode = xmlNode.SelectNodes("mcode").Item(0).InnerText + MType = xmlNode.SelectNodes("mtype").Item(0).InnerText + MMsg = xmlNode.SelectNodes("mmsg").Item(0).InnerText + + Dim methodName As String = "" + If MMsg.Contains("{") AndAlso MMsg.Contains("}") Then + Dim intStart As Int16 = MMsg.IndexOf("{") + Dim intEnd As Int16 = MMsg.IndexOf("}") + methodName = MMsg.Substring(intStart + 1, intEnd - intStart - 1) + MMsg = MMsg.Substring(intEnd + 1, MMsg.Length - intEnd - 1) + End If + + Select Case methodName + Case MethodNames.funCheckMTLQuantity + If ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-100601", MMsg), MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.No Then + Return False + End If + + Case MethodNames.funCheckMTLGumDefrostHour + strLinkName = "HOLD" + intERFType = 0 'BR Hold + MMsg = ChgTranslateErrorMsg(MMsg) + MMsg = MMsg.TrimStart(New Char() {vbCr, vbLf}) + If strRuleNo = defString Then + strRuleNo = MMsg + Else + strRuleNo &= (vbCrLf & MMsg) + End If + + Case Else + ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg(MCode, MMsg), MsgBoxStyle.Exclamation, Me.Text) + Return False + End Select + + Return True + + End Function + Sub funOrganizeDtMaterialLot(ByVal LotNo As String, ByVal dtMaterialLot As DataTable) + + For i = dtMaterialLot.Columns.Count - 1 To 0 Step -1 + Dim dc As DataColumn = dtMaterialLot.Columns(i) + Select Case dc.ColumnName + Case "EquipmentNo", "MaterialNo", "SubstituteMaterialNo", "MaterialLotNo", "UseQty" + Case Else + dtMaterialLot.Columns.RemoveAt(i) + End Select + Next + + If Not dtMaterialLot.Columns.Contains("LotNo") Then dtMaterialLot.Columns.Add("LotNo", GetType(String)) + dtMaterialLot.Columns("MaterialNo").ColumnName = "OrgMaterialNo" + dtMaterialLot.Columns("SubstituteMaterialNo").ColumnName = "MaterialNo" + dtMaterialLot.Columns("UseQty").ColumnName = "Qty" + + For Each dr As DataRow In dtMaterialLot.Rows + dr("LotNo") = LotNo + Next + + End Sub + '2019/07/12 Eric + Private Function funCombineT100InXml(ByVal FromProductNo As String, ByVal MONo As String) + + Dim code As String = String.Empty + Dim sqlcode As String = String.Empty + Dim description As String = String.Empty + + Dim XmlDoc As New XmlDocument() + Dim dtUnionProduct As DataTable + Dim arriveTime As DateTime = Now + + Try + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("ProductNo", "ProductNo", "String", FromProductNo, "") + strParameter += CombineXMLParameter("mono", "MONo", "String", MONo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsERP_T100.ERP_Joint_Product_Get", InXml) + + XmlDoc.LoadXml(OutXml) + + code = XmlDoc.GetElementsByTagName("execution").Item(0).SelectNodes("status").Item(0).Attributes("code").Value + description = XmlDoc.GetElementsByTagName("execution").Item(0).SelectNodes("status").Item(0).Attributes("description").Value + If code <> "0" Then + If description <> String.Empty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Return Message%]" & vbCrLf & description), MsgBoxStyle.Exclamation, Me.Text) + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Fail%]"), MsgBoxStyle.Exclamation, Me.Text) + End If + Exit Function + End If + + Dim dtUProduct As New DataTable("UnionProductData") + dtUProduct = New DataTable("UnionProductData") + dtUProduct.DefaultView.AllowNew = False + dtUProduct.DefaultView.AllowDelete = False + dtUProduct.DefaultView.AllowEdit = True + '建立UnionProductData Table的欄位 + dtUProduct.Columns.Add("UnionProductNo", System.Type.GetType("System.String")) + dtUProduct.Columns.Add("UnionProductUnit", System.Type.GetType("System.String")) + + Dim drPRD As DataRow + Dim item_no As String + Dim unit_no As String + Dim iCount As Integer = XmlDoc.GetElementsByTagName("row").Count - 1 + + For i As Integer = 1 To iCount + item_no = XmlDoc.DocumentElement.GetElementsByTagName("row").Item(i).SelectNodes("field").Item(0).InnerXml + unit_no = XmlDoc.DocumentElement.GetElementsByTagName("row").Item(i).SelectNodes("field").Item(1).InnerXml + drPRD = dtUProduct.NewRow() + drPRD("UnionProductNo") = item_no + drPRD("UnionProductUnit") = unit_no + dtUProduct.Rows.Add(drPRD) + Next + + '取得ERP回傳之聯產品資訊 + dtUnionProduct = dtUProduct + + If dtUnionProduct.DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP DID NOT RETURN THE JOINT PRODUCT INFORMATION%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + + '開窗給使用者選擇 + Cursor.Current = Cursors.WaitCursor + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dtUnionProduct.DefaultView + fSearch.strFindColumnName = "UnionProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Function + + '檢查聯產品資料是否存在系統中以及是否有版本資訊 + funLoadProduct(drSearch("UnionProductNo").ToString.ToUpper, False) + + If dsWIP.Tables(tblProductBasis).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("IssueState") <> 2 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%EDATA%][%Unfrozen%] "), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString <> dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%NOTHINGSTATE%][%CURVERSION%][%PRODUCTINFO%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + txtUnionProductNo.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductNo").ToString + txtUnionProductVersion.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString + txtUnionProductUnit.Text = dsWIP.Tables(tblProductBasis).Rows(0)("UnitNo").ToString + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + End If + + Cursor.Current = Cursors.Default + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + + '紀錄TransactionLog + addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "ERP_Joint_Product_Get", My.Computer.Name, gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "ERP_Joint_Product_Get", LogClass:="WIP") + End Try + + End Function + + '87580: [605]iMES與E10整合_第一階段_SDD210205_01-09取得E10聯產品資料 + Private Function funCombineE10ICDInXml(ByVal FromProductNo As String, ByVal MONo As String) + + Dim code As String = String.Empty + Dim sqlcode As String = String.Empty + Dim description As String = String.Empty + + Dim XmlDoc As New XmlDocument() + Dim dtUnionProduct As DataTable + Dim arriveTime As DateTime = Now + + Try + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("ProductNo", "ProductNo", "String", FromProductNo, "") + strParameter += CombineXMLParameter("mono", "MONo", "String", MONo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsERP_E10ICD.ERP_Joint_Product_Get", InXml) + + XmlDoc.LoadXml(OutXml) + + code = XmlDoc.GetElementsByTagName("execution").Item(0).SelectNodes("status").Item(0).Attributes("code").Value + description = XmlDoc.GetElementsByTagName("execution").Item(0).SelectNodes("status").Item(0).Attributes("description").Value + If code <> "0" Then + If description <> String.Empty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Return Message%]" & vbCrLf & description), MsgBoxStyle.Exclamation, Me.Text) + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Fail%]"), MsgBoxStyle.Exclamation, Me.Text) + End If + Exit Function + End If + + Dim dtUProduct As New DataTable("UnionProductData") + dtUProduct = New DataTable("UnionProductData") + dtUProduct.DefaultView.AllowNew = False + dtUProduct.DefaultView.AllowDelete = False + dtUProduct.DefaultView.AllowEdit = True + '建立UnionProductData Table的欄位 + dtUProduct.Columns.Add("UnionProductNo", System.Type.GetType("System.String")) + dtUProduct.Columns.Add("UnionProductUnit", System.Type.GetType("System.String")) + + Dim drPRD As DataRow + Dim item_no As String + Dim unit_no As String + Dim iCount As Integer = XmlDoc.GetElementsByTagName("row").Count - 1 + + For i As Integer = 1 To iCount + item_no = XmlDoc.DocumentElement.GetElementsByTagName("row").Item(i).SelectNodes("field").Item(0).InnerXml + unit_no = XmlDoc.DocumentElement.GetElementsByTagName("row").Item(i).SelectNodes("field").Item(1).InnerXml + drPRD = dtUProduct.NewRow() + drPRD("UnionProductNo") = item_no + drPRD("UnionProductUnit") = unit_no + dtUProduct.Rows.Add(drPRD) + Next + + '取得ERP回傳之聯產品資訊 + dtUnionProduct = dtUProduct + + If dtUnionProduct.DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP DID NOT RETURN THE JOINT PRODUCT INFORMATION%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + + '開窗給使用者選擇 + Cursor.Current = Cursors.WaitCursor + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dtUnionProduct.DefaultView + fSearch.strFindColumnName = "UnionProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Function + + '檢查聯產品資料是否存在系統中以及是否有版本資訊 + funLoadProduct(drSearch("UnionProductNo").ToString.ToUpper, False) + + If dsWIP.Tables(tblProductBasis).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("IssueState") <> 2 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%EDATA%][%Unfrozen%] "), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString <> dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%NOTHINGSTATE%][%CURVERSION%][%PRODUCTINFO%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + txtUnionProductNo.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductNo").ToString + txtUnionProductVersion.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString + txtUnionProductUnit.Text = dsWIP.Tables(tblProductBasis).Rows(0)("UnitNo").ToString + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + End If + + Cursor.Current = Cursors.Default + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + + '紀錄TransactionLog + addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "ERP_Joint_Product_Get", My.Computer.Name, gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "ERP_Joint_Product_Get", LogClass:="WIP") + End Try + + End Function + + +#End Region + +#Region "用料機制" + + ''' + ''' 2016/10/20 YF, 取出上料資訊 + ''' + ''' + Private Function GetFeedingData() As Boolean + + Dim result As Boolean = False + + ' 2016/10/20 YF, 依作業站用料選項處理用料機制 + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + Case "0" + ' 發料點(線邊倉或工單) + 'result = GetFeedingByPutinPlace() + btnKeyIn.Visible = True + txtMaterialNo.Enabled = True + txtMaterialLotNo.Enabled = True + result = True + Case "1" + ' 設備 + blnByEQP = True + GetFeedingByEQP() + txtMaterialNo.Enabled = False + txtMaterialLotNo.Enabled = False + Case "2" + ' 生產線, 待組裝版再實作 + Case "3" + ' 工位, 待組裝版再實作 + Case Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-003000", "[%MaterialOption%]:" & dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString & " [%NOT DEFINE%]!"), MsgBoxStyle.Exclamation, Me.Text) + End Select + + Return result + + End Function + +#End Region + +#Region "發料點上料資訊" + + ''' + ''' 2016/10/27 YF, 在物料區刷入物料及料批號, 自動從投料點帶出物料資訊, 從txtMaterialLotNo_KeyPress搬移過來 + ''' Gary Lu 20131104~06:增加先刷入物料編號再刷入物料批號的方式 + ''' 並修改成刷入物料料批批量小於總標準用量時,仍可自動帶入,惟帶入用量為該料批之批量 + ''' + ''' + + Private Sub AutoFeedingByPutinPlace(ByVal strMaterialNo As String, ByVal strMaterialLotNo As String) + + Try + '不須用料 + If dsWIP.Tables(tblTMaterial) Is Nothing OrElse + dsWIP.Tables(tblTMaterial).Rows.Count = 0 Then Exit Sub + + If strMaterialNo.Trim = "" Then Exit Sub + If strMaterialLotNo.Trim = "" Then Exit Sub + + Dim drMLot() As DataRow = dtMLot.Select("SubstituteMaterialNo = '" & strMaterialNo & "' And MaterialLotNo = '" & strMaterialLotNo & "'") + If drMLot.Length > 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-200004", "[%MaterialNo%]: " & strMaterialNo & vbCrLf & + "[%MaterialLotNo%]: " & strMaterialLotNo), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + Dim drMaterialLotData As DataRow = Nothing + For Each drTMaterial As DataRow In dsWIP.Tables(tblTMaterial).Rows + drMaterialLotData = funGetMateriallLotData(strMaterialNo, strMaterialLotNo, drTMaterial) + If IsNothing(drMaterialLotData) Then Continue For + + funAddNewMlot(drMaterialLotData, drTMaterial) + funUpdateSumUseQty(drTMaterial) + Exit For + Next + + If IsNothing(drMaterialLotData) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-202104", "[%MaterialNo%]:" & strMaterialNo & ", [%MaterialLotNo%]: " & strMaterialLotNo), + MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + txtMaterialLotNo.Text = "" + txtMaterialNo.Text = "" + txtMaterialNo.Focus() + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + Cursor.Current = Cursors.Default + End Try + + End Sub + Private Sub funUpdateSumUseQty(ByVal drTMaterial As DataRow) + + Dim SumQty As Decimal = 0 + For Each drMLot As DataRow In dtMLot.Rows + If drMLot("MaterialNo") = drTMaterial("MaterialNo") Then + SumQty += (drMLot("UseQty") * (drTMaterial("StdQty") / drMLot("SubstituteStdQty"))) + End If + Next + + drTMaterial.BeginEdit() + drTMaterial("UseQty") = Format(SumQty, "0.########") + drTMaterial.EndEdit() + End Sub + Private Sub funAddNewMlot(ByVal drMaterialLot As DataRow, ByVal drTMaterial As DataRow) + + Dim drAddMLot As DataRow + drAddMLot = dtMLot.NewRow + drAddMLot("EquipmentNo") = drMaterialLot("EquipmentNo") + drAddMLot("MaterialNo") = drTMaterial("MaterialNo") + drAddMLot("MaterialLotNo") = drMaterialLot("MaterialLotNo") + drAddMLot("Qty") = drMaterialLot("Qty") + drAddMLot("UseQty") = funCalculateUseQty(drTMaterial, drMaterialLot) + drAddMLot("SubstituteMaterialNo") = drMaterialLot("MaterialNo") + drAddMLot("SubstituteMaterialLevel") = drMaterialLot("SubstituteMaterialLevel") + drAddMLot("SubstituteMaterialType") = drMaterialLot("SubstituteMaterialType") + drAddMLot("SubstituteStdQty") = drMaterialLot("SubstituteStdQty") + drAddMLot("CheckLotNo") = drMaterialLot("CheckLotNo") + dtMLot.Rows.Add(drAddMLot) + + End Sub + + 'CHECKLXL + Private Function funLoadStuInfo() As Integer + + funLoadStuInfo = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + 'UNCHECK + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("ABC.wsWIP_21685.LoadStuInfoByLotNo", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblStuInfo = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("lodastudentinfobylotno").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("lodastudentinfobylotno").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("lodastudentinfobylotno").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + dsWIP.Tables(tblStuInfo).DefaultView.Sort = "StudentNo" + iugStuInfo.iMESUltraGrid.DataSource = dsWIP.Tables(tblStuInfo).DefaultView + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadStuInfo = 0 + + End Function + + 'CHECKLXL + Private Sub iugStudentInfo_iMESUltraGrid_InitializeLayOut(sender As Object, e As InitializeLayoutEventArgs) Handles iugStuInfo.iMESUltraGrid_InitializeLayOut + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblStuInfo).Columns.Count - 1 + Select Case dsWIP.Tables(tblStuInfo).Columns(i).ColumnName.ToUpper + Case "STUDENTNO" + With .Bands(tblStuInfo).Columns("StudentNo") + .Header.Caption = "StudentNo" + .Width = 120 + .Header.VisiblePosition = 1 + End With + Case "STUDENTNAME" + With .Bands(tblStuInfo).Columns("StudentName") + .Header.Caption = "StudentName" + .Width = 120 + .Header.VisiblePosition = 2 + End With + Case "ISSELECTED" + With .Bands(tblStuInfo).Columns("IsSelected") + .Header.Caption = "IsSelected" + .Width = 120 + .Header.VisiblePosition = 3 + .ValueList = vlStuInfoIsSelected + End With + Case "LOTNO" + With .Bands(tblStuInfo).Columns("LotNo") + .Header.Caption = "LotNo" + .Width = 120 + .Header.VisiblePosition = 4 + End With + Case Else + With .Bands(tblStuInfo).Columns(dsWIP.Tables(tblStuInfo).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End With + End Sub + + Private Function funGetMateriallLotData(ByVal strMaterialNo As String, ByVal strMaterialLotNo As String, ByVal drTMaterial As DataRow) As DataRow + + If funLoadSubstituteMaterial_Main(drTMaterial("MaterialNo"), drTMaterial("UnitNo")) >= 0 Then + Dim drSel As DataRow() = + dsWIP.Tables(tblSubstituteMaterial).Select("MaterialNo='" & strMaterialNo & "' and MaterialLotNo = '" & strMaterialLotNo & "'") + + If drSel.Length > 0 Then Return drSel(0) + End If + + Return Nothing + + End Function + Private Function funCalculateUseQty(ByVal drTMaterial As DataRow, ByVal drMateriallLot As DataRow) As Decimal + '判断当前物理与当前用料是否一致 不一致直接返回0 + If drMateriallLot("MaterialNo").ToString <> drTMaterial("MaterialNo").ToString Then + Return 0 + End If + Dim MaterialNo As String = drTMaterial("MaterialNo").ToString + + '總共需要的主料數量 + Dim StdUseQty As Decimal = drTMaterial("StdUseQty") + '做一個成品需要的主料數量 + Dim StdQty As Decimal = drTMaterial("StdQty") + + '計算還需要多少主料 + Dim RemainingQty As Decimal = funGetRemainingQty(StdUseQty, StdQty, MaterialNo) + + '單位轉成替代料 + RemainingQty = RemainingQty * (drMateriallLot("SubstituteStdQty") / StdQty) + + If RemainingQty <= 0 Then Return 0 + + '料批數量不足 則使用料批數量就好 + If drMateriallLot("Qty") < RemainingQty Then + Return drMateriallLot("Qty") + End If + + Return RemainingQty + + End Function + ''' + ''' 計算還需要多少主料 + ''' + Private Function funGetRemainingQty(ByVal StdUseQty As Decimal, ByVal StdQty As Decimal, ByVal MaterialNo As String) As Decimal + + Dim drSel As DataRow() = dtMLot.Select("MaterialNo = '" & MaterialNo & "'") + For Each drMLot In drSel + StdUseQty -= (drMLot("UseQty") * (StdQty / drMLot("SubstituteStdQty"))) + Next + + Return StdUseQty + + End Function + +#End Region + +#Region "設備上料資訊" + + ''' + ''' 2016/10/21 YF, 取得設備上料資訊 + ''' + ''' + Private Sub GetFeedingByEQP() + + Dim EquipmentNo As String = "" + Dim XmlDoc As New XmlDocument + Dim dsTemp As New DataSet + Dim drAdd As DataRow + + Try + + ' 設備編號 + If (dsWIP.Tables(tblTEquipment) Is Nothing) OrElse (dsWIP.Tables(tblTEquipment).Rows.Count = 0) Then + Throw New iMESException.MESException("0000-200003", "[%MATERIALOPTIONISEQP%], [%MUSTSELECTEQP%]!") + End If + + For Each r As DataRow In dsWIP.Tables(tblTEquipment).Rows + EquipmentNo += "|" & r("EquipmentNo").ToString + Next + If EquipmentNo <> "" Then + EquipmentNo = Mid(EquipmentNo, 2) + End If + + 'EquipmentNo = dsWIP.Tables(tblTEquipment).Rows(0)("EquipmentNo").ToString + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", dsWIP.Tables(tblLotState).Rows(0)("OPNo"), "") + strParameter += CombineXMLParameter("equipmentno", "EquipmentNo", "String", EquipmentNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsWIP_Material.LoadFeedingByEquipment", InXml) + + XmlDoc.LoadXml(OutXml) + + If Not ChkExecutionSuccess(XmlDoc) Then + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadfeedingbyequipment").Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadfeedingbyequipment").Item(0).SelectNodes("value").Item(0).InnerXml + + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + dtMLot.Clear() + + Dim iCount As Decimal + Dim drSel As DataRow() + Dim strConditionMtl As String = "" + For Each r1 As DataRow In dsWIP.Tables(tblTMaterial).Rows + strConditionMtl = "" + ' 判斷是否有上料 + Dim strSelectCondition As String = "" + If r1("PutInPlaceType") = 3 Then + strSelectCondition = " And MONo = '" & dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString & "' " + ElseIf r1("PutInPlaceType") = 2 OrElse r1("PutInPlaceType") = 4 Then + strSelectCondition = " And MONo = 'N/A'" + End If + + '新设备上料 根据用料清单找到可以使用的物料 + drSel = dsOE.Tables(strMOList).Select("MaterialNo = '" & r1("MaterialNo") & "'") + For Each dr As DataRow In drSel + strConditionMtl += "'" & dr("SubstituteMaterialNo") & "'" + "," + Next + strConditionMtl = strConditionMtl.Substring(0, strConditionMtl.Length - 1) + 'dsTemp.Tables(0).DefaultView.RowFilter = "MaterialNo = '" & r1("MaterialNo") & "' And Qty > 0" & strSelectCondition + dsTemp.Tables(0).DefaultView.RowFilter = "InputMaterialNo in (" & strConditionMtl & ") And Qty > 0" & strSelectCondition + dsTemp.Tables(0).DefaultView.Sort = "SEQ" + + + + 'iCount = dsTemp.Tables(0).DefaultView.Count + 'Dim Num As Decimal + ''Dim Remainder As Decimal + 'If iCount <> 0 Then + ' Num = Format(Convert.ToDecimal(RemainingQty / iCount), "0.########") + ' 'Remainder = RemainingQty Mod iCount + 'End If + + Dim sumRemainingQty As Decimal = 0 + ' 將上料資訊寫入dtMLot + For Each r2 As DataRowView In dsTemp.Tables(0).DefaultView + drAdd = dtMLot.NewRow + drAdd("EquipmentNo") = r2("EquipmentNo") + 'drAdd("MaterialNo") = r2("MaterialNo") '因为上料表中的materialno是* 则取工单用料清单的主料 新设备上料 14278 + drAdd("MaterialNo") = r1("MaterialNo") + drAdd("MaterialLotNo") = r2("MaterialLotNo") + drAdd("Qty") = r2("Qty") + drAdd("UseQty") = 0 + drAdd("SubstituteMaterialNo") = r2("InputMaterialNo") + drAdd("SubstituteMaterialLevel") = r2("SubstituteMaterialLevel") + drAdd("SubstituteMaterialType") = r2("SubstituteMaterialType") + drAdd("SubstituteStdQty") = r2("SubstituteStdQty") + drAdd("CheckLotNo") = r2("CheckLotNo") + drAdd("AccDate") = r2("AcclimationDate") '回溫時間 + dtMLot.Rows.Add(drAdd) + Next + + For Each drMLot As DataRow In dtMLot.Rows + If drMLot("UseQty") <= 0 Then + drMLot("UseQty") = funCalculateUseQty(r1, drMLot) + End If + Next + + funUpdateSumUseQty(r1) + Next + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + XmlDoc = Nothing + End Try + + End Sub + + ''' + ''' 2016/10/27 YF, 自動上料 - 設備 + ''' + ''' + Private Function AutoFeedingByEQP() As Boolean + + Dim result As Boolean = False + Dim EquipmentNo As String + Dim ActiveRow As UltraGridRow + Dim XmlDoc As New XmlDocument + Dim FeedingQty As Decimal + + Try + + Cursor.Current = Cursors.WaitCursor + + ' 設備編號 + If (dsWIP.Tables(tblTEquipment) Is Nothing) OrElse (dsWIP.Tables(tblTEquipment).Rows.Count = 0) Then + Throw New iMESException.MESException("0000-200003", "[%MATERIALOPTIONISEQP%], [%MUSTSELECTEQP%]!") + End If + + EquipmentNo = dsWIP.Tables(tblTEquipment).Rows(0)("EquipmentNo").ToString + + ' 檢查是否有選定一筆物料 + If (Me.iugMaterial.iMESUltraGrid.ActiveRow Is Nothing) OrElse (Not Me.iugMaterial.iMESUltraGrid.ActiveRow.IsDataRow) Then + Throw New iMESException.MESException("0000-003000", "[%PLEASE SELECT%] [%MATERIAL%]!") + Else + ActiveRow = Me.iugMaterial.iMESUltraGrid.ActiveRow + End If + + ' 若目前作用中的資料列是子資料, 則先將父資料設為ActiveRow + If (Not ActiveRow.ParentRow Is Nothing) Then + Me.iugMaterial.iMESUltraGrid.ActiveRow = ActiveRow.ParentRow + ActiveRow = Me.iugMaterial.iMESUltraGrid.ActiveRow + End If + + ' 檢查有無輸入料號 + If (Me.txtMaterialNo.Text = "") Then + Me.txtMaterialNo.Focus() + Throw New iMESException.MESException("0000-200001", "[%MATERIALNO%]!") + End If + + ' 檢查有無輸入料批 + If (Me.txtMaterialLotNo.Text = "") Then + Me.txtMaterialLotNo.Focus() + Throw New iMESException.MESException("0000-200001", "[%MATERIALLOTNO%]!") + End If + + ' 2016/11/03 YF, 自動上料時, 應將工單或線邊倉目前數量全數上到設備 + FeedingQty = GetMaterialFeedingQty(ActiveRow) + + ' 進行設備上料 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(ActiveRow.Cells("MaterialNo").Value), "") + strParameter += CombineXMLParameter("checklotno", "CheckLotNo", "String", CInput(ActiveRow.Cells("CheckLotNo").Value), "") + strParameter += CombineXMLParameter("mono", "MONo", "String", CInput(txtMONo.Text), "") + strParameter += CombineXMLParameter("inputmaterialno", "InputMaterialNo", "String", CInput(Me.txtMaterialNo.Text), "") + strParameter += CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(Me.txtMaterialLotNo.Text), "") + strParameter += CombineXMLParameter("inputqty", "InputQty", "Decimal", FeedingQty, "") + strParameter += CombineXMLParameter("userno", "UserNo", "String", CInput(gUserNo), "") + strParameter += CombineXMLParameter("revisedate", "ReviseDate", "DateTime", Format(Now, "yyyy/MM/dd HH:mm:ss"), "") + + ' 因CInput的參數是ByRef, 所以會造成UltraGrid的ActiveRow變成編輯狀況(有一支筆的圖示出現) + ActiveRow.CancelUpdate() + + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsWIP_Material.Exe_EQPMountMaterial", InXml) + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + Me.txtMaterialNo.Text = "" + Me.txtMaterialLotNo.Text = "" + Me.txtMaterialNo.Focus() + ' 上料成功後重新取出上料資訊 + GetFeedingByEQP() + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + result = True + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + XmlDoc = Nothing + Cursor.Current = Cursors.Default + End Try + + Return result + + End Function + +#End Region + +#Region "取出物料要上料的數量" + + ''' + ''' 2016/11/03 YF, 取出要上料的數量 + ''' 工單發料: pPutinNo即為工單編號 + ''' 線邊倉發料: pPutinNo即為庫房編號 + ''' + ''' + ''' + Private Function GetMaterialFeedingQty(ByVal row As UltraGridRow) As Decimal + + Dim FeedingQty As Decimal = 0 + Dim dsTemp As New DataSet + Dim XmlDoc As New XmlDocument + Dim TagName As String + Dim ErrorCode As String + Dim InventoryNo As String + Dim ErrorMessage As String + + Try + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + + If (row.Cells("PutinPlaceType").Value = 3) Then + ' 工單發料 + strParameter = CombineXMLParameter("mono", "MONo", "String", CInput(Me.txtMONo.Text), "") + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(row.Cells("MaterialNo").Value), "") + strParameter += CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(Me.txtMaterialLotNo.Text), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + OutXml = InvokeSrv("wsOE.LoadMOMaterialState", InXml) + TagName = "loadmomaterialstate" + ErrorCode = "9P12-200026" + ErrorMessage = "[%MONO%]: " & Me.txtMONo.Text + ElseIf (row.Cells("PutinPlaceType").Value = 2) Then + ' 線邊倉發料 + ' 取出倉庫編號 + InventoryNo = GetInventoryNo() + strParameter = CombineXMLParameter("inventoryno", "InventoryNo", "String", CInput(InventoryNo), "") + strParameter += CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(Me.txtMaterialLotNo.Text), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + OutXml = InvokeSrv("wsINV.LoadWIPInventory_Raw", InXml) + TagName = "loadwipinventory_raw" + ErrorCode = "0000-202103" + ErrorMessage = "[%INVENTORYNO%]: " & InventoryNo & " " + Else + Throw New iMESException.MESException("0000-003000", "[%PutinPlaceType%]: " & row.Cells("PutinPlaceType").Value & ", [%NOT DEFINE%]!") + End If + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName(TagName).Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + XmlData = XmlDoc.DocumentElement.GetElementsByTagName(TagName).Item(0).SelectNodes("value").Item(0).InnerXml + + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If (dsTemp.Tables.Count > 0) AndAlso (dsTemp.Tables(0).Rows.Count > 0) Then + + If (dsTemp.Tables(0).Rows(0)("Qty") > 0) Then + FeedingQty = dsTemp.Tables(0).Rows(0)("Qty") + Else + Throw New iMESException.MESException(ErrorCode, + "[%MaterialNo%]: " & row.Cells("MaterialNo").Value & vbCrLf & + "[%MaterialLotNo%]: " & Me.txtMaterialLotNo.Text & vbCrLf & + "[%QUANTITY%] [%IS EQUAL TO%] 0!") + End If + + Else + Throw New iMESException.MESException("0000-200003", + ErrorMessage & vbCrLf & + "[%MaterialNo%]: " & row.Cells("MaterialNo").Value & vbCrLf & + "[%MaterialLotNo%]: " & Me.txtMaterialLotNo.Text) + + End If + + Else + Throw New iMESException.MESException(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc)) + End If + + Catch ex As iMESException.MESException + Throw + Catch ex As Exception + Throw + Finally + dsTemp = Nothing + XmlDoc = Nothing + End Try + + Return FeedingQty + + End Function + + ''' + ''' 2016/11/03 YF, 取出倉庫 + ''' + ''' + ''' + Private Function GetInventoryNo() As String + + Dim result As String = "" + Dim dsTemp As New DataSet + Dim XmlDoc As New XmlDocument + + Try + + strParameter = CombineXMLParameter("areano", "AreaNo", "String", CInput(Me.txtAreaNo.Text), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + OutXml = InvokeSrv("wsSMD.LoadAreaInventory", InXml) + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadareainventory").Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadareainventory").Item(0).SelectNodes("value").Item(0).InnerXml + + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If (dsTemp.Tables.Count > 0) AndAlso (dsTemp.Tables(0).Rows.Count > 0) Then + dsTemp.Tables(0).DefaultView.Sort = "DefaultInv Desc" + result = dsTemp.Tables(0).DefaultView(0)("InventoryNo") + Else + Throw New iMESException.MESException("0000-202111", "[%AreaNo%]: " & Me.txtAreaNo.Text) + End If + + Else + Throw New iMESException.MESException(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc)) + End If + + + Catch ex As iMESException.MESException + Throw + Catch ex As Exception + Throw + Finally + dsTemp = Nothing + XmlDoc = Nothing + End Try + + Return result + + End Function + +#End Region + +#Region "作業人員" + + ''' + ''' 2016/12/26 YF, 顯示作業人員現況資訊 + ''' + ''' + ''' + Private Sub btnOperator_Click(sender As Object, e As EventArgs) Handles btnOperator.Click + + Dim parameters As Dictionary(Of String, Object) + Dim EquipmentNo As String = "" + + Try + + parameters = New Dictionary(Of String, Object) + + With dsWIP.Tables(tblLotState).Rows(0) + + Select Case .Item("MultiOperatorMode").ToString + Case "0" + ' 作業站 + parameters.Add("OPNo", .Item("OPNo").ToString) + Case "1" + ' 區域 + parameters.Add("AreaNo", .Item("AreaNo").ToString) + Case "2" + ' 設備 + If (dsWIP.Tables(tblTEquipment) Is Nothing) OrElse (dsWIP.Tables(tblTEquipment).Rows.Count = 0) Then + Throw New iMESException.MESException("0000-103010", "[%PLEASE SELECT%] [%EQUIPMENT%]!") + End If + + For Each row As DataRow In dsWIP.Tables(tblTEquipment).Rows + EquipmentNo += row("EquipmentNo") & "," + Next + + EquipmentNo = EquipmentNo.TrimEnd(",") + parameters.Add("EquipmentNo", EquipmentNo) + + Case "5" 'Mantis 63873: 增加判斷多人加工模式為生產批, 並傳入資料 + ' 生產批 + parameters.Add("LotNo", .Item("LotNo").ToString) + Case Else + Throw New iMESException.MESException("0000-003000", "[%MultiOperatorMode%]:" & .Item("MultiOperatorMode").ToString & " [%NOT DEFINE%]!") + End Select + + End With + + parameters.Add("EnableSignOut", False) + Me.ObjectFileHandler.Execute(pObjectID:="WP_OperatorOnline", pParameters:=parameters) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + +#End Region + +#Region "特殊生產需求" + + '2019/01/19 Eric 特殊生產需求顯示 + Private Sub btnSWR_Click(sender As System.Object, e As System.EventArgs) Handles btnSWR.Click + + '2019/02/12 Eric 加入判斷有無資料 + If blnShowSWR = True Then + + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("MONo", txtMONo.Text) + Parameters.Add("CustomerLotNo", txtCustomerLotNo.Text) + Parameters.Add("OPNo", txtOPNo.Text) + Parameters.Add("LotNo", txtLotNo.Text) + Parameters.Add("DeviceNo", dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString) + Parameters.Add("CustomerNo", dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString) + Parameters.Add("LogGroupSerial", dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString) + Parameters.Add("blnCICo", True) + Me.ObjectFileHandler.Execute("WP_SWRBasisRead", Parameters) + + btnSWR.Visible = True + + End If + + End Sub + + '2019/02/12 Eric + Private Sub funLoadSWRJoinLog() + + Cursor.Current = Cursors.WaitCursor + + + If Not IsNothing(dsWIP.Tables(tblSWRJoinLog)) Then + dsWIP.Tables.Remove(tblSWRJoinLog) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("loggroupserial", "LogGroupSerial", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString), "") + strParameter += CombineXMLParameter("customerno", "CustomerNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(txtLotNo.Text), "") + strParameter += CombineXMLParameter("deviceno", "DeviceNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString), "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(txtOPNo.Text), "") + strParameter += CombineXMLParameter("customerlotno", "CustomerLotNo", "String", CInput(txtCustomerLotNo.Text), "") + strParameter += CombineXMLParameter("mono", "MONo", "String", CInput(txtMONo.Text), "") + strParameter += CombineXMLParameter("status", "Status", "Integer", 2, "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + + OutXml = InvokeSrv("wsWIP.LoadSWRBasisJoinLog", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSWRJoinLog = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadswrbasisjoinlog").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadswrbasisjoinlog").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadswrbasisjoinlog").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + Cursor.Current = Cursors.Default + + End Sub + +#End Region + +#Region "料批卡控" + + Private Sub funLoadAllMaterialLot() + + Dim drAdd As DataRow + Dim drSel As DataRow() + Dim defNullDate As Date = CDate("9999/12/31") '製造日期或保存期限為Null時, 填入9999/12/31, 以防步Null錯誤, 因Null表示不受管控, 可以較後使用, 故填入較大的值 + + dtAllMTLLot = New DataTable("AllMTLLot") + dtAllMTLLot.Columns.Add("MaterialNo", System.Type.GetType("System.String")) '主料號 + dtAllMTLLot.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtAllMTLLot.Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dtAllMTLLot.Columns.Add("MFGDate", System.Type.GetType("System.DateTime")) + dtAllMTLLot.Columns.Add("ExpireDate", System.Type.GetType("System.DateTime")) + dtAllMTLLot.Columns.Add("InputDate", System.Type.GetType("System.DateTime")) + + dtAllMTLLot.Columns.Add("SubstituteMaterialNo", System.Type.GetType("System.String")) '新增一替代料欄位,2010/03/26,by yumei, 實際用料的料號 + dtAllMTLLot.Columns.Add("SubstituteMaterialLevel", System.Type.GetType("System.Int16")) '新增一替代料位階欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("SubstituteMaterialType", System.Type.GetType("System.String")) '新增一替代料類型欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("SubstituteStdQty", System.Type.GetType("System.Decimal")) '新增一替代料標準用量欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) '新增一替代料是否檢查批號欄位,2013/01/08,by Kevin + + dtAllMTLLot.Columns.Add("SeqNo", System.Type.GetType("System.Int16")) '記錄同料號間各料批應被使用的次序 + + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + + Case "0" ' 發料點(線邊倉或工單) + '將Temp_Material中各主料所有可用料批全數取出, 存入dtAllMTLLot中 + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + Call funLoadSubstituteMaterial_Main(drMTL("MaterialNo"), drMTL("UnitNo")) + For Each drMTLLot As DataRow In dsWIP.Tables(tblSubstituteMaterial).Rows + drAdd = dtAllMTLLot.NewRow + drAdd("MaterialNo") = drMTL("MaterialNo") 'BOM的主料號 + drAdd("MaterialLotNo") = drMTLLot("MaterialLotNo") + drAdd("Qty") = drMTLLot("Qty") + If drMTLLot("ManufactureDate").ToString = "" Then + drAdd("MFGDate") = defNullDate + Else + drAdd("MFGDate") = drMTLLot("ManufactureDate") + End If + If drMTLLot("ExpireDate").ToString = "" Then + drAdd("ExpireDate") = defNullDate + Else + drAdd("ExpireDate") = drMTLLot("ExpireDate") + End If + If drMTLLot("InputDate").ToString = "" Then + drAdd("InputDate") = defNullDate + Else + drAdd("InputDate") = drMTLLot("InputDate") + End If + + drAdd("SubstituteMaterialNo") = drMTLLot("MaterialNo") '實際料號, 有可能與主料號同也有可能是替代料號 + drAdd("SubstituteMaterialLevel") = drMTLLot("SubstituteMaterialLevel") + drAdd("SubstituteMaterialType") = drMTLLot("SubstituteMaterialType") + drAdd("SubstituteStdQty") = drMTLLot("SubstituteStdQty") + drAdd("CheckLotNo") = drMTLLot("CheckLotNo") + dtAllMTLLot.Rows.Add(drAdd) + Next + Next + + '計算同一料號各料批的使用次序 + Dim dvAllMTLLot, dvTemp As DataView + Dim dtTemp As DataTable + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + dvAllMTLLot = New DataView(dtAllMTLLot) + dvAllMTLLot.RowFilter = "MaterialNo = '" & drMTL("MaterialNo") & "'" + dtTemp = dvAllMTLLot.ToTable(True, {"MFGDate", "ExpireDate", "InputDate"}) '對製造日期,有效日期,入庫日做Distinct篩選 + dvTemp = dtTemp.DefaultView + dvTemp.Sort = "MFGDate, ExpireDate, InputDate" + '當MFGDate, ExpireDate, InputDate皆相同時, 需給予相同的SeqNo, 故以Distinct的三個日期下去跑Loop + For idx As Integer = 0 To dvTemp.Count - 1 + drSel = dtAllMTLLot.Select("MaterialNo = '" & drMTL("MaterialNo") & "'" & + "And MFGDate = #" & Format(dvTemp(idx)("MFGDate"), "yyyy/MM/dd HH:mm:ss") & "#" & + " And ExpireDate = #" & Format(dvTemp(idx)("ExpireDate"), "yyyy/MM/dd HH:mm:ss") & "#" & + " And InputDate = #" & Format(dvTemp(idx)("InputDate"), "yyyy/MM/dd HH:mm:ss") & "#") + For j As Integer = 0 To drSel.Length - 1 + drSel(j)("SeqNo") = idx + 1 + Next + Next + Next + + Case "1" '設備 已在LoadTemp_Material中處理 + + + End Select + + End Sub + + Private Sub funAutoSetMaterialLot() + + Dim drSel, dtSelMTL As DataRow() + Dim decLeftQty As Decimal + + Call funLoadAllMaterialLot() + Call funLoadTemp_MaterialLot() + + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + + Case "0" ' 發料點(線邊倉或工單) + '依據CI刷入的料批先進先出安排用量 + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + + decLeftQty = drMTL("StdUseQty") + + drSel = dsWIP.Tables(tblTMaterialLot).Select("MainMaterialNo = '" & drMTL("MaterialNo") & "'", "MFGDate, ExpireDate, InputDate") + For idx As Integer = 0 To drSel.Length - 1 + drAdd = dtMLot.NewRow + drAdd("EquipmentNo") = "N/A" + drAdd("MaterialNo") = drMTL("MaterialNo") + drAdd("MaterialLotNo") = drSel(idx)("MaterialLotNo") + drAdd("Qty") = drSel(idx)("Qty") + drAdd("SubstituteMaterialNo") = drSel(idx)("MaterialNo") + drAdd("SubstituteMaterialLevel") = drSel(idx)("SubstituteMaterialLevel") + drAdd("SubstituteMaterialType") = drSel(idx)("SubstituteMaterialType") + drAdd("SubstituteStdQty") = drSel(idx)("SubstituteStdQty") + drAdd("CheckLotNo") = drSel(idx)("CheckLotNo") + + ' 計算使用量 + If (drSel(idx)("Qty") > decLeftQty) Then + drAdd("UseQty") = decLeftQty + decLeftQty = 0 + Else + drAdd("UseQty") = drSel(idx)("Qty") + decLeftQty = decLeftQty - drSel(idx)("Qty") + End If + + dtMLot.Rows.Add(drAdd) + Next + + If (decLeftQty <> 0) Then + drMTL("UseQty") = Format(drMTL("StdUseQty") - decLeftQty, "0.########") + Else + drMTL("UseQty") = Format(drMTL("StdUseQty"), "0.########") + End If + Next + + End Select + + End Sub + Private Sub LoadMaterialGumType(ByVal MaterialNo As String, ByVal MaterialType As String) + Dim tmpStringReader As System.IO.StringReader '將字串轉換成可讀入DataSet的物件 + + Dim XmlData As String '儲存取回之資料 + Dim XmlSchema As String '儲存取回之資料結構 + + '先判斷是否dataset中已有MaterialType之datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsDefine.Tables(strTableName)) Then + dsDefine.Tables.Remove(strTableName) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("materialtype", "MaterialType", "String", CInput(MaterialType), "") + strParameter &= CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + strParameter &= CombineXMLParameter("issuestate", "IssueState", "Integer", defInteger, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsMTL.LoadMaterialGumType", InXml) + + '利用XmlDoc物件處理ReturnValue + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + + If Not ChkExecutionSuccess(XmlDoc) Then + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + strTableName = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmaterialgumtype").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmaterialgumtype").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsDefine.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmaterialgumtype").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsDefine.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + + '當物料類別及物料編號都有設時,判斷時先依據有設MATERIALNO的判斷(非*) + If dsDefine.Tables(strTableName).Rows.Count > 1 Then + For index = 0 To dsDefine.Tables(strTableName).Rows.Count - 1 + Dim dr As DataRow = dsDefine.Tables(strTableName).Rows(index) + If dr("MaterialNo").ToString = "*" Then + dr.Delete() + Exit For + End If + Next + dsDefine.Tables(strTableName).AcceptChanges() + End If + + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + Private Sub funLoadWipInventory_Raw(ByVal MaterialNo As String, ByVal MaterialLotNo As String) + + Dim tmpStringReader As System.IO.StringReader '將字串轉換成可讀入DataSet的物件 + Dim XmlData As String '儲存取回之資料 + Dim XmlSchema As String '儲存取回之資料結構 + + '先判斷是否dataset中已有Inventory之datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsINV.Tables(strRaw)) Then + dsINV.Tables.Remove(strRaw) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + strParameter = CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(MaterialLotNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsINV.LoadWIPInventory_Raw", InXml) + + '利用XmlDoc物件處理ReturnValue + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + + strRaw = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadwipinventory_raw").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_raw").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsINV.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_raw").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsINV.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load Raw of WIP Inventory failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + + Finally + tmpStringReader = Nothing + + End Try + + End Sub +#End Region + +#Region "聯產品" + + Private Sub btnGetProduct_Click(sender As Object, e As EventArgs) Handles btnGetProduct.Click + + Dim drSel As DataRow() + Dim strUniPrdPara As String + + '讀取系統參數AllowLotProductChange(允許生產批變更產品) 要從MES或ERP去撈聯產品資訊 + drSel = dsWIP.Tables(tblSYSParameter).Select("ParameterNo = 'AllowLotProductChange'") + If drSel.Length > 0 Then + strUniPrdPara = drSel(0)("ParameterValue").ToString + End If + + Select Case strUniPrdPara + Case "0" '不允許 + btnGetProduct.Enabled = False + Case "1" '撈MES產品資訊 + + Call funLoadProduct() + + Cursor.Current = Cursors.WaitCursor + + If dsWIP.Tables(tblProductBasis) Is Nothing Then Exit Sub + + If dsWIP.Tables(tblProductBasis).DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%Product Basis%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dsWIP.Tables(tblProductBasis).DefaultView + fSearch.strFindColumnName = "ProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Sub + + If txtUnionProductNo.Text <> drSearch("ProductNo").ToString Then + txtUnionProductNo.Text = drSearch("ProductNo").ToString + End If + If txtUnionProductVersion.Text <> drSearch("ProductVersion").ToString Then + txtUnionProductVersion.Text = drSearch("ProductVersion").ToString + End If + If txtUnionProductUnit.Text <> drSearch("UnitNo").ToString Then + txtUnionProductUnit.Text = drSearch("UnitNo").ToString + End If + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + + Cursor.Current = Cursors.Default + + Case "2" '撈ERP TIPTOP 聯產品資訊 + + Call funCombineTTInXml(dsWIP.Tables(tblOEMOBasis).Rows(0)("ProductNo").ToString) + + Case "3" '撈ERP T100 聨產品資訊 + + Call funCombineT100InXml(dsWIP.Tables(tblOEMOBasis).Rows(0)("ProductNo").ToString, dsWIP.Tables(tblOEMOBasis).Rows(0)("MONO").ToString) + + Case "4" '撈E10ICD 聨產品資訊 + '87580: [605]iMES與E10整合_第一階段_SDD210205_01-09取得E10聯產品資料 + Call funCombineE10ICDInXml(dsWIP.Tables(tblOEMOBasis).Rows(0)("ProductNo").ToString, dsWIP.Tables(tblOEMOBasis).Rows(0)("MONO").ToString) + + Case "5" '撈ERP TIPTOPICD 聨產品資訊 + + Call funCombineTTICDInXml(dsWIP.Tables(tblOEMOBasis).Rows(0)("ProductNo").ToString) + + End Select + + End Sub + + Private Sub chkUnionProductNo_CheckedChanged(sender As Object, e As EventArgs) Handles chkUnionProductNo.CheckedChanged + '取消勾選聯產品時需將聯產品資訊清空 + If Not chkUnionProductNo.Checked Then + txtUnionProductNo.Text = "" + txtUnionProductVersion.Text = "" + txtUnionProductUnit.Text = "" + End If + End Sub + + Private Function funChkLastBR(ByVal LinkName As String) As Boolean + + funChkLastBR = False '預設為false + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("linkname", "LinkName", "String", LinkName, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.ChkLastBR", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出ShiftNo + If XmlDoc.GetElementsByTagName("lastbr").Item(0).SelectNodes("value").Count > 0 Then + funChkLastBR = CBool(XmlDoc.DocumentElement.GetElementsByTagName("lastbr").Item(0).SelectNodes("value").Item(0).InnerText) + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + End Function + +#End Region + +#Region "Bin Process" + + Private Sub funLoadSystemBin() + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + InXml = CombineXMLRequest(strIdentity, "") + + Try + ' 2016 YF, Dim wsSYS As New wsSYS.wsSYS + Dim XmlDoc As New XmlDocument + ' 2016 YF, wsSYS.Url = LocalizeWebService(wsSYS.Url.ToString) + ' 2016 YF, wsSYS.EnableDecompression = True + ' 2016 YF, OutXml = wsSYS.LoadBin(InXml) + OutXml = InvokeSrv("wsSYS.LoadBin", InXml) + + ' 2016 YF, wsSYS.Dispose() + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + strSysBin = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadbin").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadbin").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadbin").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If Not dsWIP.Tables(strSysBin) Is Nothing Then + dvSysBin = dsWIP.Tables(strSysBin).DefaultView + + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + + Private Sub funLoadGoodBinState() + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(strBinState)) Then + dsWIP.Tables.Remove(strBinState) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsWIP.LoadGoodBinState(InXml) + OutXml = InvokeSrv("wsWIP.LoadGoodBinState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + strBinState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadgoodbinstate").Item(0).SelectNodes("name").Item(0).InnerXml + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadgoodbinstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadgoodbinstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + iGoodBinStateQty = 0 + If dsWIP.Tables(strBinState).Rows.Count > 0 Then + For Each drTemp As DataRow In dsWIP.Tables(strSysBin).Rows + iGoodBinStateQty += CInt(dsWIP.Tables(strBinState).Rows(0)(drTemp("BinNo").ToString)) + Next + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load Good Bin State of LotNo:" & LotNo & " Failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + + Finally + + End Try + + End Sub + +#End Region + + Private Function funGetLotStateIncludeData() As Integer + + funGetLotStateIncludeData = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.GetLotStateIncludeData", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出ShiftNo + If XmlDoc.GetElementsByTagName("havecomponent").Item(0).SelectNodes("value").Count > 0 Then + HaveComponent = XmlDoc.DocumentElement.GetElementsByTagName("havecomponent").Item(0).SelectNodes("value").Item(0).InnerText + End If + If XmlDoc.GetElementsByTagName("havelevel").Item(0).SelectNodes("value").Count > 0 Then + HaveLevel = XmlDoc.DocumentElement.GetElementsByTagName("havelevel").Item(0).SelectNodes("value").Item(0).InnerText + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funGetLotStateIncludeData = 0 + + End Function + + +#Region "自動計算GoodQty、LossQty的數量" + Private Sub iugKeyIn_iMESUltraGrid_AfterCellActivate(sender As Object, e As EventArgs) Handles iugKeyIn.iMESUltraGrid_AfterCellActivate + + If funGetParameter("SysInfo", "CalculateQty") = 1 Then + Dim drSelError() As DataRow + Dim decScrapQty As Decimal = 0 + Dim decLossQty As Decimal = 0 + drSelError = dtKeyIn.Select("AttribNo = 'LossQty'") + If drSelError.Length <> 0 Then + If IsNumeric(drSelError(0)("AttribValue")) Then + decLossQty = drSelError(0)("AttribValue") + End If + End If + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decScrapQty = decScrapQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decScrapQty + End If + drSelError = dtKeyIn.Select("AttribNo = 'GoodQty'") + Dim blnCalulate As Boolean = True '0111211: [49-1]扫脚_check-out_bin分布调整,若有bin分佈調整, 則不自動計算GoodQty + If drSelError.Length <> 0 Then + If HaveLevel AndAlso iGoodBinStateQty <> 0 Then + If Not IsNothing(dtBinNew) AndAlso dtBinNew.Rows.Count > 0 Then + blnCalulate = False + End If + End If + If blnCalulate Then + drSelError(0)("AttribValue") = CDec(txtCurQty.Text) - decScrapQty - decLossQty + End If + End If + End If + + End Sub +#End Region + + + Private Sub uegMaterial_KeyIn2_ExpandedStateChanged(sender As Object, e As EventArgs) Handles uegMaterial_KeyIn2.ExpandedStateChanged, uegAttrib_Equipment.ExpandedStateChanged + + If uegMaterial_KeyIn2.Expanded Then + + If uegAttrib_Equipment.Expanded Then + uegMaterial_KeyIn2.Size = New System.Drawing.Size(uegMaterial_KeyIn2.Width, ((uplAll.Height - uegLotInfo.Height) / 3) * 2 - 10) + uegAttrib_Equipment.Size = New System.Drawing.Size(uegAttrib_Equipment.Width, ((uplAll.Height - uegLotInfo.Height) / 3) - 10) + End If + + Else + + If uegAttrib_Equipment.Expanded Then + uegAttrib_Equipment.Size = New System.Drawing.Size(uegAttrib_Equipment.Width, uplAll.Height - uegLotInfo.Height - 20) + End If + + End If + + End Sub +#Region "'//^_^ADD BY H-14278 2023-12-29 新设备上料" + Private Sub funLoadMOMaterialList(ByVal MONo As String, ByVal OPNo As String) '//取出MO MaterialList資料 + + If Not IsNothing(dsOE.Tables(strMOList)) Then '修正用料清單多次查詢重複計算問題 + dsOE.Tables.Remove(strMOList) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("mono", "MONo", "String", MONo.ToUpper, "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", OPNo.ToUpper, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsOE.LoadMOMaterialListJoinMOBasis(InXml) + OutXml = InvokeSrv("wsOE.LoadMOMaterialListJoinMOBasis", InXml) + + '利用XmlDoc物件處理ReturnValue + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + + strMOList = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmomateriallistjoinmobasis").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmomateriallistjoinmobasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsOE.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmomateriallistjoinmobasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsOE.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + XmlDoc = Nothing + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load MO Material List Failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + + Finally + tmpStringReader = Nothing + End Try + + End Sub + +#End Region + +End Class + diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBinStateAdjust .resx b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBinStateAdjust .resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBinStateAdjust .resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBinStateAdjust .vb b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBinStateAdjust .vb new file mode 100644 index 0000000..4b00afa --- /dev/null +++ b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/frmBinStateAdjust .vb @@ -0,0 +1,410 @@ +Imports iMESExceptionManager + +Public Class frmBinStateAdjust + + Inherits System.Windows.Forms.Form + + '//Public Variables + Public LotNo As String = defString + Public dvSysBin As DataView + Public dtGoodBin As DataTable + Public dtBinNew As DataTable + Public PrivFunNo As String = defString + + '//資料表相關變數 + + Dim drSel As DataRow() + Dim drAdd As DataRow + + '//控制項物件 + + Dim lblBinNo() As Label + Dim txtOBin() As TextBox + ' Dim txtBin_R() As TextBox '剩餘 + Dim txtBin_S() As TextBox 'Split + + '//其他共用變數 + Dim aryRBin() As Long + Dim intCount As Integer + Dim i, j As Integer + Friend WithEvents lblOnlyAllowOrgBinSub As Label + +#Region " Windows Form 設計工具產生的程式碼 " + + Public Sub New() + MyBase.New() + + '此呼叫為 Windows Form 設計工具的必要項。 + + InitializeComponent() + + '在 InitializeComponent() 呼叫之後加入所有的初始設定 + + End Sub + + 'Form 覆寫 Dispose 以清除元件清單。 + + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing Then + If Not (components Is Nothing) Then + components.Dispose() + End If + End If + MyBase.Dispose(disposing) + End Sub + + '為 Windows Form 設計工具的必要項 + Private components As System.ComponentModel.IContainer + + '注意: 以下為 Windows Form 設計工具所需的程序 + + '您可以使用 Windows Form 設計工具進行修改。 + + '請勿使用程式碼編輯器來修改這些程序。 + + Friend WithEvents pnlBin As System.Windows.Forms.Panel + Friend WithEvents LineFrame1 As iMESWizards.LineFrame + Friend WithEvents lblOrgBinState As System.Windows.Forms.Label + Friend WithEvents lblFinalBinState As System.Windows.Forms.Label + Friend WithEvents btnConfirm As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnClose As Infragistics.Win.Misc.UltraButton + Private Sub InitializeComponent() + Me.pnlBin = New System.Windows.Forms.Panel() + Me.lblFinalBinState = New System.Windows.Forms.Label() + Me.LineFrame1 = New iMESWizards.LineFrame() + Me.lblOrgBinState = New System.Windows.Forms.Label() + Me.btnConfirm = New Infragistics.Win.Misc.UltraButton() + Me.btnClose = New Infragistics.Win.Misc.UltraButton() + Me.lblOnlyAllowOrgBinSub = New System.Windows.Forms.Label() + Me.pnlBin.SuspendLayout() + Me.SuspendLayout() + ' + 'pnlBin + ' + Me.pnlBin.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.pnlBin.AutoScroll = True + Me.pnlBin.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D + Me.pnlBin.Controls.Add(Me.lblFinalBinState) + Me.pnlBin.Controls.Add(Me.LineFrame1) + Me.pnlBin.Controls.Add(Me.lblOrgBinState) + Me.pnlBin.Location = New System.Drawing.Point(16, 41) + Me.pnlBin.Name = "pnlBin" + Me.pnlBin.Size = New System.Drawing.Size(696, 128) + Me.pnlBin.TabIndex = 106 + ' + 'lblFinalBinState + ' + Me.lblFinalBinState.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblFinalBinState.Location = New System.Drawing.Point(16, 53) + Me.lblFinalBinState.Name = "lblFinalBinState" + Me.lblFinalBinState.Size = New System.Drawing.Size(80, 15) + Me.lblFinalBinState.TabIndex = 79 + Me.lblFinalBinState.Text = "FinalBinState" + Me.lblFinalBinState.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'LineFrame1 + ' + Me.LineFrame1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LineFrame1.Location = New System.Drawing.Point(0, 23) + Me.LineFrame1.Name = "LineFrame1" + Me.LineFrame1.Size = New System.Drawing.Size(692, 4) + Me.LineFrame1.TabIndex = 78 + Me.LineFrame1.Text = "LineFrame1" + ' + 'lblOrgBinState + ' + Me.lblOrgBinState.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOrgBinState.Location = New System.Drawing.Point(16, 30) + Me.lblOrgBinState.Name = "lblOrgBinState" + Me.lblOrgBinState.Size = New System.Drawing.Size(80, 15) + Me.lblOrgBinState.TabIndex = 76 + Me.lblOrgBinState.Text = "OrgBinState" + Me.lblOrgBinState.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'btnConfirm + ' + Me.btnConfirm.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnConfirm.Location = New System.Drawing.Point(544, 186) + Me.btnConfirm.Name = "btnConfirm" + Me.btnConfirm.Size = New System.Drawing.Size(80, 32) + Me.btnConfirm.TabIndex = 114 + Me.btnConfirm.Text = "Confirm" + ' + 'btnClose + ' + Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnClose.Location = New System.Drawing.Point(632, 186) + Me.btnClose.Name = "btnClose" + Me.btnClose.Size = New System.Drawing.Size(80, 32) + Me.btnClose.TabIndex = 113 + Me.btnClose.Text = "Close" + ' + 'lblOnlyAllowOrgBinSub + ' + Me.lblOnlyAllowOrgBinSub.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOnlyAllowOrgBinSub.ForeColor = System.Drawing.Color.Red + Me.lblOnlyAllowOrgBinSub.Location = New System.Drawing.Point(15, 9) + Me.lblOnlyAllowOrgBinSub.Name = "lblOnlyAllowOrgBinSub" + Me.lblOnlyAllowOrgBinSub.Size = New System.Drawing.Size(231, 29) + Me.lblOnlyAllowOrgBinSub.TabIndex = 115 + Me.lblOnlyAllowOrgBinSub.Text = "OrgBin sub Qty only" + Me.lblOnlyAllowOrgBinSub.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'frmBinStateAdjust + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14) + Me.ClientSize = New System.Drawing.Size(728, 228) + Me.ControlBox = False + Me.Controls.Add(Me.lblOnlyAllowOrgBinSub) + Me.Controls.Add(Me.btnConfirm) + Me.Controls.Add(Me.btnClose) + Me.Controls.Add(Me.pnlBin) + Me.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "frmBinStateAdjust" + Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "BinStateAdjust " + Me.pnlBin.ResumeLayout(False) + Me.ResumeLayout(False) + + End Sub + +#End Region + + Private Sub frmLotSplit_BinAssign_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load + + Cursor.Current = Cursors.WaitCursor + + If LotNo = defString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%LotNo%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + If dtGoodBin Is Nothing Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "GoodBin state"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + Call funCreateBin() + + Call ExeChangeResource(Me, gLanguageMode) '語系切換 + lblOnlyAllowOrgBinSub.ForeColor = Color.Red + '群組權限控管 + 'ExeGroupControlPriv(Me, PrivFunNo) + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub frmLotSplit_BinAssign_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated + + If Not txtBin_S Is Nothing Then txtBin_S(0).Focus() + + End Sub + + + '//Private Sub or Function------------------------------------------------------------------------------------------------- + Private Function funCreateBin() + + If dvSysBin Is Nothing Then Exit Function + dvSysBin.Sort = "BinOrder, BinNo" + intCount = dvSysBin.Count + + '重新宣告物件陣列 + ReDim lblBinNo(intCount - 1) + ReDim txtOBin(intCount - 1) + 'ReDim txtBin_R(intCount - 1) + ReDim txtBin_S(intCount - 1) + + Dim fFont As New Font("Times New Roman", 9) + Dim x, y As Long + + x = 0 + y = 0 + For i = 0 To intCount - 1 + 'BinNo + lblBinNo(i) = New Label + lblBinNo(i).Location = New System.Drawing.Point(104 + x, 6) + lblBinNo(i).Size = New System.Drawing.Size(40, 16) + lblBinNo(i).ForeColor = System.Drawing.Color.Blue + lblBinNo(i).Font = fFont + lblBinNo(i).Text = "Bin" & Mid(dvSysBin.Item(i)("BinNo"), 4) + lblBinNo(i).Tag = dvSysBin.Item(i)("BinNo") 'BinNo + lblBinNo(i).TextAlign = ContentAlignment.TopCenter + pnlBin.Controls.Add(lblBinNo(i)) + + 'GoodBin + txtOBin(i) = New TextBox + txtOBin(i).Location = New System.Drawing.Point(104 + x, 28) + txtOBin(i).Size = New System.Drawing.Size(40, 21) + txtOBin(i).Text = 0 + txtOBin(i).ReadOnly = True + txtOBin(i).TextAlign = HorizontalAlignment.Right + txtOBin(i).TabIndex = i + + pnlBin.Controls.Add(txtOBin(i)) + AddHandler txtOBin(i).KeyPress, AddressOf Me.txtValue_KeyPress + AddHandler txtOBin(i).Enter, AddressOf Me.txtValue_Enter + AddHandler txtOBin(i).TextChanged, AddressOf Me.txtValue_TextChanged + + '剩餘Bin + 'txtBin_R(i) = New TextBox + 'txtBin_R(i).Location = New System.Drawing.Point(104 + x, 50) + 'txtBin_R(i).Size = New System.Drawing.Size(40, 21) + 'txtBin_R(i).Text = 0 + 'txtBin_R(i).ReadOnly = True + 'txtBin_R(i).TextAlign = HorizontalAlignment.Right + 'txtBin_R(i).TabIndex = i + intCount + ' + 'pnlBin.Controls.Add(txtBin_R(i)) + 'AddHandler txtBin_R(i).KeyPress, AddressOf Me.txtValue_KeyPress + 'AddHandler txtBin_R(i).Enter, AddressOf Me.txtValue_Enter + 'AddHandler txtBin_R(i).TextChanged, AddressOf Me.txtValue_TextChanged + + 'SplitBin + txtBin_S(i) = New TextBox + txtBin_S(i).Location = New System.Drawing.Point(104 + x, 53) + txtBin_S(i).Size = New System.Drawing.Size(40, 21) + txtBin_S(i).Text = 0 + txtBin_S(i).TextAlign = HorizontalAlignment.Right + txtBin_S(i).TabIndex = i + (intCount * 2) + + pnlBin.Controls.Add(txtBin_S(i)) + AddHandler txtBin_S(i).KeyPress, AddressOf Me.txtValue_KeyPress + AddHandler txtBin_S(i).Enter, AddressOf Me.txtValue_Enter + AddHandler txtBin_S(i).TextChanged, AddressOf Me.txtValue_TextChanged + + x = x + 42 + Next + ReDim aryRBin(intCount - 1) + '將GoodBin資料放上 + If dtGoodBin.Rows.Count > 0 Then + For i = 0 To intCount - 1 + txtOBin(i).Text = dtGoodBin.Rows(0)(lblBinNo(i).Tag) + 'txtBin_R(i).Text = txtOBin(i).Text + aryRBin(i) = txtOBin(i).Text + + If (txtOBin(i).Text = "0") Then + txtBin_S(i).ReadOnly = True + End If + Next + End If + Dim bRE As Boolean = False + '顯示已Assign的BinValue + drSel = dtBinNew.Select("LotNo ='" & LotNo & "'") + If drSel.Length <> 0 Then + 'SplitBin + For i = 0 To intCount - 1 + If (txtBin_S(i).ReadOnly = True) Then + bRE = True + txtBin_S(i).ReadOnly = False + Else + bRE = False + End If + txtBin_S(i).Text = drSel(0)(lblBinNo(i).Tag) + + If (bRE = True) Then txtBin_S(i).ReadOnly = True + Next + End If + + '剩餘Bin + ' For i = 0 To dtBinNew.Rows.Count - 1 + ' If dtBinNew.Rows(i)("LotNo") <> LotNo Then + ' For j = 0 To intCount - 1 + ' If dtBinNew.Rows(i)(lblBinNo(j).Tag) <> 0 Then + ' aryRBin(j) = aryRBin(j) - CLng(dtBinNew.Rows(i)(lblBinNo(j).Tag)) + ' End If + ' Next + ' End If + ' Next + ' For i = 0 To intCount - 1 + ' txtBin_R(i).Text = aryRBin(i) + ' Next + + + + + End Function + + Private Sub txtValue_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) + sender.SelectAll() + End Sub + Private Sub txtValue_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + Private Sub txtValue_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) + 'btnSave.Enabled = False + End Sub + + Protected Overrides Sub Finalize() + MyBase.Finalize() + End Sub + + + Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click + gReturnKeyValue = "" + Me.Close() + End Sub + + + Private Sub btnConfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirm.Click + + Cursor.Current = Cursors.WaitCursor + + 'Check + For i = 0 To intCount - 1 + If Not IsNumeric(txtBin_S(i).Text) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", lblBinNo(i).Text & " [%MUST BE NUMERIC%]"), MsgBoxStyle.Exclamation, Me.Text) + txtBin_S(i).Focus() + Exit Sub + End If + + If (txtBin_S(i).ReadOnly = False) Then + If (CInt(txtBin_S(i).Text) < 0) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200017", lblBinNo(i).Text), MsgBoxStyle.Exclamation, Me.Text) + txtBin_S(i).Focus() + Exit Sub + End If + End If + + '輸入值不可大於剩餘Bin + If CLng(txtBin_S(i).Text) > CLng(txtOBin(i).Text) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200060", "[%FinalBin%]:" & lblBinNo(i).Text & " must less than total numbers of OrgBin:" & lblBinNo(i).Text), MsgBoxStyle.Exclamation, Me.Text) + txtBin_S(i).Focus() + Exit Sub + End If + Next i + + '加入SplitBin + drSel = dtBinNew.Select("LotNo = '" & LotNo & "'") + If drSel.Length = 0 Then 'Add + drAdd = dtBinNew.NewRow + drAdd("LotNo") = LotNo + For i = 0 To intCount - 1 + drAdd(lblBinNo(i).Tag) = txtBin_S(i).Text + Next + dtBinNew.Rows.Add(drAdd) + Else 'Update + drSel(0).BeginEdit() + For i = 0 To intCount - 1 + drSel(0)(lblBinNo(i).Tag) = txtBin_S(i).Text + Next + drSel(0).EndEdit() + End If + + + gReturnKeyValue = LotNo '做為判斷是否變更的Flag + + Cursor.Current = Cursors.Default + + Me.Close() + End Sub +End Class + diff --git a/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/iMES.snk b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/iMES.snk new file mode 100644 index 0000000..4206cdc Binary files /dev/null and b/SRC/MESWin/SXS1/BR_L_CO_GEN_21685/iMES.snk differ diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.sln b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.sln new file mode 100644 index 0000000..0446495 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.sln @@ -0,0 +1,42 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BR_L_CI_GEN", "BR_L_CI_GEN.vbproj", "{0FD97C44-56DD-44B2-AA3E-351935F5AC9C}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Test", "..\..\Test\Test.vbproj", "{C4A48E3F-38E4-4E88-A47D-FA5510686E57}" + ProjectSection(ProjectDependencies) = postProject + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C} = {0FD97C44-56DD-44B2-AA3E-351935F5AC9C} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C}.Debug|x86.ActiveCfg = Debug|x86 + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C}.Debug|x86.Build.0 = Debug|x86 + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C}.Release|x86.ActiveCfg = Release|x86 + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C}.Release|x86.Build.0 = Release|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Debug|x86.ActiveCfg = Debug|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Debug|x86.Build.0 = Debug|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Release|x86.ActiveCfg = Release|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(TeamFoundationVersionControl) = preSolution + SccNumberOfProjects = 3 + SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} + SccTeamFoundationServer = http://tfs.imestech.com:8080/tfs/messeries6 + SccLocalPath0 = . + SccProjectUniqueName1 = ..\\..\\Test\\Test.vbproj + SccProjectName1 = ../../Test + SccLocalPath1 = ..\\..\\Test + SccProjectUniqueName2 = BR_L_CI_GEN.vbproj + SccLocalPath2 = . + EndGlobalSection +EndGlobal diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.vbproj b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.vbproj new file mode 100644 index 0000000..1c39ef5 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.vbproj @@ -0,0 +1,273 @@ + + + + + Debug + x86 + {0FD97C44-56DD-44B2-AA3E-351935F5AC9C} + Library + BR_L_CI_GEN + BR_L_CI_GEN + 512 + Windows + v4.6.2 + + SAK + SAK + SAK + SAK + + + true + full + true + true + ..\..\..\MESClient\ + BR_L_CI_GEN.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 0 + false + + + pdbonly + false + true + true + bin\Release\ + BR_L_CI_GEN.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 0 + false + + + On + + + Binary + + + Off + + + On + + + true + true + true + ..\..\..\MESClient\ + BR_L_CI_GEN.xml + 0 + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + full + x86 + MinimumRecommendedRules.ruleset + false + + + true + ..\..\..\MESClient\ + BR_L_CI_GEN.xml + true + 0 + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + pdbonly + x86 + MinimumRecommendedRules.ruleset + false + + + true + + + iMES.snk + + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinTabControl.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinGrid.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinEditors.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.Misc.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Shared.v19.1.dll + False + + + False + ..\..\..\MESClient\COM_ERP.dll + False + + + ..\..\..\MESClient\COM_Kit.dll + False + + + False + ..\..\..\MESClient\COM_Search.dll + False + + + False + ..\..\..\MESClient\COM_Utility.dll + False + + + ..\..\..\MES_C_DLL\iMESException.dll + False + + + ..\..\..\MES_C_DLL\iMESExceptionManager.dll + False + + + ..\..\..\MES_C_DLL\iMESUltraGrid.dll + False + + + False + ..\..\..\MES_S_DLL\Newtonsoft.Json.dll + + + + + + + + + + + + False + ..\..\..\MESClient\WP_Kit.dll + False + + + + + + + + + + + + + + + + + + + + + + + modConstant.vb + + + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + True + True + Reference.map + + + + + frmBR_L_CI_GEN.vb + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + MSDiscoCodeGenerator + Reference.vb + + + + + + + + + + + + Dynamic + Web References\wsEAI\ + http://localhost/EAI/wsEAI.asmx + + + + + MySettings + BR_L_CI_GEN_localhost_wsEAI + + + + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.vbproj.vspscc b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.vbproj.vspscc new file mode 100644 index 0000000..b6d3289 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/BR_L_CI_GEN.vbproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Application.Designer.vb b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Application.Designer.vb new file mode 100644 index 0000000..4f9342a --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Application.myapp b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Application.myapp new file mode 100644 index 0000000..758895d --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/AssemblyInfo.vb b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..a9527e4 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' 組件的一般資訊是由下列的屬性集控制。 +' 變更這些屬性的值即可修改組件的相關 +' 資訊。 + +' 檢閱組件屬性的值 + + + + + + + + + + +'下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID + + +' 組件的版本資訊由下列四個值所組成: +' +' 主要版本 +' 次要版本 +' 組建編號 +' 修訂編號 +' +' 您可以指定所有的值,也可以依照以下的方式,使用 '*' 將組建和修訂編號 +' 指定為預設值: +' + + + diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/BuildIncrementVersionInfo.vb b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/BuildIncrementVersionInfo.vb new file mode 100644 index 0000000..5b9b9b2 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/BuildIncrementVersionInfo.vb @@ -0,0 +1 @@ + diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Resources.Designer.vb b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Resources.Designer.vb new file mode 100644 index 0000000..9d3d2ae --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + '這個類別是自動產生的,是利用 StronglyTypedResourceBuilder + '類別透過 ResGen 或 Visual Studio 這類工具。 + '若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen + '(利用 /str 選項),或重建您的 VS 專案。 + ''' + ''' 用於查詢當地語系化字串等的強類型資源類別。 + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' 傳回這個類別使用的快取的 ResourceManager 執行個體。 + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BR_L_CI_GEN.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有 + ''' 使用這個強類型資源類別的資源查閱。 + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Resources.resx b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Settings.Designer.vb b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Settings.Designer.vb new file mode 100644 index 0000000..3c750b7 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Settings.Designer.vb @@ -0,0 +1,83 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings 自動儲存功能" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + + _ + Public ReadOnly Property BR_L_CI_GEN_localhost_wsEAI() As String + Get + Return CType(Me("BR_L_CI_GEN_localhost_wsEAI"),String) + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.BR_L_CI_GEN.My.MySettings + Get + Return Global.BR_L_CI_GEN.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Settings.settings b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Settings.settings new file mode 100644 index 0000000..dfc3b51 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/Settings.settings @@ -0,0 +1,9 @@ + + + + + + http://localhost/EAI/wsEAI.asmx + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/licenses.licx b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/licenses.licx new file mode 100644 index 0000000..44a7b2e --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/My Project/licenses.licx @@ -0,0 +1,6 @@ +Infragistics.Win.UltraWinEditors.UltraTextEditor, Infragistics4.Win.UltraWinEditors.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraSplitter, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraButton, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraPanel, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraExpandableGroupBox, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.UltraWinTabControl.UltraTabControl, Infragistics4.Win.UltraWinTabControl.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/Reference.map b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/Reference.map new file mode 100644 index 0000000..3b10ad2 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/Reference.map @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/Reference.vb b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/Reference.vb new file mode 100644 index 0000000..855cb6d --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/Reference.vb @@ -0,0 +1,503 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict Off +Option Explicit On + +Imports System +Imports System.ComponentModel +Imports System.Diagnostics +Imports System.Web.Services +Imports System.Web.Services.Protocols +Imports System.Xml.Serialization + +' +'原始程式碼已由 Microsoft.VSDesigner 自動產生,版本 4.0.30319.42000。 +' +Namespace wsEAI + + ''' + _ + Partial Public Class wsEAI + Inherits System.Web.Services.Protocols.SoapHttpClientProtocol + + Private InvokeSrv_metajsonOperationCompleted As System.Threading.SendOrPostCallback + + Private InvokeSrv_jsonOperationCompleted As System.Threading.SendOrPostCallback + + Private invokeSrvOperationCompleted As System.Threading.SendOrPostCallback + + Private invokeSrv_ResolvedXMLOperationCompleted As System.Threading.SendOrPostCallback + + Private callbackSrvOperationCompleted As System.Threading.SendOrPostCallback + + Private syncProdOperationCompleted As System.Threading.SendOrPostCallback + + Private GeteSOPInfo_APIOperationCompleted As System.Threading.SendOrPostCallback + + Private useDefaultCredentialsSetExplicitly As Boolean + + ''' + Public Sub New() + MyBase.New + Me.Url = Global.BR_L_CI_GEN.My.MySettings.Default.BR_L_CI_GEN_localhost_wsEAI + If (Me.IsLocalFileSystemWebService(Me.Url) = true) Then + Me.UseDefaultCredentials = true + Me.useDefaultCredentialsSetExplicitly = false + Else + Me.useDefaultCredentialsSetExplicitly = true + End If + End Sub + + Public Shadows Property Url() As String + Get + Return MyBase.Url + End Get + Set + If (((Me.IsLocalFileSystemWebService(MyBase.Url) = true) _ + AndAlso (Me.useDefaultCredentialsSetExplicitly = false)) _ + AndAlso (Me.IsLocalFileSystemWebService(value) = false)) Then + MyBase.UseDefaultCredentials = false + End If + MyBase.Url = value + End Set + End Property + + Public Shadows Property UseDefaultCredentials() As Boolean + Get + Return MyBase.UseDefaultCredentials + End Get + Set + MyBase.UseDefaultCredentials = value + Me.useDefaultCredentialsSetExplicitly = true + End Set + End Property + + ''' + Public Event InvokeSrv_metajsonCompleted As InvokeSrv_metajsonCompletedEventHandler + + ''' + Public Event InvokeSrv_jsonCompleted As InvokeSrv_jsonCompletedEventHandler + + ''' + Public Event invokeSrvCompleted As invokeSrvCompletedEventHandler + + ''' + Public Event invokeSrv_ResolvedXMLCompleted As invokeSrv_ResolvedXMLCompletedEventHandler + + ''' + Public Event callbackSrvCompleted As callbackSrvCompletedEventHandler + + ''' + Public Event syncProdCompleted As syncProdCompletedEventHandler + + ''' + Public Event GeteSOPInfo_APICompleted As GeteSOPInfo_APICompletedEventHandler + + ''' + _ + Public Function InvokeSrv_metajson(ByVal metadata As String, ByVal content As String) As String + Dim results() As Object = Me.Invoke("InvokeSrv_metajson", New Object() {metadata, content}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub InvokeSrv_metajsonAsync(ByVal metadata As String, ByVal content As String) + Me.InvokeSrv_metajsonAsync(metadata, content, Nothing) + End Sub + + ''' + Public Overloads Sub InvokeSrv_metajsonAsync(ByVal metadata As String, ByVal content As String, ByVal userState As Object) + If (Me.InvokeSrv_metajsonOperationCompleted Is Nothing) Then + Me.InvokeSrv_metajsonOperationCompleted = AddressOf Me.OnInvokeSrv_metajsonOperationCompleted + End If + Me.InvokeAsync("InvokeSrv_metajson", New Object() {metadata, content}, Me.InvokeSrv_metajsonOperationCompleted, userState) + End Sub + + Private Sub OnInvokeSrv_metajsonOperationCompleted(ByVal arg As Object) + If (Not (Me.InvokeSrv_metajsonCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent InvokeSrv_metajsonCompleted(Me, New InvokeSrv_metajsonCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function InvokeSrv_json(ByVal uri As String, ByVal content As String) As String + Dim results() As Object = Me.Invoke("InvokeSrv_json", New Object() {uri, content}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub InvokeSrv_jsonAsync(ByVal uri As String, ByVal content As String) + Me.InvokeSrv_jsonAsync(uri, content, Nothing) + End Sub + + ''' + Public Overloads Sub InvokeSrv_jsonAsync(ByVal uri As String, ByVal content As String, ByVal userState As Object) + If (Me.InvokeSrv_jsonOperationCompleted Is Nothing) Then + Me.InvokeSrv_jsonOperationCompleted = AddressOf Me.OnInvokeSrv_jsonOperationCompleted + End If + Me.InvokeAsync("InvokeSrv_json", New Object() {uri, content}, Me.InvokeSrv_jsonOperationCompleted, userState) + End Sub + + Private Sub OnInvokeSrv_jsonOperationCompleted(ByVal arg As Object) + If (Not (Me.InvokeSrv_jsonCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent InvokeSrv_jsonCompleted(Me, New InvokeSrv_jsonCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function invokeSrv(ByVal InXml As String) As String + Dim results() As Object = Me.Invoke("invokeSrv", New Object() {InXml}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub invokeSrvAsync(ByVal InXml As String) + Me.invokeSrvAsync(InXml, Nothing) + End Sub + + ''' + Public Overloads Sub invokeSrvAsync(ByVal InXml As String, ByVal userState As Object) + If (Me.invokeSrvOperationCompleted Is Nothing) Then + Me.invokeSrvOperationCompleted = AddressOf Me.OninvokeSrvOperationCompleted + End If + Me.InvokeAsync("invokeSrv", New Object() {InXml}, Me.invokeSrvOperationCompleted, userState) + End Sub + + Private Sub OninvokeSrvOperationCompleted(ByVal arg As Object) + If (Not (Me.invokeSrvCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent invokeSrvCompleted(Me, New invokeSrvCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function invokeSrv_ResolvedXML(ByVal MethodName As String, ByVal InXml As String) As String + Dim results() As Object = Me.Invoke("invokeSrv_ResolvedXML", New Object() {MethodName, InXml}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub invokeSrv_ResolvedXMLAsync(ByVal MethodName As String, ByVal InXml As String) + Me.invokeSrv_ResolvedXMLAsync(MethodName, InXml, Nothing) + End Sub + + ''' + Public Overloads Sub invokeSrv_ResolvedXMLAsync(ByVal MethodName As String, ByVal InXml As String, ByVal userState As Object) + If (Me.invokeSrv_ResolvedXMLOperationCompleted Is Nothing) Then + Me.invokeSrv_ResolvedXMLOperationCompleted = AddressOf Me.OninvokeSrv_ResolvedXMLOperationCompleted + End If + Me.InvokeAsync("invokeSrv_ResolvedXML", New Object() {MethodName, InXml}, Me.invokeSrv_ResolvedXMLOperationCompleted, userState) + End Sub + + Private Sub OninvokeSrv_ResolvedXMLOperationCompleted(ByVal arg As Object) + If (Not (Me.invokeSrv_ResolvedXMLCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent invokeSrv_ResolvedXMLCompleted(Me, New invokeSrv_ResolvedXMLCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function callbackSrv(ByVal InXml As String) As String + Dim results() As Object = Me.Invoke("callbackSrv", New Object() {InXml}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub callbackSrvAsync(ByVal InXml As String) + Me.callbackSrvAsync(InXml, Nothing) + End Sub + + ''' + Public Overloads Sub callbackSrvAsync(ByVal InXml As String, ByVal userState As Object) + If (Me.callbackSrvOperationCompleted Is Nothing) Then + Me.callbackSrvOperationCompleted = AddressOf Me.OncallbackSrvOperationCompleted + End If + Me.InvokeAsync("callbackSrv", New Object() {InXml}, Me.callbackSrvOperationCompleted, userState) + End Sub + + Private Sub OncallbackSrvOperationCompleted(ByVal arg As Object) + If (Not (Me.callbackSrvCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent callbackSrvCompleted(Me, New callbackSrvCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function syncProd(ByVal InXml As String) As String + Dim results() As Object = Me.Invoke("syncProd", New Object() {InXml}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub syncProdAsync(ByVal InXml As String) + Me.syncProdAsync(InXml, Nothing) + End Sub + + ''' + Public Overloads Sub syncProdAsync(ByVal InXml As String, ByVal userState As Object) + If (Me.syncProdOperationCompleted Is Nothing) Then + Me.syncProdOperationCompleted = AddressOf Me.OnsyncProdOperationCompleted + End If + Me.InvokeAsync("syncProd", New Object() {InXml}, Me.syncProdOperationCompleted, userState) + End Sub + + Private Sub OnsyncProdOperationCompleted(ByVal arg As Object) + If (Not (Me.syncProdCompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent syncProdCompleted(Me, New syncProdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + _ + Public Function GeteSOPInfo_API(ByVal uri As String, ByVal content As String) As String + Dim results() As Object = Me.Invoke("GeteSOPInfo_API", New Object() {uri, content}) + Return CType(results(0),String) + End Function + + ''' + Public Overloads Sub GeteSOPInfo_APIAsync(ByVal uri As String, ByVal content As String) + Me.GeteSOPInfo_APIAsync(uri, content, Nothing) + End Sub + + ''' + Public Overloads Sub GeteSOPInfo_APIAsync(ByVal uri As String, ByVal content As String, ByVal userState As Object) + If (Me.GeteSOPInfo_APIOperationCompleted Is Nothing) Then + Me.GeteSOPInfo_APIOperationCompleted = AddressOf Me.OnGeteSOPInfo_APIOperationCompleted + End If + Me.InvokeAsync("GeteSOPInfo_API", New Object() {uri, content}, Me.GeteSOPInfo_APIOperationCompleted, userState) + End Sub + + Private Sub OnGeteSOPInfo_APIOperationCompleted(ByVal arg As Object) + If (Not (Me.GeteSOPInfo_APICompletedEvent) Is Nothing) Then + Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) + RaiseEvent GeteSOPInfo_APICompleted(Me, New GeteSOPInfo_APICompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) + End If + End Sub + + ''' + Public Shadows Sub CancelAsync(ByVal userState As Object) + MyBase.CancelAsync(userState) + End Sub + + Private Function IsLocalFileSystemWebService(ByVal url As String) As Boolean + If ((url Is Nothing) _ + OrElse (url Is String.Empty)) Then + Return false + End If + Dim wsUri As System.Uri = New System.Uri(url) + If ((wsUri.Port >= 1024) _ + AndAlso (String.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) = 0)) Then + Return true + End If + Return false + End Function + End Class + + ''' + _ + Public Delegate Sub InvokeSrv_metajsonCompletedEventHandler(ByVal sender As Object, ByVal e As InvokeSrv_metajsonCompletedEventArgs) + + ''' + _ + Partial Public Class InvokeSrv_metajsonCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub InvokeSrv_jsonCompletedEventHandler(ByVal sender As Object, ByVal e As InvokeSrv_jsonCompletedEventArgs) + + ''' + _ + Partial Public Class InvokeSrv_jsonCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub invokeSrvCompletedEventHandler(ByVal sender As Object, ByVal e As invokeSrvCompletedEventArgs) + + ''' + _ + Partial Public Class invokeSrvCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub invokeSrv_ResolvedXMLCompletedEventHandler(ByVal sender As Object, ByVal e As invokeSrv_ResolvedXMLCompletedEventArgs) + + ''' + _ + Partial Public Class invokeSrv_ResolvedXMLCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub callbackSrvCompletedEventHandler(ByVal sender As Object, ByVal e As callbackSrvCompletedEventArgs) + + ''' + _ + Partial Public Class callbackSrvCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub syncProdCompletedEventHandler(ByVal sender As Object, ByVal e As syncProdCompletedEventArgs) + + ''' + _ + Partial Public Class syncProdCompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class + + ''' + _ + Public Delegate Sub GeteSOPInfo_APICompletedEventHandler(ByVal sender As Object, ByVal e As GeteSOPInfo_APICompletedEventArgs) + + ''' + _ + Partial Public Class GeteSOPInfo_APICompletedEventArgs + Inherits System.ComponentModel.AsyncCompletedEventArgs + + Private results() As Object + + Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) + MyBase.New(exception, cancelled, userState) + Me.results = results + End Sub + + ''' + Public ReadOnly Property Result() As String + Get + Me.RaiseExceptionIfNecessary + Return CType(Me.results(0),String) + End Get + End Property + End Class +End Namespace diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/wsEAI.disco b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/wsEAI.disco new file mode 100644 index 0000000..09ebff9 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/wsEAI.disco @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/wsEAI.wsdl b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/wsEAI.wsdl new file mode 100644 index 0000000..74d084d --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/Web References/wsEAI/wsEAI.wsdl @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invoke Web Service Resolved metadata json + + + + + Invoke Web Service Resolved json + + + + + Invoke Web Service + + + + + Invoke Web Service for Resolved XML + + + + + Callback Service + + + + + sync Product + + + + + GeteSOPInfo_API + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/app.config b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/app.config new file mode 100644 index 0000000..c63a97d --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/app.config @@ -0,0 +1,37 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + http://localhost/EAI/wsEAI.asmx + + + + diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/frmBR_L_CI_GEN.resx b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/frmBR_L_CI_GEN.resx new file mode 100644 index 0000000..f9f5d49 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/frmBR_L_CI_GEN.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 28, 11 + + + 131, 11 + + + 25 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/frmBR_L_CI_GEN.vb b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/frmBR_L_CI_GEN.vb new file mode 100644 index 0000000..b11b1e5 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/frmBR_L_CI_GEN.vb @@ -0,0 +1,6821 @@ +Imports iMESExceptionManager +Imports Infragistics.Win.UltraWinGrid +Imports Infragistics.Win +Imports System.IO +Imports Newtonsoft.Json +Imports Newtonsoft.Json.Linq +Imports COM_ERP + +''' +''' 修改:2012/06/15,sammi.新增多人加工處理. +''' 2016/12/26 YF, 增加新制多人加工(btnOperator), 先將舊有的多人加工隱藏(btnMultiUser) +''' +Public Class frmBR_L_CI_GEN + Inherits System.Windows.Forms.Form + + '//Public Variables + Public LotNo As String = defString + Public UserId As String = defString + Public UserName As String = defString + + Public EquipmentNo As String = defString + Public LoadPort As Integer = defInteger + Public PrivFunNo As String = defString + + '//Web Service相關變數 + Dim tmpStringReader As System.IO.StringReader + Dim InXml, OutXml, strIdentity, strParameter, XmlData, XmlSchema As String + + '//資料表相關變數 + Dim dsWIP, dsTemp, dsINV, dsEQP As New DataSet + Dim dtKeyIn, dtTmpLoginState, dtTmpMTLLotNo As DataTable + Dim drAdd As DataRow + Dim tblLotState, tblTAttrib, tblTMaterial, tblAreaEquipment, tblLotLoginState, tblMaterialLotNo, + tblTmpMTLLotNo, tblMOMaterialState, tblWIPINVRaw, tblSubstituteMaterial, tblSWRJoinLog, + tblMaterialBasis, tblTLotState, tblMaterialProperty, tblOPBasis, tblEQPDispatchState, tblWIPINVSEMI As String + '2016-12-19 系統參數資料表 + Dim dsDefine As New DataSet + Dim tblSYSParam As String = "" + Dim Execute_eSOP As Integer = 0 '2016-12-14, 是否啟用eSOP(0:false,1:true) + + '//其他共用變數 + Dim RevLotSerial As String = defString + Dim LotSerial As String = defString + Dim LogGroupSerial As String = defString + Dim RevLotStamp As Long = defInteger + Dim PhaseNo As Integer + Dim datEventTime As DateTime = Now + Dim ugrRow As Infragistics.Win.UltraWinGrid.UltraGridRow + Dim blnGetAccessory As Boolean = True + Dim drSelE As DataRow() + Dim blnChamber As Boolean = False + '2019/02/12 Eric 特殊生產需求是否有資料 + Dim blnShowSWR As Boolean = False + + '20091006 Seam 新增作業工序 + Dim tblSubOP As String + + '20240118 yaozp 实习生练习表和dataset + Dim tblKzTable As String + Dim dsKz As New DataSet + + '2010/03/08,yumei,iugKeyIn區塊新增清單選擇 + Dim strDefaultValue As String + Dim editor As Infragistics.Win.DateTimeEditor + + ' 2016/08/30 YF, ObjectFile物件 + Dim ObjectFileHandler As COM_Utility.ObjectFileHandler + '2016-12-20 XIANG + Dim tblPRDeSOPBasis As String = "" + Friend WithEvents chkUpdCheckInTime As CheckBox + Friend WithEvents btnSWR As Infragistics.Win.Misc.UltraButton + '傳給eSOP,紀錄資料數(ROW欄位) + Dim intRow As Integer = 1 + Dim blnGumMaterialType As Boolean = False + Dim aryGumMaterialType As Array + Dim dtAllMTLLot As DataTable '所有可用料批資料 + Dim tblTMaterialLot As String + Friend WithEvents lblMaterialNo As Label + Friend WithEvents txtMaterialNo As UltraWinEditors.UltraTextEditor + Dim blnSelect As Boolean = False + Dim blnByEQP As Boolean = False + Dim blnCIMTLDBCheck As Boolean = False + Dim blnLock As Boolean = False + + Dim ACCMin As Decimal = defInteger + Dim ACCMax As Decimal = defInteger + Dim ReFrozenFlag As Integer = defInteger + Dim ReACCMin As Decimal = defInteger + Dim ReACCMax As Decimal = defInteger + Dim strTableName, strRaw As String + + Dim vlMaterialLevel As New ValueList + + '20240119 21681 + Dim vlKzTable As New ValueList + + Dim ckhEQPDispatchRule As String + + ''新设备上料 14278 + Dim dsOE As New DataSet '資料集:儲存取回之資料? + Friend WithEvents UltraTabPageControl3 As UltraWinTabControl.UltraTabPageControl + Friend WithEvents Label1 As Label + Friend WithEvents UltraTextEditor1 As UltraWinEditors.UltraTextEditor + Friend WithEvents Label2 As Label + Friend WithEvents UltraTextEditor2 As UltraWinEditors.UltraTextEditor + Friend WithEvents IMESUltraGridControl1 As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents UltraTabSharedControlsPage2 As UltraWinTabControl.UltraTabSharedControlsPage + Friend WithEvents UltraTabControl2 As UltraWinTabControl.UltraTabControl + Friend WithEvents utpKzxx As UltraWinTabControl.UltraTabPageControl + Friend WithEvents WsEAI1 As wsEAI.wsEAI + Friend WithEvents iugSubOP As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugKzxx As iMESUltraGrid.iMESUltraGridControl + Dim strMOList As String '儲存取回資料表的名稱? +#Region " Windows Form 設計工具產生的程式碼 " + + Public Sub New() + MyBase.New() + + '此呼叫為 Windows Form 設計工具的必要項。 + + InitializeComponent() + + '在 InitializeComponent() 呼叫之後加入所有的初始設定 + ' 2016/08/30 YF, 開另一條執行緒建立會使用到的物件 + Threading.ThreadPool.QueueUserWorkItem(New Threading.WaitCallback( + Sub(pState As Object) + ' 呼叫COM_Utility.ObjectFileHandler建構子, 傳入要載入的ObjectID + Me.ObjectFileHandler = New COM_Utility.ObjectFileHandler("WP_OperatorLogIn_Lot", "WP_EQPConsumeReset", "WP_EQPCheckQCList", "WP_SWRBasisRead", "WP_MaterialQtyInput_Main") + End Sub)) + + End Sub + + 'Form 覆寫 Dispose 以清除元件清單。 + + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing Then + If Not (components Is Nothing) Then + components.Dispose() + End If + End If + MyBase.Dispose(disposing) + End Sub + + '為 Windows Form 設計工具的必要項 + Private components As System.ComponentModel.IContainer + + '注意: 以下為 Windows Form 設計工具所需的程序 + + '您可以使用 Windows Form 設計工具進行修改。 + + '請勿使用程式碼編輯器來修改這些程序。 + Friend WithEvents UltraTabPageControl1 As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents UltraTabPageControl2 As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip + Friend WithEvents UltraTabControl1 As Infragistics.Win.UltraWinTabControl.UltraTabControl + Friend WithEvents UltraTabSharedControlsPage1 As Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage + Friend WithEvents utpMaterial As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents utpSubOP As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents utpEquipment As Infragistics.Win.UltraWinTabControl.UltraTabPageControl + Friend WithEvents IMESUltraGrid3 As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents SBar1 As System.Windows.Forms.StatusBar + Friend WithEvents SBarPanel1 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel4 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel2 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel3 As System.Windows.Forms.StatusBarPanel + Friend WithEvents lblOPNo As System.Windows.Forms.Label + Friend WithEvents lblLotNo As System.Windows.Forms.Label + Friend WithEvents lblSysQty As System.Windows.Forms.Label + Friend WithEvents lblCurQty As System.Windows.Forms.Label + Friend WithEvents lblEmployeeNo As System.Windows.Forms.Label + Friend WithEvents lblShiftNo As System.Windows.Forms.Label + Friend WithEvents lblCustomerLotNo As System.Windows.Forms.Label + Friend WithEvents lblPriority As System.Windows.Forms.Label + Friend WithEvents txtOPNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCurQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCurUnitNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtSysQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtSysUnitNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtPriority As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtAreaNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtEmployeeNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtShiftNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCustomerLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents iugAttrib As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugMaterial As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugEquipment As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents btnClose As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnConfirm As Infragistics.Win.Misc.UltraButton + Friend WithEvents lblEquipmentNo As System.Windows.Forms.Label + Friend WithEvents txtEquipmentNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents iugKeyIn As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents lblProductNo As System.Windows.Forms.Label + Friend WithEvents txtProductNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblAreaNo As System.Windows.Forms.Label + Friend WithEvents txtOPDescription As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblOPDescription As System.Windows.Forms.Label + Friend WithEvents lblLotRecord As System.Windows.Forms.Label + Friend WithEvents txtLotRecord As System.Windows.Forms.RichTextBox + Friend WithEvents txtMONo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblMONo As System.Windows.Forms.Label + Friend WithEvents gbxLotInfo As System.Windows.Forms.GroupBox + Friend WithEvents lblupdcheckintime As System.Windows.Forms.Label + Friend WithEvents dtpcheckintime As System.Windows.Forms.DateTimePicker + Friend WithEvents btnQCList As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnEQPConsumeReset As Infragistics.Win.Misc.UltraButton + Friend WithEvents txtOpName As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents btnMultiUser As Infragistics.Win.Misc.UltraButton + Friend WithEvents lblMaterialLotNo As System.Windows.Forms.Label + Friend WithEvents btnOperator As Misc.UltraButton + Friend WithEvents txtMaterialLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + + Friend WithEvents uegLotInfo As Misc.UltraExpandableGroupBox + Friend WithEvents uplEquipment As Misc.UltraPanel + Friend WithEvents uplAttrib As Misc.UltraPanel + Friend WithEvents UltraExpandableGroupBoxPanel1 As Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel1 As Misc.UltraPanel + Friend WithEvents uplAttrib_Equipment As Misc.UltraPanel + Friend WithEvents UltraSplitter1 As Misc.UltraSplitter + Friend WithEvents uplMaterial_KeyIn As Misc.UltraPanel + Friend WithEvents UltraSplitter2 As Misc.UltraSplitter + Friend WithEvents uplMaterial As Misc.UltraPanel + Friend WithEvents uplKeyIn As Misc.UltraPanel + Friend WithEvents uplAll As Misc.UltraPanel + Friend WithEvents uegMaterial_KeyIn2 As Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel4 As Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel4 As Misc.UltraPanel + Friend WithEvents uegAttrib_Equipment As Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel2 As Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel2 As Misc.UltraPanel + + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Dim UltraTab2 As Infragistics.Win.UltraWinTabControl.UltraTab = New Infragistics.Win.UltraWinTabControl.UltraTab() + Dim UltraTab3 As Infragistics.Win.UltraWinTabControl.UltraTab = New Infragistics.Win.UltraWinTabControl.UltraTab() + Dim UltraTab5 As Infragistics.Win.UltraWinTabControl.UltraTab = New Infragistics.Win.UltraWinTabControl.UltraTab() + Me.utpMaterial = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.lblMaterialNo = New System.Windows.Forms.Label() + Me.txtMaterialNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblMaterialLotNo = New System.Windows.Forms.Label() + Me.txtMaterialLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.iugMaterial = New iMESUltraGrid.iMESUltraGridControl() + Me.utpSubOP = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.iugSubOP = New iMESUltraGrid.iMESUltraGridControl() + Me.utpKzxx = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.iugKzxx = New iMESUltraGrid.iMESUltraGridControl() + Me.uegLotInfo = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel1 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel1 = New Infragistics.Win.Misc.UltraPanel() + Me.gbxLotInfo = New System.Windows.Forms.GroupBox() + Me.txtOpName = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtOPNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtProductNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCustomerLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtMONo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtShiftNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtEmployeeNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtAreaNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtPriority = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtSysUnitNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtSysQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCurUnitNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCurQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtOPDescription = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblPriority = New System.Windows.Forms.Label() + Me.lblMONo = New System.Windows.Forms.Label() + Me.lblShiftNo = New System.Windows.Forms.Label() + Me.lblOPNo = New System.Windows.Forms.Label() + Me.lblAreaNo = New System.Windows.Forms.Label() + Me.lblSysQty = New System.Windows.Forms.Label() + Me.lblCurQty = New System.Windows.Forms.Label() + Me.lblProductNo = New System.Windows.Forms.Label() + Me.lblOPDescription = New System.Windows.Forms.Label() + Me.lblCustomerLotNo = New System.Windows.Forms.Label() + Me.lblEmployeeNo = New System.Windows.Forms.Label() + Me.lblLotNo = New System.Windows.Forms.Label() + Me.UltraTabPageControl2 = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.UltraTabPageControl1 = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.SBar1 = New System.Windows.Forms.StatusBar() + Me.SBarPanel1 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel2 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel3 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel4 = New System.Windows.Forms.StatusBarPanel() + Me.iugAttrib = New iMESUltraGrid.iMESUltraGridControl() + Me.iugEquipment = New iMESUltraGrid.iMESUltraGridControl() + Me.btnClose = New Infragistics.Win.Misc.UltraButton() + Me.btnConfirm = New Infragistics.Win.Misc.UltraButton() + Me.lblEquipmentNo = New System.Windows.Forms.Label() + Me.txtEquipmentNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblLotRecord = New System.Windows.Forms.Label() + Me.txtLotRecord = New System.Windows.Forms.RichTextBox() + Me.lblupdcheckintime = New System.Windows.Forms.Label() + Me.dtpcheckintime = New System.Windows.Forms.DateTimePicker() + Me.btnEQPConsumeReset = New Infragistics.Win.Misc.UltraButton() + Me.btnQCList = New Infragistics.Win.Misc.UltraButton() + Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) + Me.utpEquipment = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.IMESUltraGrid3 = New iMESUltraGrid.iMESUltraGridControl() + Me.btnMultiUser = New Infragistics.Win.Misc.UltraButton() + Me.btnOperator = New Infragistics.Win.Misc.UltraButton() + Me.chkUpdCheckInTime = New System.Windows.Forms.CheckBox() + Me.btnSWR = New Infragistics.Win.Misc.UltraButton() + Me.uplAttrib = New Infragistics.Win.Misc.UltraPanel() + Me.uplEquipment = New Infragistics.Win.Misc.UltraPanel() + Me.uplAttrib_Equipment = New Infragistics.Win.Misc.UltraPanel() + Me.UltraSplitter1 = New Infragistics.Win.Misc.UltraSplitter() + Me.uplMaterial_KeyIn = New Infragistics.Win.Misc.UltraPanel() + Me.uplKeyIn = New Infragistics.Win.Misc.UltraPanel() + Me.iugKeyIn = New iMESUltraGrid.iMESUltraGridControl() + Me.UltraSplitter2 = New Infragistics.Win.Misc.UltraSplitter() + Me.uplMaterial = New Infragistics.Win.Misc.UltraPanel() + Me.UltraTabControl1 = New Infragistics.Win.UltraWinTabControl.UltraTabControl() + Me.UltraTabSharedControlsPage1 = New Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage() + Me.uplAll = New Infragistics.Win.Misc.UltraPanel() + Me.uegMaterial_KeyIn2 = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel4 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel4 = New Infragistics.Win.Misc.UltraPanel() + Me.uegAttrib_Equipment = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel2 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel2 = New Infragistics.Win.Misc.UltraPanel() + Me.UltraTabPageControl3 = New Infragistics.Win.UltraWinTabControl.UltraTabPageControl() + Me.Label1 = New System.Windows.Forms.Label() + Me.UltraTextEditor1 = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.Label2 = New System.Windows.Forms.Label() + Me.UltraTextEditor2 = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.IMESUltraGridControl1 = New iMESUltraGrid.iMESUltraGridControl() + Me.UltraTabSharedControlsPage2 = New Infragistics.Win.UltraWinTabControl.UltraTabSharedControlsPage() + Me.UltraTabControl2 = New Infragistics.Win.UltraWinTabControl.UltraTabControl() + Me.WsEAI1 = New BR_L_CI_GEN.wsEAI.wsEAI() + Me.utpMaterial.SuspendLayout() + CType(Me.txtMaterialNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtMaterialLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.utpSubOP.SuspendLayout() + Me.utpKzxx.SuspendLayout() + CType(Me.uegLotInfo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegLotInfo.SuspendLayout() + Me.UltraExpandableGroupBoxPanel1.SuspendLayout() + Me.UltraPanel1.ClientArea.SuspendLayout() + Me.UltraPanel1.SuspendLayout() + Me.gbxLotInfo.SuspendLayout() + CType(Me.txtOpName, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtOPNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtProductNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCustomerLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtMONo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtShiftNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtEmployeeNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtAreaNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtPriority, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSysUnitNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSysQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCurUnitNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCurQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtOPDescription, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel3, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel4, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtEquipmentNo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.utpEquipment.SuspendLayout() + Me.uplAttrib.ClientArea.SuspendLayout() + Me.uplAttrib.SuspendLayout() + Me.uplEquipment.ClientArea.SuspendLayout() + Me.uplEquipment.SuspendLayout() + Me.uplAttrib_Equipment.ClientArea.SuspendLayout() + Me.uplAttrib_Equipment.SuspendLayout() + Me.uplMaterial_KeyIn.ClientArea.SuspendLayout() + Me.uplMaterial_KeyIn.SuspendLayout() + Me.uplKeyIn.ClientArea.SuspendLayout() + Me.uplKeyIn.SuspendLayout() + Me.uplMaterial.ClientArea.SuspendLayout() + Me.uplMaterial.SuspendLayout() + CType(Me.UltraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.UltraTabControl1.SuspendLayout() + Me.uplAll.ClientArea.SuspendLayout() + Me.uplAll.SuspendLayout() + CType(Me.uegMaterial_KeyIn2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegMaterial_KeyIn2.SuspendLayout() + Me.UltraExpandableGroupBoxPanel4.SuspendLayout() + Me.UltraPanel4.ClientArea.SuspendLayout() + Me.UltraPanel4.SuspendLayout() + CType(Me.uegAttrib_Equipment, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegAttrib_Equipment.SuspendLayout() + Me.UltraExpandableGroupBoxPanel2.SuspendLayout() + Me.UltraPanel2.ClientArea.SuspendLayout() + Me.UltraPanel2.SuspendLayout() + Me.UltraTabPageControl3.SuspendLayout() + CType(Me.UltraTextEditor1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.UltraTextEditor2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.UltraTabControl2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.UltraTabControl2.SuspendLayout() + Me.SuspendLayout() + ' + 'utpMaterial + ' + Me.utpMaterial.Controls.Add(Me.lblMaterialNo) + Me.utpMaterial.Controls.Add(Me.txtMaterialNo) + Me.utpMaterial.Controls.Add(Me.lblMaterialLotNo) + Me.utpMaterial.Controls.Add(Me.txtMaterialLotNo) + Me.utpMaterial.Controls.Add(Me.iugMaterial) + Me.utpMaterial.Location = New System.Drawing.Point(-10000, -10000) + Me.utpMaterial.Name = "utpMaterial" + Me.utpMaterial.Size = New System.Drawing.Size(511, 187) + ' + 'lblMaterialNo + ' + Me.lblMaterialNo.BackColor = System.Drawing.Color.Transparent + Me.lblMaterialNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMaterialNo.Location = New System.Drawing.Point(7, 11) + Me.lblMaterialNo.Name = "lblMaterialNo" + Me.lblMaterialNo.Size = New System.Drawing.Size(90, 16) + Me.lblMaterialNo.TabIndex = 159 + Me.lblMaterialNo.Text = "Material No" + ' + 'txtMaterialNo + ' + Me.txtMaterialNo.Location = New System.Drawing.Point(103, 7) + Me.txtMaterialNo.Name = "txtMaterialNo" + Me.txtMaterialNo.Size = New System.Drawing.Size(132, 22) + Me.txtMaterialNo.TabIndex = 158 + ' + 'lblMaterialLotNo + ' + Me.lblMaterialLotNo.BackColor = System.Drawing.Color.Transparent + Me.lblMaterialLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMaterialLotNo.Location = New System.Drawing.Point(244, 11) + Me.lblMaterialLotNo.Name = "lblMaterialLotNo" + Me.lblMaterialLotNo.Size = New System.Drawing.Size(90, 16) + Me.lblMaterialLotNo.TabIndex = 157 + Me.lblMaterialLotNo.Text = "Material Lot No" + ' + 'txtMaterialLotNo + ' + Me.txtMaterialLotNo.Location = New System.Drawing.Point(340, 7) + Me.txtMaterialLotNo.Name = "txtMaterialLotNo" + Me.txtMaterialLotNo.Size = New System.Drawing.Size(132, 22) + Me.txtMaterialLotNo.TabIndex = 156 + ' + 'iugMaterial + ' + Me.iugMaterial.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugMaterial.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugMaterial.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugMaterial.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugMaterial.Identity = "IMes" + Me.iugMaterial.IdentityForm = "" + Me.iugMaterial.LayOutFilePath = "" + Me.iugMaterial.Location = New System.Drawing.Point(2, 35) + Me.iugMaterial.Name = "iugMaterial" + Me.iugMaterial.PrintFitWidthToPages = 0 + Me.iugMaterial.PrintLandscape = True + Me.iugMaterial.PrintPageFooter = "" + Me.iugMaterial.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugMaterial.PrintPageFooterHeight = 20 + Me.iugMaterial.PrintPageHeader = "" + Me.iugMaterial.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugMaterial.PrintPageHeaderHeight = 20 + Me.iugMaterial.PrintZoom = 1.0R + Me.iugMaterial.Size = New System.Drawing.Size(506, 148) + Me.iugMaterial.TabIndex = 108 + Me.iugMaterial.UserNo = "IMes" + ' + 'utpSubOP + ' + Me.utpSubOP.Controls.Add(Me.iugSubOP) + Me.utpSubOP.Location = New System.Drawing.Point(-10000, -10000) + Me.utpSubOP.Name = "utpSubOP" + Me.utpSubOP.Size = New System.Drawing.Size(511, 187) + ' + 'iugSubOP + ' + Me.iugSubOP.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugSubOP.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugSubOP.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugSubOP.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugSubOP.Identity = "IMes" + Me.iugSubOP.IdentityForm = "" + Me.iugSubOP.LayOutFilePath = "" + Me.iugSubOP.Location = New System.Drawing.Point(2, 3) + Me.iugSubOP.Name = "iugSubOP" + Me.iugSubOP.PrintFitWidthToPages = 0 + Me.iugSubOP.PrintLandscape = True + Me.iugSubOP.PrintPageFooter = "" + Me.iugSubOP.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugSubOP.PrintPageFooterHeight = 20 + Me.iugSubOP.PrintPageHeader = "" + Me.iugSubOP.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugSubOP.PrintPageHeaderHeight = 20 + Me.iugSubOP.PrintZoom = 1.0R + Me.iugSubOP.Size = New System.Drawing.Size(506, 181) + Me.iugSubOP.TabIndex = 5 + Me.iugSubOP.UserNo = "IMes" + ' + 'utpKzxx + ' + Me.utpKzxx.Controls.Add(Me.iugKzxx) + Me.utpKzxx.Location = New System.Drawing.Point(1, 23) + Me.utpKzxx.Name = "utpKzxx" + Me.utpKzxx.Size = New System.Drawing.Size(511, 187) + ' + 'iugKzxx + ' + Me.iugKzxx.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugKzxx.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugKzxx.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugKzxx.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugKzxx.Identity = "IMes" + Me.iugKzxx.IdentityForm = "" + Me.iugKzxx.LayOutFilePath = "" + Me.iugKzxx.Location = New System.Drawing.Point(2, 3) + Me.iugKzxx.Name = "iugKzxx" + Me.iugKzxx.PrintFitWidthToPages = 0 + Me.iugKzxx.PrintLandscape = True + Me.iugKzxx.PrintPageFooter = "" + Me.iugKzxx.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKzxx.PrintPageFooterHeight = 20 + Me.iugKzxx.PrintPageHeader = "" + Me.iugKzxx.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKzxx.PrintPageHeaderHeight = 20 + Me.iugKzxx.PrintZoom = 1.0R + Me.iugKzxx.Size = New System.Drawing.Size(506, 181) + Me.iugKzxx.TabIndex = 4 + Me.iugKzxx.UserNo = "IMes" + ' + 'uegLotInfo + ' + Me.uegLotInfo.Controls.Add(Me.UltraExpandableGroupBoxPanel1) + Me.uegLotInfo.Dock = System.Windows.Forms.DockStyle.Top + Me.uegLotInfo.ExpandedSize = New System.Drawing.Size(1013, 153) + Me.uegLotInfo.Location = New System.Drawing.Point(0, 0) + Me.uegLotInfo.Name = "uegLotInfo" + Me.uegLotInfo.Size = New System.Drawing.Size(1013, 153) + Me.uegLotInfo.TabIndex = 161 + Me.uegLotInfo.Text = "Lot Information" + Me.uegLotInfo.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel1 + ' + Me.UltraExpandableGroupBoxPanel1.Controls.Add(Me.UltraPanel1) + Me.UltraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel1.Location = New System.Drawing.Point(2, 22) + Me.UltraExpandableGroupBoxPanel1.Name = "UltraExpandableGroupBoxPanel1" + Me.UltraExpandableGroupBoxPanel1.Size = New System.Drawing.Size(1009, 129) + Me.UltraExpandableGroupBoxPanel1.TabIndex = 0 + ' + 'UltraPanel1 + ' + ' + 'UltraPanel1.ClientArea + ' + Me.UltraPanel1.ClientArea.Controls.Add(Me.gbxLotInfo) + Me.UltraPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel1.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel1.Name = "UltraPanel1" + Me.UltraPanel1.Size = New System.Drawing.Size(1009, 129) + Me.UltraPanel1.TabIndex = 0 + ' + 'gbxLotInfo + ' + Me.gbxLotInfo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.gbxLotInfo.Controls.Add(Me.txtOpName) + Me.gbxLotInfo.Controls.Add(Me.txtOPNo) + Me.gbxLotInfo.Controls.Add(Me.txtProductNo) + Me.gbxLotInfo.Controls.Add(Me.txtCustomerLotNo) + Me.gbxLotInfo.Controls.Add(Me.txtMONo) + Me.gbxLotInfo.Controls.Add(Me.txtShiftNo) + Me.gbxLotInfo.Controls.Add(Me.txtEmployeeNo) + Me.gbxLotInfo.Controls.Add(Me.txtAreaNo) + Me.gbxLotInfo.Controls.Add(Me.txtPriority) + Me.gbxLotInfo.Controls.Add(Me.txtSysUnitNo) + Me.gbxLotInfo.Controls.Add(Me.txtSysQty) + Me.gbxLotInfo.Controls.Add(Me.txtCurUnitNo) + Me.gbxLotInfo.Controls.Add(Me.txtCurQty) + Me.gbxLotInfo.Controls.Add(Me.txtOPDescription) + Me.gbxLotInfo.Controls.Add(Me.txtLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblPriority) + Me.gbxLotInfo.Controls.Add(Me.lblMONo) + Me.gbxLotInfo.Controls.Add(Me.lblShiftNo) + Me.gbxLotInfo.Controls.Add(Me.lblOPNo) + Me.gbxLotInfo.Controls.Add(Me.lblAreaNo) + Me.gbxLotInfo.Controls.Add(Me.lblSysQty) + Me.gbxLotInfo.Controls.Add(Me.lblCurQty) + Me.gbxLotInfo.Controls.Add(Me.lblProductNo) + Me.gbxLotInfo.Controls.Add(Me.lblOPDescription) + Me.gbxLotInfo.Controls.Add(Me.lblCustomerLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblEmployeeNo) + Me.gbxLotInfo.Controls.Add(Me.lblLotNo) + Me.gbxLotInfo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.gbxLotInfo.Location = New System.Drawing.Point(0, 0) + Me.gbxLotInfo.Name = "gbxLotInfo" + Me.gbxLotInfo.Size = New System.Drawing.Size(1009, 125) + Me.gbxLotInfo.TabIndex = 0 + Me.gbxLotInfo.TabStop = False + ' + 'txtOpName + ' + Me.txtOpName.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOpName.Location = New System.Drawing.Point(743, 69) + Me.txtOpName.Name = "txtOpName" + Me.txtOpName.ReadOnly = True + Me.txtOpName.Size = New System.Drawing.Size(259, 22) + Me.txtOpName.TabIndex = 109 + ' + 'txtOPNo + ' + Me.txtOPNo.Location = New System.Drawing.Point(609, 69) + Me.txtOPNo.Name = "txtOPNo" + Me.txtOPNo.ReadOnly = True + Me.txtOPNo.Size = New System.Drawing.Size(137, 22) + Me.txtOPNo.TabIndex = 7 + ' + 'txtProductNo + ' + Me.txtProductNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtProductNo.Location = New System.Drawing.Point(609, 42) + Me.txtProductNo.Name = "txtProductNo" + Me.txtProductNo.ReadOnly = True + Me.txtProductNo.Size = New System.Drawing.Size(188, 22) + Me.txtProductNo.TabIndex = 13 + ' + 'txtCustomerLotNo + ' + Me.txtCustomerLotNo.Location = New System.Drawing.Point(87, 42) + Me.txtCustomerLotNo.Name = "txtCustomerLotNo" + Me.txtCustomerLotNo.ReadOnly = True + Me.txtCustomerLotNo.Size = New System.Drawing.Size(179, 22) + Me.txtCustomerLotNo.TabIndex = 8 + ' + 'txtMONo + ' + Me.txtMONo.Location = New System.Drawing.Point(341, 42) + Me.txtMONo.Name = "txtMONo" + Me.txtMONo.ReadOnly = True + Me.txtMONo.Size = New System.Drawing.Size(179, 22) + Me.txtMONo.TabIndex = 9 + ' + 'txtShiftNo + ' + Me.txtShiftNo.Location = New System.Drawing.Point(341, 69) + Me.txtShiftNo.Name = "txtShiftNo" + Me.txtShiftNo.ReadOnly = True + Me.txtShiftNo.Size = New System.Drawing.Size(179, 22) + Me.txtShiftNo.TabIndex = 15 + ' + 'txtEmployeeNo + ' + Me.txtEmployeeNo.Location = New System.Drawing.Point(87, 69) + Me.txtEmployeeNo.Name = "txtEmployeeNo" + Me.txtEmployeeNo.ReadOnly = True + Me.txtEmployeeNo.Size = New System.Drawing.Size(179, 22) + Me.txtEmployeeNo.TabIndex = 12 + ' + 'txtAreaNo + ' + Me.txtAreaNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtAreaNo.Location = New System.Drawing.Point(609, 15) + Me.txtAreaNo.Name = "txtAreaNo" + Me.txtAreaNo.ReadOnly = True + Me.txtAreaNo.Size = New System.Drawing.Size(188, 22) + Me.txtAreaNo.TabIndex = 2 + ' + 'txtPriority + ' + Me.txtPriority.Location = New System.Drawing.Point(341, 15) + Me.txtPriority.Name = "txtPriority" + Me.txtPriority.ReadOnly = True + Me.txtPriority.Size = New System.Drawing.Size(179, 22) + Me.txtPriority.TabIndex = 1 + ' + 'txtSysUnitNo + ' + Me.txtSysUnitNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtSysUnitNo.Location = New System.Drawing.Point(962, 42) + Me.txtSysUnitNo.Name = "txtSysUnitNo" + Me.txtSysUnitNo.ReadOnly = True + Me.txtSysUnitNo.Size = New System.Drawing.Size(40, 22) + Me.txtSysUnitNo.TabIndex = 9 + ' + 'txtSysQty + ' + Me.txtSysQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtSysQty.Location = New System.Drawing.Point(860, 42) + Me.txtSysQty.Name = "txtSysQty" + Me.txtSysQty.ReadOnly = True + Me.txtSysQty.Size = New System.Drawing.Size(102, 22) + Me.txtSysQty.TabIndex = 8 + ' + 'txtCurUnitNo + ' + Me.txtCurUnitNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCurUnitNo.Location = New System.Drawing.Point(962, 15) + Me.txtCurUnitNo.Name = "txtCurUnitNo" + Me.txtCurUnitNo.ReadOnly = True + Me.txtCurUnitNo.Size = New System.Drawing.Size(40, 22) + Me.txtCurUnitNo.TabIndex = 4 + ' + 'txtCurQty + ' + Me.txtCurQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCurQty.Location = New System.Drawing.Point(860, 15) + Me.txtCurQty.Name = "txtCurQty" + Me.txtCurQty.ReadOnly = True + Me.txtCurQty.Size = New System.Drawing.Size(102, 22) + Me.txtCurQty.TabIndex = 3 + ' + 'txtOPDescription + ' + Me.txtOPDescription.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOPDescription.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtOPDescription.Location = New System.Drawing.Point(87, 96) + Me.txtOPDescription.Name = "txtOPDescription" + Me.txtOPDescription.ReadOnly = True + Me.txtOPDescription.Size = New System.Drawing.Size(915, 22) + Me.txtOPDescription.TabIndex = 10 + ' + 'txtLotNo + ' + Me.txtLotNo.Location = New System.Drawing.Point(87, 15) + Me.txtLotNo.Name = "txtLotNo" + Me.txtLotNo.ReadOnly = True + Me.txtLotNo.Size = New System.Drawing.Size(179, 22) + Me.txtLotNo.TabIndex = 0 + ' + 'lblPriority + ' + Me.lblPriority.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblPriority.Location = New System.Drawing.Point(271, 18) + Me.lblPriority.Name = "lblPriority" + Me.lblPriority.Size = New System.Drawing.Size(64, 15) + Me.lblPriority.TabIndex = 85 + Me.lblPriority.Text = "Priority" + Me.lblPriority.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblMONo + ' + Me.lblMONo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMONo.Location = New System.Drawing.Point(271, 45) + Me.lblMONo.Name = "lblMONo" + Me.lblMONo.Size = New System.Drawing.Size(64, 15) + Me.lblMONo.TabIndex = 83 + Me.lblMONo.Text = "MONo" + Me.lblMONo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblShiftNo + ' + Me.lblShiftNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblShiftNo.Location = New System.Drawing.Point(271, 72) + Me.lblShiftNo.Name = "lblShiftNo" + Me.lblShiftNo.Size = New System.Drawing.Size(64, 15) + Me.lblShiftNo.TabIndex = 79 + Me.lblShiftNo.Text = "Shift No" + Me.lblShiftNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblOPNo + ' + Me.lblOPNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOPNo.Location = New System.Drawing.Point(527, 72) + Me.lblOPNo.Name = "lblOPNo" + Me.lblOPNo.Size = New System.Drawing.Size(75, 15) + Me.lblOPNo.TabIndex = 75 + Me.lblOPNo.Text = "OP No" + Me.lblOPNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblAreaNo + ' + Me.lblAreaNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblAreaNo.Location = New System.Drawing.Point(527, 18) + Me.lblAreaNo.Name = "lblAreaNo" + Me.lblAreaNo.Size = New System.Drawing.Size(75, 15) + Me.lblAreaNo.TabIndex = 71 + Me.lblAreaNo.Text = "Area No" + Me.lblAreaNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblSysQty + ' + Me.lblSysQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblSysQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblSysQty.Location = New System.Drawing.Point(790, 45) + Me.lblSysQty.Name = "lblSysQty" + Me.lblSysQty.Size = New System.Drawing.Size(64, 15) + Me.lblSysQty.TabIndex = 68 + Me.lblSysQty.Text = "Sys Qty" + Me.lblSysQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblCurQty + ' + Me.lblCurQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblCurQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCurQty.Location = New System.Drawing.Point(790, 18) + Me.lblCurQty.Name = "lblCurQty" + Me.lblCurQty.Size = New System.Drawing.Size(64, 15) + Me.lblCurQty.TabIndex = 64 + Me.lblCurQty.Text = "Cur Qty" + Me.lblCurQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblProductNo + ' + Me.lblProductNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblProductNo.Location = New System.Drawing.Point(527, 45) + Me.lblProductNo.Name = "lblProductNo" + Me.lblProductNo.Size = New System.Drawing.Size(75, 15) + Me.lblProductNo.TabIndex = 107 + Me.lblProductNo.Text = "Product No" + Me.lblProductNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblOPDescription + ' + Me.lblOPDescription.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOPDescription.Location = New System.Drawing.Point(3, 97) + Me.lblOPDescription.Name = "lblOPDescription" + Me.lblOPDescription.Size = New System.Drawing.Size(80, 15) + Me.lblOPDescription.TabIndex = 108 + Me.lblOPDescription.Text = "OP Description" + Me.lblOPDescription.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblCustomerLotNo + ' + Me.lblCustomerLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCustomerLotNo.Location = New System.Drawing.Point(3, 45) + Me.lblCustomerLotNo.Name = "lblCustomerLotNo" + Me.lblCustomerLotNo.Size = New System.Drawing.Size(80, 15) + Me.lblCustomerLotNo.TabIndex = 81 + Me.lblCustomerLotNo.Text = "Customer Lot No" + Me.lblCustomerLotNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblEmployeeNo + ' + Me.lblEmployeeNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblEmployeeNo.Location = New System.Drawing.Point(3, 72) + Me.lblEmployeeNo.Name = "lblEmployeeNo" + Me.lblEmployeeNo.Size = New System.Drawing.Size(80, 15) + Me.lblEmployeeNo.TabIndex = 73 + Me.lblEmployeeNo.Text = "Employee No" + Me.lblEmployeeNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblLotNo + ' + Me.lblLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblLotNo.Location = New System.Drawing.Point(3, 18) + Me.lblLotNo.Name = "lblLotNo" + Me.lblLotNo.Size = New System.Drawing.Size(80, 15) + Me.lblLotNo.TabIndex = 62 + Me.lblLotNo.Text = "Lot No" + Me.lblLotNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'UltraTabPageControl2 + ' + Me.UltraTabPageControl2.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabPageControl2.Name = "UltraTabPageControl2" + Me.UltraTabPageControl2.Size = New System.Drawing.Size(340, 100) + ' + 'UltraTabPageControl1 + ' + Me.UltraTabPageControl1.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabPageControl1.Name = "UltraTabPageControl1" + Me.UltraTabPageControl1.Size = New System.Drawing.Size(340, 100) + ' + 'SBar1 + ' + Me.SBar1.Font = New System.Drawing.Font("Times New Roman", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.SBar1.Location = New System.Drawing.Point(0, 707) + Me.SBar1.Name = "SBar1" + Me.SBar1.Panels.AddRange(New System.Windows.Forms.StatusBarPanel() {Me.SBarPanel1, Me.SBarPanel2, Me.SBarPanel3, Me.SBarPanel4}) + Me.SBar1.ShowPanels = True + Me.SBar1.Size = New System.Drawing.Size(1008, 22) + Me.SBar1.TabIndex = 68 + ' + 'SBarPanel1 + ' + Me.SBarPanel1.Name = "SBarPanel1" + ' + 'SBarPanel2 + ' + Me.SBarPanel2.Name = "SBarPanel2" + ' + 'SBarPanel3 + ' + Me.SBarPanel3.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring + Me.SBarPanel3.Name = "SBarPanel3" + Me.SBarPanel3.Width = 641 + ' + 'SBarPanel4 + ' + Me.SBarPanel4.Alignment = System.Windows.Forms.HorizontalAlignment.Right + Me.SBarPanel4.Name = "SBarPanel4" + Me.SBarPanel4.Width = 150 + ' + 'iugAttrib + ' + Me.iugAttrib.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugAttrib.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugAttrib.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugAttrib.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugAttrib.Identity = "IMes" + Me.iugAttrib.IdentityForm = "" + Me.iugAttrib.LayOutFilePath = "" + Me.iugAttrib.Location = New System.Drawing.Point(4, 3) + Me.iugAttrib.Name = "iugAttrib" + Me.iugAttrib.PrintFitWidthToPages = 0 + Me.iugAttrib.PrintLandscape = True + Me.iugAttrib.PrintPageFooter = "" + Me.iugAttrib.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugAttrib.PrintPageFooterHeight = 20 + Me.iugAttrib.PrintPageHeader = "" + Me.iugAttrib.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugAttrib.PrintPageHeaderHeight = 20 + Me.iugAttrib.PrintZoom = 1.0R + Me.iugAttrib.Size = New System.Drawing.Size(506, 214) + Me.iugAttrib.TabIndex = 105 + Me.iugAttrib.UserNo = "IMes" + ' + 'iugEquipment + ' + Me.iugEquipment.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugEquipment.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugEquipment.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugEquipment.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugEquipment.Identity = "IMes" + Me.iugEquipment.IdentityForm = "" + Me.iugEquipment.LayOutFilePath = "" + Me.iugEquipment.Location = New System.Drawing.Point(3, 46) + Me.iugEquipment.Name = "iugEquipment" + Me.iugEquipment.PrintFitWidthToPages = 0 + Me.iugEquipment.PrintLandscape = True + Me.iugEquipment.PrintPageFooter = "" + Me.iugEquipment.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugEquipment.PrintPageFooterHeight = 20 + Me.iugEquipment.PrintPageHeader = "" + Me.iugEquipment.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugEquipment.PrintPageHeaderHeight = 20 + Me.iugEquipment.PrintZoom = 1.0R + Me.iugEquipment.Size = New System.Drawing.Size(477, 171) + Me.iugEquipment.TabIndex = 107 + Me.iugEquipment.UserNo = "IMes" + ' + 'btnClose + ' + Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnClose.Location = New System.Drawing.Point(925, 673) + Me.btnClose.Name = "btnClose" + Me.btnClose.Size = New System.Drawing.Size(80, 32) + Me.btnClose.TabIndex = 144 + Me.btnClose.Text = "Close" + ' + 'btnConfirm + ' + Me.btnConfirm.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnConfirm.Location = New System.Drawing.Point(839, 673) + Me.btnConfirm.Name = "btnConfirm" + Me.btnConfirm.Size = New System.Drawing.Size(80, 32) + Me.btnConfirm.TabIndex = 143 + Me.btnConfirm.Text = "Confirm" + ' + 'lblEquipmentNo + ' + Me.lblEquipmentNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblEquipmentNo.Location = New System.Drawing.Point(20, 16) + Me.lblEquipmentNo.Name = "lblEquipmentNo" + Me.lblEquipmentNo.Size = New System.Drawing.Size(80, 16) + Me.lblEquipmentNo.TabIndex = 147 + Me.lblEquipmentNo.Text = "Equipment No" + ' + 'txtEquipmentNo + ' + Me.txtEquipmentNo.Location = New System.Drawing.Point(106, 12) + Me.txtEquipmentNo.Name = "txtEquipmentNo" + Me.txtEquipmentNo.Size = New System.Drawing.Size(132, 22) + Me.txtEquipmentNo.TabIndex = 17 + ' + 'lblLotRecord + ' + Me.lblLotRecord.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblLotRecord.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblLotRecord.Location = New System.Drawing.Point(16, 634) + Me.lblLotRecord.Name = "lblLotRecord" + Me.lblLotRecord.Size = New System.Drawing.Size(64, 16) + Me.lblLotRecord.TabIndex = 145 + Me.lblLotRecord.Text = "Lot Record" + ' + 'txtLotRecord + ' + Me.txtLotRecord.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.txtLotRecord.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtLotRecord.Location = New System.Drawing.Point(88, 634) + Me.txtLotRecord.Name = "txtLotRecord" + Me.txtLotRecord.Size = New System.Drawing.Size(393, 35) + Me.txtLotRecord.TabIndex = 18 + Me.txtLotRecord.Text = "" + ' + 'lblupdcheckintime + ' + Me.lblupdcheckintime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblupdcheckintime.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblupdcheckintime.Location = New System.Drawing.Point(8, 683) + Me.lblupdcheckintime.Name = "lblupdcheckintime" + Me.lblupdcheckintime.Size = New System.Drawing.Size(116, 14) + Me.lblupdcheckintime.TabIndex = 62 + Me.lblupdcheckintime.Text = "Update CheckIn Time" + ' + 'dtpcheckintime + ' + Me.dtpcheckintime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.dtpcheckintime.CustomFormat = "yyyy/MM/dd HH:mm:ss" + Me.dtpcheckintime.Format = System.Windows.Forms.DateTimePickerFormat.Custom + Me.dtpcheckintime.Location = New System.Drawing.Point(152, 682) + Me.dtpcheckintime.Name = "dtpcheckintime" + Me.dtpcheckintime.Size = New System.Drawing.Size(128, 21) + Me.dtpcheckintime.TabIndex = 151 + ' + 'btnEQPConsumeReset + ' + Me.btnEQPConsumeReset.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnEQPConsumeReset.Location = New System.Drawing.Point(282, 7) + Me.btnEQPConsumeReset.Name = "btnEQPConsumeReset" + Me.btnEQPConsumeReset.Size = New System.Drawing.Size(112, 32) + Me.btnEQPConsumeReset.TabIndex = 152 + Me.btnEQPConsumeReset.Text = "EQPConsumeReset" + ' + 'btnQCList + ' + Me.btnQCList.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnQCList.Location = New System.Drawing.Point(400, 7) + Me.btnQCList.Name = "btnQCList" + Me.btnQCList.Size = New System.Drawing.Size(80, 32) + Me.btnQCList.TabIndex = 153 + Me.btnQCList.Text = "QC List" + ' + 'utpEquipment + ' + Me.utpEquipment.Controls.Add(Me.IMESUltraGrid3) + Me.utpEquipment.Location = New System.Drawing.Point(-10000, -10000) + Me.utpEquipment.Name = "utpEquipment" + Me.utpEquipment.Size = New System.Drawing.Size(772, 150) + ' + 'IMESUltraGrid3 + ' + Me.IMESUltraGrid3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.IMESUltraGrid3.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.IMESUltraGrid3.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.IMESUltraGrid3.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.IMESUltraGrid3.Identity = "IMes" + Me.IMESUltraGrid3.IdentityForm = "" + Me.IMESUltraGrid3.LayOutFilePath = "" + Me.IMESUltraGrid3.Location = New System.Drawing.Point(11, 8) + Me.IMESUltraGrid3.Name = "IMESUltraGrid3" + Me.IMESUltraGrid3.PrintFitWidthToPages = 0 + Me.IMESUltraGrid3.PrintLandscape = True + Me.IMESUltraGrid3.PrintPageFooter = "" + Me.IMESUltraGrid3.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.IMESUltraGrid3.PrintPageFooterHeight = 20 + Me.IMESUltraGrid3.PrintPageHeader = "" + Me.IMESUltraGrid3.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.IMESUltraGrid3.PrintPageHeaderHeight = 20 + Me.IMESUltraGrid3.PrintZoom = 1.0R + Me.IMESUltraGrid3.Size = New System.Drawing.Size(753, 136) + Me.IMESUltraGrid3.TabIndex = 0 + Me.IMESUltraGrid3.UserNo = "IMes" + ' + 'btnMultiUser + ' + Me.btnMultiUser.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnMultiUser.Location = New System.Drawing.Point(398, 673) + Me.btnMultiUser.Name = "btnMultiUser" + Me.btnMultiUser.Size = New System.Drawing.Size(80, 32) + Me.btnMultiUser.TabIndex = 155 + Me.btnMultiUser.Text = "Multi User" + Me.btnMultiUser.Visible = False + ' + 'btnOperator + ' + Me.btnOperator.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnOperator.Location = New System.Drawing.Point(315, 673) + Me.btnOperator.Name = "btnOperator" + Me.btnOperator.Size = New System.Drawing.Size(80, 32) + Me.btnOperator.TabIndex = 156 + Me.btnOperator.Text = "Operator" + Me.btnOperator.Visible = False + ' + 'chkUpdCheckInTime + ' + Me.chkUpdCheckInTime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.chkUpdCheckInTime.AutoSize = True + Me.chkUpdCheckInTime.Location = New System.Drawing.Point(130, 683) + Me.chkUpdCheckInTime.Name = "chkUpdCheckInTime" + Me.chkUpdCheckInTime.Size = New System.Drawing.Size(15, 14) + Me.chkUpdCheckInTime.TabIndex = 157 + ' + 'btnSWR + ' + Me.btnSWR.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnSWR.Location = New System.Drawing.Point(753, 673) + Me.btnSWR.Name = "btnSWR" + Me.btnSWR.Size = New System.Drawing.Size(80, 32) + Me.btnSWR.TabIndex = 158 + Me.btnSWR.Text = "SWR" + ' + 'uplAttrib + ' + ' + 'uplAttrib.ClientArea + ' + Me.uplAttrib.ClientArea.Controls.Add(Me.iugAttrib) + Me.uplAttrib.Dock = System.Windows.Forms.DockStyle.Left + Me.uplAttrib.Location = New System.Drawing.Point(0, 0) + Me.uplAttrib.Name = "uplAttrib" + Me.uplAttrib.Size = New System.Drawing.Size(515, 220) + Me.uplAttrib.TabIndex = 0 + ' + 'uplEquipment + ' + ' + 'uplEquipment.ClientArea + ' + Me.uplEquipment.ClientArea.Controls.Add(Me.lblEquipmentNo) + Me.uplEquipment.ClientArea.Controls.Add(Me.iugEquipment) + Me.uplEquipment.ClientArea.Controls.Add(Me.txtEquipmentNo) + Me.uplEquipment.ClientArea.Controls.Add(Me.btnEQPConsumeReset) + Me.uplEquipment.ClientArea.Controls.Add(Me.btnQCList) + Me.uplEquipment.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplEquipment.Location = New System.Drawing.Point(522, 0) + Me.uplEquipment.Name = "uplEquipment" + Me.uplEquipment.Size = New System.Drawing.Size(487, 220) + Me.uplEquipment.TabIndex = 1 + ' + 'uplAttrib_Equipment + ' + ' + 'uplAttrib_Equipment.ClientArea + ' + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.uplEquipment) + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.UltraSplitter1) + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.uplAttrib) + Me.uplAttrib_Equipment.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplAttrib_Equipment.Location = New System.Drawing.Point(0, 0) + Me.uplAttrib_Equipment.Name = "uplAttrib_Equipment" + Me.uplAttrib_Equipment.Size = New System.Drawing.Size(1009, 220) + Me.uplAttrib_Equipment.TabIndex = 162 + ' + 'UltraSplitter1 + ' + Me.UltraSplitter1.Location = New System.Drawing.Point(515, 0) + Me.UltraSplitter1.Name = "UltraSplitter1" + Me.UltraSplitter1.RestoreExtent = 479 + Me.UltraSplitter1.Size = New System.Drawing.Size(7, 220) + Me.UltraSplitter1.TabIndex = 1 + ' + 'uplMaterial_KeyIn + ' + ' + 'uplMaterial_KeyIn.ClientArea + ' + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.uplKeyIn) + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.UltraSplitter2) + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.uplMaterial) + Me.uplMaterial_KeyIn.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplMaterial_KeyIn.Location = New System.Drawing.Point(0, 0) + Me.uplMaterial_KeyIn.Name = "uplMaterial_KeyIn" + Me.uplMaterial_KeyIn.Size = New System.Drawing.Size(1009, 216) + Me.uplMaterial_KeyIn.TabIndex = 0 + ' + 'uplKeyIn + ' + ' + 'uplKeyIn.ClientArea + ' + Me.uplKeyIn.ClientArea.Controls.Add(Me.iugKeyIn) + Me.uplKeyIn.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplKeyIn.Location = New System.Drawing.Point(522, 0) + Me.uplKeyIn.Name = "uplKeyIn" + Me.uplKeyIn.Size = New System.Drawing.Size(487, 216) + Me.uplKeyIn.TabIndex = 4 + ' + 'iugKeyIn + ' + Me.iugKeyIn.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugKeyIn.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugKeyIn.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugKeyIn.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugKeyIn.Identity = "IMes" + Me.iugKeyIn.IdentityForm = "" + Me.iugKeyIn.LayOutFilePath = "" + Me.iugKeyIn.Location = New System.Drawing.Point(3, 3) + Me.iugKeyIn.Name = "iugKeyIn" + Me.iugKeyIn.PrintFitWidthToPages = 0 + Me.iugKeyIn.PrintLandscape = True + Me.iugKeyIn.PrintPageFooter = "" + Me.iugKeyIn.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKeyIn.PrintPageFooterHeight = 20 + Me.iugKeyIn.PrintPageHeader = "" + Me.iugKeyIn.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKeyIn.PrintPageHeaderHeight = 20 + Me.iugKeyIn.PrintZoom = 1.0R + Me.iugKeyIn.Size = New System.Drawing.Size(477, 207) + Me.iugKeyIn.TabIndex = 150 + Me.iugKeyIn.UserNo = "IMes" + ' + 'UltraSplitter2 + ' + Me.UltraSplitter2.Location = New System.Drawing.Point(515, 0) + Me.UltraSplitter2.Name = "UltraSplitter2" + Me.UltraSplitter2.RestoreExtent = 479 + Me.UltraSplitter2.Size = New System.Drawing.Size(7, 216) + Me.UltraSplitter2.TabIndex = 3 + ' + 'uplMaterial + ' + ' + 'uplMaterial.ClientArea + ' + Me.uplMaterial.ClientArea.Controls.Add(Me.UltraTabControl1) + Me.uplMaterial.Dock = System.Windows.Forms.DockStyle.Left + Me.uplMaterial.Location = New System.Drawing.Point(0, 0) + Me.uplMaterial.Name = "uplMaterial" + Me.uplMaterial.Size = New System.Drawing.Size(515, 216) + Me.uplMaterial.TabIndex = 0 + ' + 'UltraTabControl1 + ' + Me.UltraTabControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.UltraTabControl1.Controls.Add(Me.utpMaterial) + Me.UltraTabControl1.Controls.Add(Me.UltraTabSharedControlsPage1) + Me.UltraTabControl1.Controls.Add(Me.utpSubOP) + Me.UltraTabControl1.Controls.Add(Me.utpKzxx) + Me.UltraTabControl1.Location = New System.Drawing.Point(0, 0) + Me.UltraTabControl1.Name = "UltraTabControl1" + Me.UltraTabControl1.SharedControlsPage = Me.UltraTabSharedControlsPage1 + Me.UltraTabControl1.Size = New System.Drawing.Size(515, 213) + Me.UltraTabControl1.TabIndex = 154 + Me.UltraTabControl1.TabLayoutStyle = Infragistics.Win.UltraWinTabs.TabLayoutStyle.MultiRowTabsPerRow + UltraTab2.FixedWidth = 120 + UltraTab2.TabPage = Me.utpMaterial + UltraTab2.Text = "Material" + UltraTab3.TabPage = Me.utpSubOP + UltraTab3.Text = "Sub OP" + UltraTab5.TabPage = Me.utpKzxx + UltraTab5.Text = "kzxx" + Me.UltraTabControl1.Tabs.AddRange(New Infragistics.Win.UltraWinTabControl.UltraTab() {UltraTab2, UltraTab3, UltraTab5}) + ' + 'UltraTabSharedControlsPage1 + ' + Me.UltraTabSharedControlsPage1.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabSharedControlsPage1.Name = "UltraTabSharedControlsPage1" + Me.UltraTabSharedControlsPage1.Size = New System.Drawing.Size(511, 187) + ' + 'uplAll + ' + Me.uplAll.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + ' + 'uplAll.ClientArea + ' + Me.uplAll.ClientArea.Controls.Add(Me.uegMaterial_KeyIn2) + Me.uplAll.ClientArea.Controls.Add(Me.uegAttrib_Equipment) + Me.uplAll.ClientArea.Controls.Add(Me.uegLotInfo) + Me.uplAll.Location = New System.Drawing.Point(0, -1) + Me.uplAll.Name = "uplAll" + Me.uplAll.Size = New System.Drawing.Size(1013, 629) + Me.uplAll.TabIndex = 165 + ' + 'uegMaterial_KeyIn2 + ' + Me.uegMaterial_KeyIn2.Controls.Add(Me.UltraExpandableGroupBoxPanel4) + Me.uegMaterial_KeyIn2.Dock = System.Windows.Forms.DockStyle.Fill + Me.uegMaterial_KeyIn2.ExpandedSize = New System.Drawing.Size(1013, 236) + Me.uegMaterial_KeyIn2.Location = New System.Drawing.Point(0, 393) + Me.uegMaterial_KeyIn2.Name = "uegMaterial_KeyIn2" + Me.uegMaterial_KeyIn2.Size = New System.Drawing.Size(1013, 236) + Me.uegMaterial_KeyIn2.TabIndex = 163 + Me.uegMaterial_KeyIn2.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel4 + ' + Me.UltraExpandableGroupBoxPanel4.Controls.Add(Me.UltraPanel4) + Me.UltraExpandableGroupBoxPanel4.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel4.Location = New System.Drawing.Point(2, 18) + Me.UltraExpandableGroupBoxPanel4.Name = "UltraExpandableGroupBoxPanel4" + Me.UltraExpandableGroupBoxPanel4.Size = New System.Drawing.Size(1009, 216) + Me.UltraExpandableGroupBoxPanel4.TabIndex = 0 + ' + 'UltraPanel4 + ' + ' + 'UltraPanel4.ClientArea + ' + Me.UltraPanel4.ClientArea.Controls.Add(Me.uplMaterial_KeyIn) + Me.UltraPanel4.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel4.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel4.Name = "UltraPanel4" + Me.UltraPanel4.Size = New System.Drawing.Size(1009, 216) + Me.UltraPanel4.TabIndex = 0 + ' + 'uegAttrib_Equipment + ' + Me.uegAttrib_Equipment.Controls.Add(Me.UltraExpandableGroupBoxPanel2) + Me.uegAttrib_Equipment.Dock = System.Windows.Forms.DockStyle.Top + Me.uegAttrib_Equipment.ExpandedSize = New System.Drawing.Size(1013, 240) + Me.uegAttrib_Equipment.Location = New System.Drawing.Point(0, 153) + Me.uegAttrib_Equipment.Name = "uegAttrib_Equipment" + Me.uegAttrib_Equipment.Size = New System.Drawing.Size(1013, 240) + Me.uegAttrib_Equipment.TabIndex = 162 + Me.uegAttrib_Equipment.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel2 + ' + Me.UltraExpandableGroupBoxPanel2.Controls.Add(Me.UltraPanel2) + Me.UltraExpandableGroupBoxPanel2.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel2.Location = New System.Drawing.Point(2, 18) + Me.UltraExpandableGroupBoxPanel2.Name = "UltraExpandableGroupBoxPanel2" + Me.UltraExpandableGroupBoxPanel2.Size = New System.Drawing.Size(1009, 220) + Me.UltraExpandableGroupBoxPanel2.TabIndex = 0 + ' + 'UltraPanel2 + ' + ' + 'UltraPanel2.ClientArea + ' + Me.UltraPanel2.ClientArea.Controls.Add(Me.uplAttrib_Equipment) + Me.UltraPanel2.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel2.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel2.Name = "UltraPanel2" + Me.UltraPanel2.Size = New System.Drawing.Size(1009, 220) + Me.UltraPanel2.TabIndex = 0 + ' + 'UltraTabPageControl3 + ' + Me.UltraTabPageControl3.Controls.Add(Me.Label1) + Me.UltraTabPageControl3.Controls.Add(Me.UltraTextEditor1) + Me.UltraTabPageControl3.Controls.Add(Me.Label2) + Me.UltraTabPageControl3.Controls.Add(Me.UltraTextEditor2) + Me.UltraTabPageControl3.Controls.Add(Me.IMESUltraGridControl1) + Me.UltraTabPageControl3.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabPageControl3.Name = "UltraTabPageControl3" + Me.UltraTabPageControl3.Size = New System.Drawing.Size(511, 187) + ' + 'Label1 + ' + Me.Label1.BackColor = System.Drawing.Color.Transparent + Me.Label1.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label1.Location = New System.Drawing.Point(7, 11) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(90, 16) + Me.Label1.TabIndex = 159 + Me.Label1.Text = "Material No" + ' + 'UltraTextEditor1 + ' + Me.UltraTextEditor1.Location = New System.Drawing.Point(103, 7) + Me.UltraTextEditor1.Name = "UltraTextEditor1" + Me.UltraTextEditor1.Size = New System.Drawing.Size(132, 21) + Me.UltraTextEditor1.TabIndex = 158 + ' + 'Label2 + ' + Me.Label2.BackColor = System.Drawing.Color.Transparent + Me.Label2.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label2.Location = New System.Drawing.Point(244, 11) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(90, 16) + Me.Label2.TabIndex = 157 + Me.Label2.Text = "Material Lot No" + ' + 'UltraTextEditor2 + ' + Me.UltraTextEditor2.Location = New System.Drawing.Point(340, 7) + Me.UltraTextEditor2.Name = "UltraTextEditor2" + Me.UltraTextEditor2.Size = New System.Drawing.Size(132, 21) + Me.UltraTextEditor2.TabIndex = 156 + ' + 'IMESUltraGridControl1 + ' + Me.IMESUltraGridControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.IMESUltraGridControl1.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.IMESUltraGridControl1.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.IMESUltraGridControl1.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.IMESUltraGridControl1.Identity = "IMes" + Me.IMESUltraGridControl1.IdentityForm = "" + Me.IMESUltraGridControl1.LayOutFilePath = "" + Me.IMESUltraGridControl1.Location = New System.Drawing.Point(2, 35) + Me.IMESUltraGridControl1.Name = "IMESUltraGridControl1" + Me.IMESUltraGridControl1.PrintFitWidthToPages = 0 + Me.IMESUltraGridControl1.PrintLandscape = True + Me.IMESUltraGridControl1.PrintPageFooter = "" + Me.IMESUltraGridControl1.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.IMESUltraGridControl1.PrintPageFooterHeight = 20 + Me.IMESUltraGridControl1.PrintPageHeader = "" + Me.IMESUltraGridControl1.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.IMESUltraGridControl1.PrintPageHeaderHeight = 20 + Me.IMESUltraGridControl1.PrintZoom = 1.0R + Me.IMESUltraGridControl1.Size = New System.Drawing.Size(506, 148) + Me.IMESUltraGridControl1.TabIndex = 108 + Me.IMESUltraGridControl1.UserNo = "IMes" + ' + 'UltraTabSharedControlsPage2 + ' + Me.UltraTabSharedControlsPage2.Location = New System.Drawing.Point(-10000, -10000) + Me.UltraTabSharedControlsPage2.Name = "UltraTabSharedControlsPage2" + Me.UltraTabSharedControlsPage2.Size = New System.Drawing.Size(511, 187) + ' + 'UltraTabControl2 + ' + Me.UltraTabControl2.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.UltraTabControl2.Controls.Add(Me.UltraTabPageControl3) + Me.UltraTabControl2.Location = New System.Drawing.Point(0, 0) + Me.UltraTabControl2.Name = "UltraTabControl2" + Me.UltraTabControl2.SharedControlsPage = Me.UltraTabSharedControlsPage2 + Me.UltraTabControl2.Size = New System.Drawing.Size(200, 100) + Me.UltraTabControl2.TabIndex = 0 + ' + 'WsEAI1 + ' + Me.WsEAI1.Credentials = Nothing + Me.WsEAI1.Url = "http://localhost/EAI/wsEAI.asmx" + Me.WsEAI1.UseDefaultCredentials = False + ' + 'frmBR_L_CI_GEN + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14) + Me.ClientSize = New System.Drawing.Size(1008, 729) + Me.Controls.Add(Me.uplAll) + Me.Controls.Add(Me.btnSWR) + Me.Controls.Add(Me.chkUpdCheckInTime) + Me.Controls.Add(Me.btnOperator) + Me.Controls.Add(Me.btnMultiUser) + Me.Controls.Add(Me.dtpcheckintime) + Me.Controls.Add(Me.txtLotRecord) + Me.Controls.Add(Me.lblLotRecord) + Me.Controls.Add(Me.btnClose) + Me.Controls.Add(Me.btnConfirm) + Me.Controls.Add(Me.SBar1) + Me.Controls.Add(Me.lblupdcheckintime) + Me.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.MinimizeBox = False + Me.Name = "frmBR_L_CI_GEN" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "General Check In" + Me.utpMaterial.ResumeLayout(False) + Me.utpMaterial.PerformLayout() + CType(Me.txtMaterialNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtMaterialLotNo, System.ComponentModel.ISupportInitialize).EndInit() + Me.utpSubOP.ResumeLayout(False) + Me.utpKzxx.ResumeLayout(False) + CType(Me.uegLotInfo, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegLotInfo.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel1.ResumeLayout(False) + Me.UltraPanel1.ClientArea.ResumeLayout(False) + Me.UltraPanel1.ResumeLayout(False) + Me.gbxLotInfo.ResumeLayout(False) + Me.gbxLotInfo.PerformLayout() + CType(Me.txtOpName, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtOPNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtProductNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCustomerLotNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtMONo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtShiftNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtEmployeeNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtAreaNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtPriority, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSysUnitNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSysQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCurUnitNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCurQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtOPDescription, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtLotNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel3, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel4, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtEquipmentNo, System.ComponentModel.ISupportInitialize).EndInit() + Me.utpEquipment.ResumeLayout(False) + Me.uplAttrib.ClientArea.ResumeLayout(False) + Me.uplAttrib.ResumeLayout(False) + Me.uplEquipment.ClientArea.ResumeLayout(False) + Me.uplEquipment.ClientArea.PerformLayout() + Me.uplEquipment.ResumeLayout(False) + Me.uplAttrib_Equipment.ClientArea.ResumeLayout(False) + Me.uplAttrib_Equipment.ResumeLayout(False) + Me.uplMaterial_KeyIn.ClientArea.ResumeLayout(False) + Me.uplMaterial_KeyIn.ResumeLayout(False) + Me.uplKeyIn.ClientArea.ResumeLayout(False) + Me.uplKeyIn.ResumeLayout(False) + Me.uplMaterial.ClientArea.ResumeLayout(False) + Me.uplMaterial.ResumeLayout(False) + CType(Me.UltraTabControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.UltraTabControl1.ResumeLayout(False) + Me.uplAll.ClientArea.ResumeLayout(False) + Me.uplAll.ResumeLayout(False) + CType(Me.uegMaterial_KeyIn2, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegMaterial_KeyIn2.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel4.ResumeLayout(False) + Me.UltraPanel4.ClientArea.ResumeLayout(False) + Me.UltraPanel4.ResumeLayout(False) + CType(Me.uegAttrib_Equipment, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegAttrib_Equipment.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel2.ResumeLayout(False) + Me.UltraPanel2.ClientArea.ResumeLayout(False) + Me.UltraPanel2.ResumeLayout(False) + Me.UltraTabPageControl3.ResumeLayout(False) + Me.UltraTabPageControl3.PerformLayout() + CType(Me.UltraTextEditor1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.UltraTextEditor2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.UltraTabControl2, System.ComponentModel.ISupportInitialize).EndInit() + Me.UltraTabControl2.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + +#End Region + + Private Sub frmBR_L_CI_GEN_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load + + Cursor.Current = Cursors.WaitCursor + + Dim editorSettings As New Infragistics.Win.UltraWinEditors.DefaultEditorOwnerSettings + editorSettings.DataType = GetType(System.DateTime) + editorSettings.MaskInput = "yyyy/mm/dd hh:mm:ss" + editor = New Infragistics.Win.DateTimeEditor(New Infragistics.Win.UltraWinEditors.DefaultEditorOwner(editorSettings)) + + vlMaterialLevel = COM_Utility.ValueListProvider.GetInstance.GetValueList("TBLWIPTEMP_MATERIAL", "MATERIALLEVEL") + + '20240119 21681 + vlKzTable = COM_Utility.ValueListProvider.GetInstance.GetValueList("TBLWIPKZTABLE_21681", "SELECTFLAG") + + btnConfirm.Enabled = False + btnMultiUser.Enabled = False + + '2017/11/06 KunYuan:變更開始加工時間checkbox預設不勾選 + chkUpdCheckInTime.Checked = False + + If LotNo = defString Or UserId = defString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%LotNo%] [%or%] [%UserId%] [%CANNOTBEEMPTY%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + ' 2016/01/05 YF, 左下角的時間預設為AP SERVER的時間 + Me.datEventTime = funGetAPServerTime() + + '1.取出生產批資訊 -------------------------------------------------------------------------------------------- + If funLoadLotState() Then Exit Sub + + If blnByEQP = True Then + txtMaterialNo.Enabled = False + txtMaterialLotNo.Enabled = False + End If + + If dsWIP.Tables(tblLotState).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200003", "[%LotNo%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + If funGetShift() Then Exit Sub + If funLoadTemp_AttribJoinBasis() Then Exit Sub + If funLoadTemp_Material() Then Exit Sub + + txtLotNo.Text = LotNo + txtEmployeeNo.Text = UserId + Call funLotInfo_Show() + + '2.機台 ------------------------------------------------------------------------------------------------------- + + '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + '0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 2023/07/20, 19245 + 'Dim intAvailable As Integer + 'If funGetSysParameter("RMS TYPE") = "0" Then '使用舊版設備配件 + 'intAvailable = funLoadAvailableEquipment(LotNo) + 'Else '使用設備配方 + ' intAvailable = funLoadAvailableEquipmentInfo(LotNo) + 'End If + + 'If intAvailable < 0 Then + If funLoadAvailableEquipment(LotNo) < 0 Then + Call btnClose_Click(sender, e) '清除trigger OP紀錄 + Me.Dispose() + Exit Sub + Else + If EquipmentNo = defString Then + dsWIP.Tables(tblAreaEquipment).DefaultView.Sort = "EquipmentType, EquipmentNo" + Else '有指定機台,要強制使用. + Dim drSel As DataRow() + drSel = dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo='" & EquipmentNo & "'") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%EquipmentNo%]:" & EquipmentNo & " [%is not in area%]:" & txtAreaNo.Text & "!"), MsgBoxStyle.Exclamation, Me.Text) + Call btnClose_Click(sender, e) '清除trigger OP紀錄 + Me.Dispose() + Exit Sub + Else + If drSel(0)("AllowExecute") = 1 Then '可使用 + + drSel(0).BeginEdit() + drSel(0)("CheckFlag") = True + If LoadPort <> defInteger Then drSel(0)("LoadPort") = LoadPort + drSel(0).EndEdit() + '強制使用機台,故不提供此功能 + txtEquipmentNo.Enabled = False + Else '不可使用 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%EquipmentNo%]:" & EquipmentNo & " [%is not available%] " & drSel(0)("Description")), MsgBoxStyle.Exclamation, Me.Text) + Call btnClose_Click(sender, e) '清除trigger OP紀錄 + Me.Dispose() + Exit Sub + End If + End If + drSel = Nothing + End If + iugEquipment.iMESUltraGrid.DataSource = dsWIP.Tables(tblAreaEquipment) + + 'Modify on 2008/03/31 By OwenLiu, Auto Focus Assign EquipmentNo + If Not EquipmentNo.Equals(defString) Then + Dim ugrRow As Infragistics.Win.UltraWinGrid.UltraGridRow + ugrRow = FindRecordPosition(iugEquipment, "EquipmentNo", EquipmentNo) + If Not ugrRow Is Nothing Then + iugEquipment.iMESUltraGrid.ActiveRow = ugrRow + End If + End If + + '2021/3/18,Ning,點檢表檢查方式已調整, 不需在此帶入點檢類型 + ' 查詢可用設備,是否有指定點檢表,並將點檢表點檢類型帶入 + 'Call funQueryEquipmentQCList() + + '20091006 seam + Call Me.funLoadSubOP() + + '20240118 获取实习生客制信息表 + Call Me.funLoadKzTable() + + End If + + '3.生產參數 ------------------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + '轉換抽樣參數 + If funGetSampleData() Then Exit Sub + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "AttribSource <> 0 And AttribSource <> 1 And (AttribPhase = " & PhaseNo & " Or AttribPhase = 99)" 'Source = Not KeyIn, Not Calculate ,Current and All Phase + iugAttrib.iMESUltraGrid.DataSource = dsWIP.Tables(tblTAttrib).DefaultView + End If + + '4.KeyIn Attrib ---------------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + dtKeyIn = New DataTable("KeyIn") + dtKeyIn.DefaultView.AllowNew = False + dtKeyIn.DefaultView.AllowDelete = False + dtKeyIn.DefaultView.AllowEdit = True + '建立KeyIn Table的欄位 + dtKeyIn.Columns.Add("AttribNo", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribName", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribValue", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribSequence", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("InputType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("DataType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("ValueType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("QCItemNo", System.Type.GetType("System.String")) '2015-12-18, Joe, Add + dtKeyIn.Columns.Add("OrgAttribValue", GetType(String)) + + '取出KeyIn Attrib + For Each dr As DataRow In dsWIP.Tables(tblTAttrib).Rows + '將資料存入KeyIn Table + If dr("AttribSource") = 0 AndAlso (dr("AttribPhase") = PhaseNo OrElse dr("AttribPhase") = 99) Then + drAdd = dtKeyIn.NewRow() + drAdd("AttribNo") = dr("AttribNo") + drAdd("AttribName") = dr("AttribName").ToString + drAdd("AttribSequence") = dr("AttribSequence") + drAdd("AttribValue") = dr("AttribValue") + drAdd("InputType") = dr("InputType") + drAdd("DataType") = dr("DataType") + drAdd("ValueType") = dr("ValueType") + drAdd("QCItemNo") = dr("QCItemNo") '2015-12-18, Joe, Add + drAdd("OrgAttribValue") = dr("OrgAttribValue") ' 2016/01/27 YF, 未轉換函式的特性值 + dtKeyIn.Rows.Add(drAdd) + End If + Next + + iugKeyIn.iMESUltraGrid.DataSource = dtKeyIn.DefaultView + + End If + + '5.物料 ----------------------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTMaterial) Is Nothing Then + '获取当前工单的物料清单 新设备上料14278 + Call funLoadMOMaterialList(txtMONo.Text, txtOPNo.Text) + + 'Kevin 2013/1/2,加入替代料處理 + Dim drData As DataRow + Dim drSelMaterialNo As DataRow() + For i As Integer = dsWIP.Tables(tblTMaterial).Rows.Count - 1 To 0 Step -1 + '取得用料清單 + If funLoadSubstituteMaterial_Main(dsWIP.Tables(tblTMaterial).Rows(i)("LotNo"), dsWIP.Tables(tblTMaterial).Rows(i)("MaterialNo"), dsWIP.Tables(tblTMaterial).Rows(i)("UnitNo")) < 0 Then Exit Sub + For Each dr As DataRow In dsWIP.Tables(tblSubstituteMaterial).Rows + drSelMaterialNo = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & dr("MaterialNo") & "' And OrgMaterialNo = '" & dr("OrgMaterialNo") & "'") + If drSelMaterialNo.Length = 0 Then + drData = dsWIP.Tables(tblTMaterial).NewRow + drData("OrgMaterialNo") = dsWIP.Tables(tblTMaterial).Rows(i)("MaterialNo") '紀錄原來的主物料 + drData("MaterialNo") = dr("MaterialNo") + drData("MaterialType") = dr("SubstituteMaterialType") + drData("MaterialLevelShow") = dr("SubstituteMaterialLevel") + drData("CheckLotNo") = dr("CheckLotNo") + drData("PutInPlaceType") = dr("SubstitutePutInPlaceType") + drData("StdQty") = dr("SubstituteStdQty") + drData("StdUseQty") = Format(dsWIP.Tables(tblLotState).Rows(0)("CurQty") * dr("SubstituteStdQty") * (1 + dsWIP.Tables(tblTMaterial).Rows(i)("DecreaseRate")), "0.######") + drData("DecreaseRate") = dsWIP.Tables(tblTMaterial).Rows(i)("DecreaseRate") + drData("UnitNo") = dsWIP.Tables(tblTMaterial).Rows(i)("UnitNo") + dsWIP.Tables(tblTMaterial).Rows.Add(drData) + End If + Next + Next + + '產生MaterilaLotNo暫存表 + dtTmpMTLLotNo = New DataTable("TmpMTLLotNo") + dtTmpMTLLotNo.Columns.Add("EquipmentNo", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("OrgMaterialNo", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("MaterialNo", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("SUBSTITUTEMATERIALNO", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtTmpMTLLotNo.Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dtTmpMTLLotNo.Columns("Qty").DefaultValue = 0 + dsWIP.Tables.Add(dtTmpMTLLotNo) + tblTmpMTLLotNo = "TmpMTLLotNo" + dsWIP.Tables(tblTmpMTLLotNo).DefaultView.Sort = "MaterialLotNo" + + 'Data(Relation) + Dim parentCol(0) As DataColumn + Dim childCol(0) As DataColumn + parentCol(0) = dsWIP.Tables(tblTMaterial).Columns("MaterialNo") + childCol(0) = dsWIP.Tables(tblTmpMTLLotNo).Columns("OrgMaterialNo") + '建立主從關係(RelationName會影響WinForm資料的顯示) + + Dim tmpRe1 As DataRelation + tmpRe1 = New DataRelation("MTLLotNo", parentCol, childCol, False) + dsWIP.Relations.Add(tmpRe1) + + iugMaterial.iMESUltraGrid.DataSource = dsWIP.Tables(tblTMaterial) + iugMaterial.iMESUltraGrid.Rows.ExpandAll(True) + End If + + '6.OP Description-------------------------------------------------------------------------------------------------- + If funGetOPDescription(LotNo) Then Exit Sub + + '多人加上 + If funMultiUser() < 0 Then Exit Sub + + '7.Initialize + Call funInitialize() + + '2019/09/06 Eric 取出系統參數GumMaterialType 哪些物料是屬於固晶膠類 + Dim strGumMaterialType As String = funLoadParameter("GumMaterialType") + blnGumMaterialType = (strGumMaterialType <> "") + aryGumMaterialType = If((strGumMaterialType <> ""), Split(strGumMaterialType, ","), {}) + + Call funLoadAllMaterialLot() + + '8.語系切換 + Call ExeChangeResource(Me, gLanguageMode) + + txtEquipmentNo.Focus() + btnSWR.Visible = False + + '判斷系統參數EnableSWR_CICO 0:否 1:是 + Dim strEnableSWR_CICO As String = funLoadParameter("EnableSWR_CICO") + If strEnableSWR_CICO = "1" Then '系統參數EnableSWR_CICO為1才需要顯示特殊生產需求 + + '2019/02/12 Eric 無資料不顯示SWR視窗 + Call funLoadSWRJoinLog() + If dsWIP.Tables(tblSWRJoinLog).Rows.Count > 0 Then + + blnShowSWR = True + + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("MONo", txtMONo.Text) + Parameters.Add("CustomerLotNo", txtCustomerLotNo.Text) + Parameters.Add("OPNo", txtOPNo.Text) + Parameters.Add("LotNo", txtLotNo.Text) + Parameters.Add("DeviceNo", dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString) + Parameters.Add("CustomerNo", dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString) + Parameters.Add("LogGroupSerial", dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString) + Parameters.Add("blnCICo", True) + Me.ObjectFileHandler.Execute("WP_SWRBasisRead", Parameters) + + End If + + btnSWR.Visible = True + + End If + + ExeGroupControlPriv(Me, PrivFunNo) + Cursor.Current = Cursors.Default + + End Sub + + Private Sub frmBR_L_CI_GEN_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated + + txtEquipmentNo.Focus() + + End Sub + + Private Sub frmBR_L_CI_GEN_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing + + If Not dsWIP Is Nothing Then dsWIP.Dispose() + If Not dtKeyIn Is Nothing Then dtKeyIn.Dispose() + + '2019/12/17 OwenLiu, Mantis:0063698, 修正強制關閉企業邏輯,未正確執行ReverseTriggerOP的問題 + 'Call ExeReverseTriggerOP(UserId, LotNo, RevLotSerial, RevLotStamp) + '2020/3/17,Ning,不啟用Reverse時的ReverseTriggerOP + Call ExeReverseTriggerOP_NotUseUndo(UserId, LotNo, RevLotSerial, RevLotStamp) + End Sub + + +#Region "Button Events" + + Private Sub btnQCList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQCList.Click + + If Not dsWIP.Tables(tblAreaEquipment).Rows.Count > 0 Then + Exit Sub + End If + + 'Modify on 2008/03/31, By OwenLiu, + + '先取得Actve Row + Dim drSel() As DataRow + drSel = funGetActiveRows() + + If drSel Is Nothing Then Exit Sub + + '檢查設備是否可使用 + If drSel(0)("AllowExecute") <> 1 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203064", "[%Equipment%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '檢查是否有定義機台點檢表 + If drSel(0)("QCListNo") Is DBNull.Value Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%QCListNo%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '檢查是否有被勾選 + If Not drSel(0)("CheckFlag") Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%Please select%] [%Equipment%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '檢查是否已點檢完成 + If Not drSel(0)("QCFinish") Is DBNull.Value Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%Equipment%] [%FINISHED%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '自動開立點檢務單 + Call funCheckEQPQCTask(drSel(0)("EquipmentNo")) + + '開始處理設備點檢 + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Me.ObjectFileHandler.Execute(pObjectID:="WP_EQPCheckQCList", + pParameters:=Nothing, + pArgs:=New Object() { + drSel(0)("EquipmentNo"), LotNo, LotSerial, LogGroupSerial}) + + End Sub + + Private Sub btnConfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirm.Click + + Dim strResult As String + + Cursor.Current = Cursors.WaitCursor + + '1.基本檢查---------------------------------------------------------------------------------------------------------- + Dim drSel() As DataRow + Dim drSelAcc As DataRow() + If dsWIP.Tables(tblAreaEquipment).Rows.Count > 0 Then + drSel = dsWIP.Tables(tblAreaEquipment).Select("AllowExecute=1") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203064", "[%Equipment%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + Else + drSel = dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%Please select%] [%Equipment%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + Else + '檢查所有勾選的設備是否完成設備點檢 + For i As Integer = 0 To drSel.Length - 1 + '2021/3/17,Ning,87547: [6.0.5] 設備點檢支援可設定頻率_生產批進站設備點檢查核調整 + Call funCheckEQPQCList(drSel(i)("EquipmentNo"), strResult) + If strResult <> "success" Then + '有設備未完成點檢 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103011", "[%EQP QCList OnLine Check%]" & vbCrLf & strResult & vbCrLf & "[%has not been completed%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + Next + + '2013/12/25,Kevin,有顯示模治具才檢查 + If Not dsWIP.Tables("AccState") Is Nothing Then + '如有設定產品-作業站-模治具,則這些模治具都一定要被選 + If Not dsWIP.Tables("PRDAccessory") Is Nothing Then + If dsWIP.Tables("PRDAccessory").Rows.Count > 0 Then + Dim drAccState As DataRow() + Dim blnPRDAcc As Boolean = False '是否有產品設定的模治具 + Dim strAccessoryType As String = "" + Dim aryShowAccNo As New ArrayList + Dim aryShowAccType As New ArrayList + Dim blnAllowExecute As Boolean = True + Dim strDesc As String = "" + + For Each dr As DataRow In drSel + blnPRDAcc = False + strAccessoryType = "" + aryShowAccNo.Clear() + aryShowAccType.Clear() + blnAllowExecute = True + strDesc = "" + + drAccState = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "' And Select = True") + If drAccState.Length > 0 Then + '檢查設備是否都有掛產品指定之模治具,相同類別允許掛多個,但至少要有一個 + For Each drPRD As DataRow In dsWIP.Tables("PRDAccessory").Rows + + '檢查是否是同個模治具類別 + If strAccessoryType = drPRD("AccessoryType") Then + If blnPRDAcc Then + '如果已有產品設定的模治具則跳至下一筆 + GoTo lblAccCheck + End If + Else + '第一個物料類別不判斷blnPRDAcc + If strAccessoryType <> "" Then + '不同模治具類別時,如果上個模治具類別沒有符合的資料,則此設備不可用 + If blnPRDAcc = False Then + '只要有一種類別模治具不符合就是False + blnAllowExecute = False + End If + End If + + '記錄此次模治具類別 + strAccessoryType = drPRD("AccessoryType") + End If + + If drPRD("AccessoryNo") = "*" Then + '如果模治具編號為*代表只有指定模治具類別 + For Each drAcc As DataRow In drAccState + If drAcc("AccessoryType") = drPRD("AccessoryType") Then + '有符合的代表有掛指定的模治具類別 + blnPRDAcc = True + '移除此次加入的類別 + aryShowAccType.Remove(drPRD("AccessoryType")) + '有符合一筆即可 + GoTo lblAccCheck + Else + blnPRDAcc = False + If Not aryShowAccType.Contains(drPRD("AccessoryType")) Then + aryShowAccType.Add(drPRD("AccessoryType")) + End If + End If + Next + Else + '如果模治具編號不為*代表有指定模治具 + For Each drAcc As DataRow In drAccState + If drAcc("AccessoryType") = drPRD("AccessoryType") AndAlso drAcc("AccessoryNo") = drPRD("AccessoryNo") Then + '有符合的代表有掛指定的模治具類別 + blnPRDAcc = True + '移除此次加入的編號 + aryShowAccNo.Remove(drPRD("AccessoryNo")) + '有符合一筆即可 + Exit For + Else + blnPRDAcc = False + If Not aryShowAccNo.Contains(drPRD("AccessoryNo")) Then + aryShowAccNo.Add(drPRD("AccessoryNo")) + End If + End If + Next + End If +lblAccCheck: + Next + + '多判斷一次最後一個類別 + If blnPRDAcc = False Then + '只要有一種類別模治具不符合就是False + blnAllowExecute = False + End If + + If blnAllowExecute = False Then + If aryShowAccType.Count > 0 Then + strDesc += vbCrLf & "[%AccessoryType%]:" + For k As Integer = 0 To aryShowAccType.Count - 1 + strDesc += aryShowAccType(k) & "," + Next + strDesc = strDesc.TrimEnd(",") + End If + If aryShowAccNo.Count > 0 Then + strDesc += vbCrLf & "[%AccessoryNo%]:" + For k As Integer = 0 To aryShowAccNo.Count - 1 + strDesc += aryShowAccNo(k) & "," + Next + strDesc = strDesc.TrimEnd(",") + End If + + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%EquipmentNo%]:" & dr("EquipmentNo") & "[%ISNOTSELECTED%][%Product%][%Setup%][%Accessory%]" & strDesc), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + Else + '設備沒掛模治具就一定沒有掛設定的必需模治具 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%EquipmentNo%]:" & dr("EquipmentNo") & "[%ISNOTSELECTED%][%Accessory%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + Next + End If + End If + End If + End If + End If + End If + + If funGetSysParameter("CIMTLDBCheck") = "1" Then + If dsWIP.Tables(tblTMaterial).Rows.Count > 0 Then + If Not funCheckMTL() Then GoTo lblExitProcedure + End If + End If + + '2023/06/07 ,0135702: [6.0.7] SDD220425_01-03_進站設備派工查核調整,19245 + Try + Dim strEQP As String = "" + For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + strEQP += dr("EquipmentNo").ToString() & "," + Next + If (strEQP <> "") Then + strEQP = strEQP.TrimEnd(",") + Else + strEQP = defString + End If + Call ChkCIEQPDispatch(strEQP, txtLotNo.Text) + + Dim showMSG As String = "" + Dim arrayMsg As New ArrayList + If Not IsNothing(dsEQP) Then + For i = 0 To dsEQP.Tables.Count - 1 + If dsEQP.Tables(i).Rows.Count > 0 Then + For Each drEQP As DataRow In dsEQP.Tables(i).Rows + If drEQP("Result").ToString <> "Success" Then + arrayMsg.Add(ChgTranslateName_Content(drEQP("Description").ToString)) + End If + Next + End If + Next + If arrayMsg.Count > 0 Then + If funGetSysParameter("LotEQPDispatchLimit") = "1" Then '進站是否卡控生產批派工 參數為1 + '是否確定執行? + For i As Integer = 0 To arrayMsg.Count - 1 + showMSG += arrayMsg(i).ToString() & vbCrLf + Next + If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100004", showMSG), MsgBoxStyle.OkCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, Me.Text) = MsgBoxResult.Cancel Then + GoTo lblExitProcedure + End If + Else + '進站失敗,失敗原因:不滿足規則xx + showMSG = ChgTranslateName_Content("[%CHECK IN FAILED%], [%REASONS FOR FAILURE%]: [%Failure to meet rules%] " & vbCrLf) + For i As Integer = 0 To arrayMsg.Count - 1 + showMSG += arrayMsg(i).ToString() & vbCrLf + Next + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Content(showMSG), MsgBoxStyle.Critical, Me.Text) + GoTo lblExitProcedure + End If + End If + End If + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + End Try + + + '2020/02/26 Grace Mantis 67753 取得此批號於此作業站上的派工資料 + Call funLoadWIPEQPDispatchState(LotNo:=LotNo, OPNo:=txtOPNo.Text) + + If Not IsNothing(dsTemp.Tables(tblEQPDispatchState)) Then + If dsTemp.Tables(tblEQPDispatchState).Rows.Count > 0 Then + Dim aryMsg As New ArrayList + Dim strCheckInDate As String = Now.ToString("yyyy/MM/dd") 'Check In 日期 + If chkUpdCheckInTime.Checked Then strCheckInDate = dtpcheckintime.Value.ToString("yyyy/MM/dd") + + '2020/03/02 Grace Mantis 67753, 68192 檢查所選擇的設備是否有相符的派工資料 + For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + + '1. 檢查是否有派工設備 + Dim drSelEQP As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & dr("EquipmentNo").ToString() & "'") + If drSelEQP.Count > 0 Then + '1-2. 有派工設備, 檢查派工設備的派工日期是否符合 + Dim iCount As Integer = 0 + Dim strDisDate As String = "" + For Each dr2 As DataRow In dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & dr("EquipmentNo").ToString() & "'", "DispatchOrder") + If Convert.ToDateTime(dr2("DispatchDate")).ToString("yyyy/MM/dd") = strCheckInDate Then + iCount += 1 + Exit For + Else + If strDisDate = "" Then strDisDate = Convert.ToDateTime(dr2("DispatchDate")).ToString("yyyy/MM/dd") + End If + Next + + If iCount > 0 Then + '1-2-1. 派工日期符合, 不顯示訊息 + Else + '1-2-2. 派工日期不符合, 顯示訊息 + '選擇的設備於[checkin日期]未派工, 設定的派工日期為[DispatchDate] + aryMsg.Add(ChgTranslateName_Content("[%EQUIPMENTNO%]:" & dr("EquipmentNo").ToString() & ", [%SelectedEQPAt%]" & strCheckInDate & "[%NoDispatch%], [%ActualDispatchDate%]" & strDisDate)) + End If + '2020/11/05 Mantis:0081316:納標調整,派工順序卡控 + If dr("DispatchOrder").ToString <> "1" Then + aryMsg.Add(ChgTranslateName_Content("[%EQUIPMENTNO%]:" & dr("EquipmentNo").ToString() & ", [%DispatchOrder is not top priority%]")) + 'MsgBox(ChgTranslateName_Msg("0000-103010", "[%EquipmentNo%]:" & dr("EquipmentNo") & "[%DispatchOrder is not top priority%]"), MsgBoxStyle.Exclamation, Me.Text) + 'GoTo lblExitProcedure + End If + Else + '1-3. 沒有派工設備, 檢查是否有符合的派工日期 + Dim iCount As Integer = 0 + Dim strEQPNo As String = "" + For Each dr4 As DataRow In dsTemp.Tables(tblEQPDispatchState).Rows + If Convert.ToDateTime(dr4("DispatchDate")).ToString("yyyy/MM/dd") = strCheckInDate Then + '若派工日期相符的設備資料並未勾選, 才顯示訊息 + If dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True & " And EquipmentNo = '" & dr4("EquipmentNo") & "'").Count = 0 Then + iCount += 1 + strEQPNo = dr4("EquipmentNo") + Exit For + End If + End If + Next + + If iCount > 0 Then + '1-3-1. 派工日期符合, 顯示訊息 + '選擇的設備與派工設備不同 + aryMsg.Add(ChgTranslateName_Content("[%EQUIPMENTNO%]:" & dr("EquipmentNo").ToString() & ", " & "[%SelectedEQPDispatchNotMatch%]!" & vbCrLf & "[%EQPDispatch%]:" & strEQPNo)) + Else + '1-3-2. 派工日期不符合, 顯示訊息 + '生產批號於作業站上無任何派工資料 + aryMsg.Add(ChgTranslateName_Content("[%EQUIPMENTNO%]:" & dr("EquipmentNo").ToString() & ", [%AT%][%OP%]: " & txtOPNo.Text & " [%NoDispatchData%]")) + End If + End If + Next + + '若有錯誤訊息, 一次顯示 + If aryMsg.Count > 0 Then + Dim strMsgMix As String = "" + For i As Integer = 0 To aryMsg.Count - 1 + strMsgMix += aryMsg(i).ToString() & vbCrLf & vbCrLf + Next + If strMsgMix.Length > 0 Then + strMsgMix = strMsgMix & ChgTranslateName_Content("[%Sure2Confirm%]?") '是否確定執行? + + If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100004", strMsgMix), MsgBoxStyle.OkCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, Me.Text) = MsgBoxResult.Cancel Then + GoTo lblExitProcedure + End If + End If + End If + Else + '2020/05/08 Eric 註解派工提示訊息 + ''是否確定 / 生產批號(" & LotNo & ") 於作業站(" & txtOPNo.Text & ") 上無任何派工資料, 是否確定執行? + 'If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100004", "[%LOTNO%](" & LotNo & ") [%AT%][%OP%](" & txtOPNo.Text & ") [%NoDispatchData%], [%Sure2Confirm%]?"), MsgBoxStyle.OkCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, Me.Text) = MsgBoxResult.Cancel Then + ' GoTo lblExitProcedure + 'End If + End If + Else + '2020/05/08 Eric 註解派工提示訊息 + ''是否確定 / 生產批號(" & LotNo & ") 於作業站(" & txtOPNo.Text & ") 上無任何派工資料, 是否確定執行? + 'If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100004", "[%LOTNO%](" & LotNo & ") [%AT%][%OP%](" & txtOPNo.Text & ") [%NoDispatchData%], [%Sure2Confirm%]?"), MsgBoxStyle.OkCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, Me.Text) = MsgBoxResult.Cancel Then + ' GoTo lblExitProcedure + 'End If + End If + + Dim strMTLLot As String = "" + For Each dr As DataRow In dsWIP.Tables(tblTmpMTLLotNo).Rows + strMTLLot += CombineXMLValueTag(CombineXMLValue("materialno", dr("MaterialNo")) & + CombineXMLValue("materiallotno", dr("MaterialLotNo"))) + Next + + '2.格式化資料Attrib----------------------------------------------------------------------------------------------- + Dim strAttrib As String = "" + Dim strTemp As String + + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "(AttribPhase = " & PhaseNo & " or AttribPhase = 99) And AttribSource <> 0" 'CurPhase & All的所有Attrib,除了KeyIn + For i As Integer = 0 To dsWIP.Tables(tblTAttrib).DefaultView.Count - 1 + strTemp = CombineXMLValue("attribno", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribNo"))) & + CombineXMLValue("attribtype", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribType")) & + CombineXMLValue("attribsequence", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribSequence")) & + CombineXMLValue("attribsource", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribSource")) & + CombineXMLValue("attribphase", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribPhase")) & + CombineXMLValue("savetolotpropertyno", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("SaveToLotPropertyNo"))) + If IsDBNull(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribValue")) Then + strTemp += CombineXMLValue("attribvalue", "") + Else + strTemp += CombineXMLValue("attribvalue", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribValue"))) + End If + strAttrib += CombineXMLValueTag(strTemp) + Next + '還原顯示 + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "AttribSource <> 0 And AttribSource <> 1 And (AttribPhase = " & PhaseNo & " or AttribPhase = 99)" 'Source = Not KeyIn, Not Calculate ,CurPhase and All + + 'Temp:Attrib_KeyIn + For i As Integer = 0 To dtKeyIn.Rows.Count - 1 + If IsDBNull(dtKeyIn.Rows(i)("AttribValue")) = True Then + dtKeyIn.Rows(i)("AttribValue") = "" + End If + + ''edit by Zoe,2009/03/17:增加DBNull及Trim的比對 + ''If dtKeyIn.Rows(i)("AttribValue") = "" Then + 'R1102001 改由ChkControlRule時才判斷 By Acer 2011/02/21 + 'If IsDBNull(dtKeyIn.Rows(i)("AttribValue")) OrElse Trim(dtKeyIn.Rows(i)("AttribValue")) = "" OrElse dtKeyIn.Rows(i)("AttribValue") = "" Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%AttribValue%] of [%AttribNo%]:" & dtKeyIn.Rows(i)("AttribNo") & " is empty!!"), MsgBoxStyle.Exclamation, Me.Text) + ' GoTo lblExitProcedure + 'End If + + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo='" & dtKeyIn.Rows(i)("AttribNo") & "'") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203010", "[%AttribNo%]:" & dtKeyIn.Rows(i)("AttribNo")), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + Else + strTemp = CombineXMLValue("attribno", CInput(dtKeyIn.Rows(i)("AttribNo"))) & + CombineXMLValue("attribtype", drSel(0)("AttribType")) & + CombineXMLValue("attribsequence", drSel(0)("AttribSequence")) & + CombineXMLValue("attribsource", drSel(0)("AttribSource")) & + CombineXMLValue("attribphase", drSel(0)("AttribPhase")) & + CombineXMLValue("attribvalue", CInput(dtKeyIn.Rows(i)("AttribValue"))) & + CombineXMLValue("savetolotpropertyno", CInput(drSel(0)("SaveToLotPropertyNo"))) + '2015-12-18, Joe, Add QCItemNo + If IsDBNull(drSel(0)("QCItemNo")) Then + strTemp += CombineXMLValue("qcitemno", "") + Else + strTemp += CombineXMLValue("qcitemno", CInput(drSel(0)("QCItemNo"))) + End If + strAttrib += CombineXMLValueTag(strTemp) + End If + Next + End If + + '3.格式化資料Equipment----------------------------------------------------------------------------------------------- + Dim strEquipment As String = "" + + '只有一筆 + + drSel = dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + If dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString = "1" AndAlso drSel.Length > 1 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103010", "[%MATERIALOPTIONISEQP%], [%Only Support One Equipment To Select%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + + 'Modify On 2007/11/30 By OwenLiu, 修正 Equipment 多選後, 仍然只執行第一個設備的Bug + For i As Integer = 0 To drSel.Length - 1 + If IsDBNull(drSel(i)("LoadPort")) Then + strEquipment += CombineXMLValueTag(CombineXMLValue("equipmentno", CInput(drSel(i)("EquipmentNo")))) + If Not ChkWIPEQPConsume(LotNo, CInt(Me.txtCurQty.Text), UserId, drSel(i)("EquipmentNo").ToString) Then GoTo lblExitProcedure + Else + If drSel(i)("LoadPort") = -1 Then '代表不選Port. + strEquipment += CombineXMLValueTag(CombineXMLValue("equipmentno", CInput(drSel(i)("EquipmentNo")))) + If Not ChkWIPEQPConsume(LotNo, CInt(Me.txtCurQty.Text), UserId, drSel(i)("EquipmentNo").ToString) Then GoTo lblExitProcedure + Else + strEquipment += CombineXMLValueTag( + CombineXMLValue("equipmentno", CInput(drSel(i)("EquipmentNo"))) & + CombineXMLValue("loadport", drSel(i)("LoadPort"))) + If Not ChkWIPEQPConsume(LotNo, CInt(Me.txtCurQty.Text), UserId, drSel(i)("EquipmentNo").ToString) Then GoTo lblExitProcedure + End If + End If + Next + + '3.格式化資料LOTNOSLC----------------------------------------------------------------------------------------------- + Dim strLotNoBySLC As String = "" + + '当前选中的已被其他生产批使用 + + drSel = dsKz.Tables(tblKzTable).Select("CheckFlag=" & True) + If drSel.Length > 1 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-2168101", "[%ALLOWSELECTONE%], [%Only Support One Row To Select%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + If drSel.Length = 1 Then + If drSel(0)("SelectFlag").ToString = "1" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-2168101", "[%LOTNOBESELECTED%], [%LOTNOBESELECTED%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + End If + + '组数据 + If drSel.Length = 1 Then + strLotNoBySLC += CombineXMLValueTag(CombineXMLValue("lotno", CInput(drSel(0)("LotNoBySLC")))) + ElseIf drSel.Length = 0 Then + strLotNoBySLC += defString + End If + + + + '子設備資料 + Dim strEquipmentChamber = String.Empty + If Not dsWIP.Tables("Chamber") Is Nothing Then + drSel = dsWIP.Tables("Chamber").Select("SELECT1 = True") + For Each dr As DataRow In drSel + strEquipmentChamber += CombineXMLValueTag( + CombineXMLValue("equipmentno", CInput(dr("EquipmentNo"))) & + CombineXMLValue("belongequipmentno", dr("BelongEquipmentNo"))) + Next + End If + + '格式化資料Accessory + Dim strAccessory As String = "" + If Not dsWIP.Tables("AccState") Is Nothing Then + drSel = dsWIP.Tables("AccState").Select("Select=" & True) + If drSel.Length > 0 Then + For Each drAcc As DataRow In drSel + strAccessory += CombineXMLValueTag( + CombineXMLValue("equipmentno", CInput(drAcc("EquipmentNo"))) & + CombineXMLValue("accessoryno", CInput(drAcc("AccessoryNo"))) & + CombineXMLValue("accessoryversion", CInput(drAcc("AccessoryVersion"))) & + CombineXMLValue("accessorytype", CInput(drAcc("AccessoryType"))) & + CombineXMLValue("accumulateqty", drAcc("AccumulateQty"))) + Next + End If + End If + + ' 2016/12/27 YF, 取消舊制多人加工 + '3.多人加工----------------------------------------------------------------------------------------------- + 'Dim strLoginState As String = "" + + 'For Each drTmp As DataRow In dtTmpLoginState.Rows + ' 'Kevin,2012/12/18,不取client端的時間作CI時間 + ' If drTmp("CheckInTime").ToString = "" Then + ' drTmp("CheckInTime") = defDateTime + ' End If + ' strLoginState += CombineXMLValueTag( + ' CombineXMLValue("userno", CInput(drTmp("UserNo"))) & + ' CombineXMLValue("username", CInput(drTmp("UserName"))) & + ' CombineXMLValue("checkintime", Format(drTmp("CheckInTime"), "yyyy/MM/dd HH:mm:ss"))) + 'Next + + '4.檢查是否允許執行----------------------------------------------------------------------------------------------- + If ChkLotStamp(LotNo, UserId, dsWIP.Tables(tblLotState).Rows(0)("LotStamp")) < 0 Then GoTo lblExitProcedure + + '5.Control Rule Check -------------------------------------------------------------------------------------------- + Dim strLinkName, strMSG As String + Dim strMailGroupNo As String = "" + Dim strRuleNo As String = defString + Dim intERFType As Integer = defInteger + Dim dsTestValue As DataSet + Dim strERFMsg As String + + If ChkControlRule(LotNo, UserId, dsWIP.Tables(tblLotState).Rows(0)("LotStamp"), + strAttrib, strLinkName, strMSG, strRuleNo, intERFType, strMailGroupNo, , , , dsTestValue) < 0 Then GoTo lblExitProcedure + + '2015-12-17, Joe, Check SPC Contorl + If funChkSPCControl_Var(LotNo, strAttrib, dsTestValue, strLinkName, intERFType, strERFMsg) < 0 Then GoTo lblExitProcedure + strERFMsg = ChgTranslateErrorMsg(strERFMsg) + + '若是Hold詢問是否繼續 + If strLinkName = "HOLD" Then + If iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-100103", "[%Lot%]"), MsgBoxStyle.DefaultButton2 + MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Hold Inquire") = MsgBoxResult.No Then + GoTo lblExitProcedure + End If + End If + + '6.ExecuteCheckIn ------------------------------------------------------------------------------------------------ + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("linkname", "LinkName", "String", CInput(strLinkName), "") + strParameter += CombineXMLParameter("lotstamp", "LotStamp", "Long", dsWIP.Tables(tblLotState).Rows(0)("LotStamp"), "") + strParameter += CombineXMLParameter("shiftno", "ShiftNo", "String", CInput(txtShiftNo.Text), "") + strParameter += CombineXMLParameter("lotrecord", "LotRecord", "String", CInput(txtLotRecord.Text), "") + 'strParameter += CombineXMLParameter("checkintime", "CheckInTime", "String", dtpcheckintime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") '2017/11/06 mark by KunYuan:移至下方處理 + strParameter += CombineXMLParameterMultiValue("attrib", "Attrib", "String", strAttrib, "") + strParameter += CombineXMLParameterMultiValue("equipment", "Equipment", "String", strEquipment, "") + strParameter += CombineXMLParameterMultiValue("equipmentchamber", "EquipmentChamber", "String", strEquipmentChamber, "") + strParameter += CombineXMLParameter("ruleno", "RuleNo", "String", CInput(strRuleNo), "") 'Added by Jialing 2011/02/18 + 'strParameter += CombineXMLParameterMultiValue("loginstate", "LoginState", "String", strLoginState, "") ' 2016/12/27 YF, 取消舊制多人加工 + strParameter += CombineXMLParameterMultiValue("lotnobyslc", "LotNoBySLC", "String", strLotNoBySLC, "") + '2017/11/06 KunYuan:當有勾選『變更開始加工時間』,再傳入CheckInTime + If chkUpdCheckInTime.Checked Then + strParameter += CombineXMLParameter("checkintime", "CheckInTime", "String", dtpcheckintime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") + End If + + '2013/12/25,Kevin,模治具資料有顯示才傳 + If blnGetAccessory Then + strParameter += CombineXMLParameterMultiValue("accessory", "Accessory", "String", strAccessory, "") + End If + '2019/09/06 Eric + If strMTLLot <> "" Then + strParameter += CombineXMLParameterMultiValue("temp_materiallot", "Temp_MaterialLot", "String", strMTLLot, "") + End If + + + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + '2019/06/20 Lena, Mantis: 0058845 [WIP] CI/CO執行時間紀錄 + '新增參數 LogOn = True, 記錄執行時間. + OutXml = InvokeSrv("ABC.wsWIP_21681.Exe_CheckIn", InXml, LogOn:=True) + + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then '找出Exception訊並顯示出來 + '成功執行完成,避免再按下一次 + btnConfirm.Enabled = False + + '2017/11/06 KunYuan:變更開始加工時間checkbox預設不勾選 + chkUpdCheckInTime.Checked = False + + If strLinkName <> "HOLD" And strLinkName <> "WAIT" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-000001", "[%LotNo%]:" & LotNo & " [%Check In%] [%Successfully%]"), MsgBoxStyle.Information, Me.Text) + End If + Else + If GetExceptionCode(XmlDoc) = "IPQCNO" Then + 'ExceptionManager.iMESShowDialog("0000-103021", GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", GetExceptionSysMsg(XmlDoc)), MsgBoxStyle.Information, Me.Text) + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("defLotNo", LotNo) + Me.ObjectFileHandler.Execute("SC_IPQCForm", Parameters) + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + GoTo lblExitProcedure + End If + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + GoTo lblExitProcedure + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + GoTo lblExitProcedure + Finally + End Try + + Me.Close() + + '7.Mail------------------------------------------------------------------------------------------------------------- + '以下的執行,不管成功失敗,都讓FormClose,代表此BR已完成 + + '2016-12-19 add 取得eSOP參數 + Execute_eSOP = funGetSysParameter("Execute_eSOP") + If Execute_eSOP = 1 Then + '讀取eSOP工位及檔案及頁碼 + Call funLoadPRDeSOP() + '顯示作業指導書 + Call funDisplayProcess() + End If + If Execute_eSOP = 2 Then + '組JSON + Dim DataString, ResponsetJson As String + Dim strProductNo, strProductVersion As String + Try + strProductNo = txtProductNo.Text + strProductVersion = dsWIP.Tables(tblLotState).Rows(0)("ProductVersion").ToString + Dim dic As New Dictionary(Of String, String) + dic("userid") = gUserNo + dic("languagemode") = gLanguageMode + dic("computername") = gComputerName + Dim Uri = Newtonsoft.Json.JsonConvert.SerializeObject(dic) + + dic = New Dictionary(Of String, String) + dic("produc_no") = strProductNo + dic("product_ver") = strProductVersion + dic("op_no") = txtOPNo.Text + Dim list As New List(Of String) + Dim rows As DataRow() = dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + If rows.Length > 0 Then + For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag=" & True) + list.Add(dr("EQUIPMENTTYPE")) + Next + dic("eqp_type") = String.Join(""",""", list) + Else + dic("eqp_type") = Nothing + End If + + Dim Content = Newtonsoft.Json.JsonConvert.SerializeObject(dic) + + '呼叫EAI GeteSOPInfo_API + Using wsEAI As New wsEAI.wsEAI + ResponsetJson = wsEAI.GeteSOPInfo_API(Uri, Content) + End Using + + '呼叫WP_eSOPList.dll + Dim Obj As Newtonsoft.Json.Linq.JObject = Newtonsoft.Json.JsonConvert.DeserializeObject(ResponsetJson) + Dim dtResponsetJson As DataTable = JsonConvert.DeserializeObject(Of DataTable)(Obj.Item("ResultJson").ToString) + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("dteSOP", dtResponsetJson) + Me.ObjectFileHandler.Execute("WP_eSOPList", Parameters) + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + End Try + End If + + If strMailGroupNo <> "" Then + Call SendEmailToERFGroup_NoneERF(LotNo, UserId, strMailGroupNo, strMSG, + dsWIP.Tables(tblLotState).Rows(0)("OPNo"), dsWIP.Tables(tblLotState).Rows(0)("OPName"), dsWIP.Tables(tblLotState).Rows(0)("BRNo")) + End If + + + + 'C3:依LinkName決定是否Transfer Lot---------------------------------------------------------------------------------- + '以下的執行,不管成功失敗,都讓FormClose,代表此BR已完成 + '若再執行Confirm一次則不正確,同一BR會執行多次 + '2015-12-21, Joe, 加ERFMsg + Call BRTransferLot(LotNo, UserId, strLinkName, intERFType, strRuleNo, , strERFMsg) + + + gReturnKeyValue = LotNo + + +lblExitProcedure: + + Cursor.Current = Cursors.Default + Exit Sub + + End Sub + + Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click + + Cursor.Current = Cursors.WaitCursor + + Try + '2019/12/17 OwenLiu, Mantis:0063698, ReverseTriggerOP統一呼叫 WIP_Kit共用函式 + 'Call ExeReverseTriggerOP(UserId, LotNo, RevLotSerial, RevLotStamp) + + '2020/3/17,Ning,不啟用Reverse時的ReverseTriggerOP + '2022/9/19,Ning, 116091: 各BR 在畫面關閉動作執行ReverseTriggerOP,若有執行失敗須把訊息顯示:統一在form_closing時處理 + 'Call ExeReverseTriggerOP_NotUseUndo(UserId, LotNo, RevLotSerial, RevLotStamp) + + Catch e1 As Exception + Finally + Me.Close() + End Try + + Cursor.Current = Cursors.Default + + + End Sub + + Private Sub btnEQPConsumeReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEQPConsumeReset.Click + + Try + + If Me.iugEquipment.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Me.ObjectFileHandler.Execute(pObjectID:="WP_EQPConsumeReset", + pParameters:=Nothing, + pArgs:=New Object() { + Me.iugEquipment.iMESUltraGrid.ActiveRow.Cells("EquipmentNo").Value.ToString}) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + Private Sub btnMultiUser_Click(sender As System.Object, e As System.EventArgs) Handles btnMultiUser.Click + + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Dim parameters As New Dictionary(Of String, Object) + parameters.Add("CallType", 1) + parameters.Add("UserID", UserId) + parameters.Add("CheckInTime", dtpcheckintime.Value) + parameters.Add("drLotInfo", dsWIP.Tables(tblLotState).Rows(0)) + parameters.Add("dtTmpLoginState", dtTmpLoginState) + '2019/10/17 Grace 調整ObjectID + Me.ObjectFileHandler.Execute("WP_OperatorLogIn_Lot", parameters) + + dtTmpLoginState = parameters("dtTmpLoginState") + + End Sub + + +#End Region + + Protected Overrides Sub Finalize() + MyBase.Finalize() + End Sub + +#Region "Control Enter,KeyPress" + + Private Sub txtLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLotNo.Enter + txtLotNo.SelectAll() + End Sub + Private Sub txtLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtLotNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtPriority_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPriority.Enter + txtPriority.SelectAll() + End Sub + Private Sub txtPriority_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtPriority.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtAreaNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtAreaNo.Enter + txtAreaNo.SelectAll() + End Sub + Private Sub txtAreaNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtAreaNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCurQty_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCurQty.Enter + txtCurQty.SelectAll() + End Sub + Private Sub txtCurQty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCurQty.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCurUnitNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCurUnitNo.Enter + txtCurUnitNo.SelectAll() + End Sub + Private Sub txtCurUnitNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCurUnitNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtSysQty_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSysQty.Enter + txtSysQty.SelectAll() + End Sub + Private Sub txtSysQty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSysQty.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtSysUnitNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSysUnitNo.Enter + txtSysUnitNo.SelectAll() + End Sub + Private Sub txtSysUnitNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSysUnitNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtOPNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOPNo.Enter + txtOPNo.SelectAll() + End Sub + Private Sub txtOPNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtOPNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtOPDescription_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOPDescription.Enter + txtOPDescription.SelectAll() + End Sub + Private Sub txtOPDescription_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtOPDescription.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCustomerLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCustomerLotNo.Enter + txtCustomerLotNo.SelectAll() + End Sub + Private Sub txtCustomerLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCustomerLotNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtMONo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMONo.Enter + txtMONo.SelectAll() + End Sub + Private Sub txtMONo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMONo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtEmployeeNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEmployeeNo.Enter + txtEmployeeNo.SelectAll() + End Sub + Private Sub txtEmployeeNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtEmployeeNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtShiftNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtShiftNo.Enter + txtShiftNo.SelectAll() + End Sub + Private Sub txtShiftNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtShiftNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtLotRecord_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLotRecord.Enter + txtLotRecord.SelectAll() + End Sub + + Private Sub txtProductNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtProductNo.Enter + txtProductNo.SelectAll() + End Sub + Private Sub txtProductNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtProductNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtMaterialLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMaterialLotNo.Enter, UltraTextEditor2.Enter + txtMaterialLotNo.SelectAll() + End Sub + + Private Sub txtMaterialLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMaterialLotNo.KeyPress, UltraTextEditor2.KeyPress + + Try + If (e.KeyChar = Convert.ToChar(13)) Then + funKeyInMaterialLotNo(txtMaterialNo.Text, txtMaterialLotNo.Text) + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + Private Sub funKeyInMaterialLotNo(ByVal MaterialNo As String, ByVal MaterialLotNo As String) + + Try + '2020/10/29 Grace 請先輸入物料編號 + If MaterialNo = "" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-200005", "[%MaterialNo%]!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + MaterialLotNo = UCase(MaterialLotNo.Trim) + If MaterialLotNo = "" Then Exit Sub + + If dsWIP.Tables(tblTMaterial).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-103019", "[%Do not need to check%]!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '相同料批只能加入某一個料,以避免上料錯誤 + '2020/10/29 Grace 依物料編號取得料批 + Dim drCheckMTLLotNo() As DataRow = dsWIP.Tables(tblTmpMTLLotNo).Select( + "MaterialLotNo ='" & MaterialLotNo & "' And MaterialNo ='" & MaterialNo & "'") + + If drCheckMTLLotNo.Length > 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-200004", "[%MaterialLotNo%]:" & MaterialLotNo), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + ' 2016/10/19 YF, 依作業站用料選項取出資料 + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + Case "0" + ' 發料點(線邊倉或工單) + If (Not CheckMaterialByPutinPlace(dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString, MaterialLotNo, MaterialNo)) Then + Exit Sub + End If + + Case "1" + ' 設備 + 'If (Not CheckMaterialByEquipment(MaterialLotNo, MaterialNo)) Then + ' Exit Sub + 'End If + + 'Case "2" + ' 生產線, 待組裝版再實作 + + 'Case "3" + ' 工位, 待組裝版再實作 + + Case Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-003000", "[%MaterialOption%]:" & dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString & + " [%NOT DEFINE%]!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End Select + + Catch ex As Exception + Throw ex + + Finally + txtMaterialLotNo.Text = "" + txtMaterialNo.Text = "" + txtMaterialNo.Focus() + End Try + + End Sub + + Private Sub txtMaterialLotNo_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMaterialLotNo.Leave, UltraTextEditor2.Leave + txtMaterialLotNo.Text = UCase(txtMaterialLotNo.Text) + End Sub + +#End Region + +#Region "Ultra Grid" + + Private Sub iugAttrib_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugAttrib.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblTAttrib).Columns.Count - 1 + Select Case dsWIP.Tables(tblTAttrib).Columns(i).ColumnName.ToUpper + Case "ATTRIBNO" + With .Bands(tblTAttrib).Columns("AttribNo") + .Header.Caption = "AttribNo" + .Width = 70 + .Header.VisiblePosition = 1 + End With + Case "ATTRIBNAME" + With .Bands(tblTAttrib).Columns("AttribName") + .Header.Caption = "AttribName" + .Width = 95 + .Header.VisiblePosition = 2 + End With + Case "ATTRIBVALUE" + With .Bands(tblTAttrib).Columns("AttribValue") + .Header.Caption = "AttribValue" + .Width = 80 + .Header.VisiblePosition = 3 + End With + Case "ATTRIBSOURCE" + With .Bands(tblTAttrib).Columns("AttribSource") + .Header.Caption = "AttribSource" + .Width = 65 + .Header.VisiblePosition = 4 + .ValueList = iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists("ASource") + End With + Case Else + With .Bands(tblTAttrib).Columns(dsWIP.Tables(tblTAttrib).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + End With + + End Sub + + Private Sub iugAttrib_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugAttrib.iMESUltraGrid_InitializeRow + + Dim strAttribValue As String + strAttribValue = e.Row.Cells("AttribValue").Value.ToString.Trim + + '\\Server\01A.pdf + If Mid(strAttribValue, 1, 2) = "\\" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + + '\\HTTP + If Mid(strAttribValue.ToUpper, 1, 4) = "HTTP" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + '\\HTTPS + If Mid(strAttribValue.ToUpper, 1, 5) = "HTTPS" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + + End Sub + + Private Sub iugAttrib_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugAttrib.iMESUltraGrid_ClickCellButton + + Cursor.Current = Cursors.WaitCursor + + Dim strFilePath As String + + strFilePath = e.Cell.Row.Cells("AttribValue").Value.ToString.Trim + + If strFilePath = "" Then Exit Sub + + Try + Dim objProcess As New Process + objProcess.Start(strFilePath) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugMaterial.iMESUltraGrid_InitializeLayOut, IMESUltraGridControl1.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblTMaterial).Columns.Count - 1 + With .Bands(tblTMaterial).Columns(i) + .Hidden = True + .Header.VisiblePosition = 99 + End With + Next + With .Bands(tblTMaterial).Columns("MaterialLevelShow") + .Header.Caption = "MaterialLevelShow" + .Hidden = False + .CalculateAutoResizeWidth(PerformAutoSizeType.VisibleRows, True) + .Header.VisiblePosition = 0 + .ValueList = vlMaterialLevel + End With + With .Bands(tblTMaterial).Columns("MaterialType") + .Header.Caption = "MaterialType" + .Width = 30 + .Hidden = False + .Header.VisiblePosition = 1 + End With + With .Bands(tblTMaterial).Columns("MaterialNo") + .Header.Caption = "MaterialNo" + .Width = 100 + .Hidden = False + .Header.VisiblePosition = 2 + End With + With .Bands(tblTMaterial).Columns("StdUseQty") + .Header.Caption = "StdUseQty" + .Width = 70 + .Hidden = False + .Header.VisiblePosition = 3 + .Format = "0.########" + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + End With + With .Bands(tblTMaterial).Columns("UnitNo") + .Header.Caption = "UnitNo" + .Width = 70 + .Hidden = False + .Header.VisiblePosition = 4 + End With + With .Bands(tblTMaterial).Columns("MTLLotNoSearch") + .Header.Caption = "" + .Width = 40 + .Hidden = blnByEQP + .Header.VisiblePosition = 5 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Center + '20231106,13871,0148577: Online Help優化建議 + .Tag = New COM_Kit.TagInformation.clsGridColumnTag() With {.UseOnlineHelp = False} + .Style = ColumnStyle.Button + .CellAppearance.BackColor = System.Drawing.Color.Pink + .CellButtonAppearance.BackColor = Color.Pink + .CellButtonAppearance.BorderColor3DBase = Color.Pink + .CellButtonAppearance.BackGradientStyle = GradientStyle.Rectangular + End With + + With .Bands("MTLLotNo").Columns("EquipmentNo") + If blnByEQP = True Then + .Hidden = False + .Width = 40 + Else + .Hidden = True + End If + End With + With .Bands("MTLLotNo").Columns("OrgMaterialNo") + .Hidden = True + End With + With .Bands("MTLLotNo").Columns("MaterialNo") + .Hidden = True + End With + With .Bands("MTLLotNo").Columns("SUBSTITUTEMATERIALNO") + .Hidden = False + End With + With .Bands("MTLLotNo").Columns("MaterialLotNo") + .Hidden = False + End With + With .Bands("MTLLotNo").Columns("Qty") + .Hidden = False + .Format = "0.########" + .Width = 50 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + End With + End With + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugMaterial.iMESUltraGrid_InitializeRow, IMESUltraGridControl1.iMESUltraGrid_InitializeRow + + If e.Row.Band.Key = tblTMaterial Then + e.Row.Cells("MaterialLevelShow").Appearance.BackColor = System.Drawing.Color.Pink + e.Row.Cells("MaterialType").Appearance.BackColor = System.Drawing.Color.Pink + e.Row.Cells("MaterialNo").Appearance.BackColor = System.Drawing.Color.Pink + e.Row.Cells("StdUseQty").Appearance.BackColor = System.Drawing.Color.Pink + e.Row.Cells("UnitNo").Appearance.BackColor = System.Drawing.Color.Pink + + 'e.Row.Cells("MTLLotNoSearch").Style = ColumnStyle.Button + 'e.Row.Cells("MTLLotNoSearch").Appearance.BackColor = System.Drawing.Color.Pink + 'e.Row.Cells("MTLLotNoSearch").ButtonAppearance.BackColor = Color.Pink + 'e.Row.Cells("MTLLotNoSearch").ButtonAppearance.BorderColor3DBase = Color.Pink + 'e.Row.Cells("MTLLotNoSearch").ButtonAppearance.BackGradientStyle = GradientStyle.Rectangular + e.Row.Cells("MTLLotNoSearch").Value = "..." + e.Row.Update() + End If + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugMaterial.iMESUltraGrid_ClickCellButton, IMESUltraGridControl1.iMESUltraGrid_ClickCellButton + + Dim dvData As DataView + + Try + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + + Dim MaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + Dim drSel() As DataRow = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & MaterialNo & "'") + If drSel.Length = 0 Then Exit Sub + + Dim dtMLot As DataTable = dsWIP.Tables(tblTmpMTLLotNo).Copy + Dim drTMaterial As DataRow = drSel(0) + Dim parameters As New Dictionary(Of String, Object) From { + {"drMaterial", drTMaterial}, + {"dtMLot", dtMLot}, + {"blnCheckIn", True} + } + Me.ObjectFileHandler.Execute("WP_MaterialQtyInput_Main", parameters) + + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select("OrgMaterialNo='" & MaterialNo & "'") + For Each dr In drSel + dr.Delete() + Next + dsWIP.Tables(tblTmpMTLLotNo).AcceptChanges() + + dtMLot = parameters("dtMLot") + For Each drMLot As DataRow In dtMLot.Rows + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select( + "SubstituteMaterialNo='" & drMLot("SubstituteMaterialNo").ToString() & "' And + MaterialLotNo='" & drMLot("MaterialLotNo").ToString() & "'") + If drSel.Length > 0 Then Continue For + + Dim drAdd As DataRow = dsWIP.Tables(tblTmpMTLLotNo).NewRow + For Each dcMLot As DataColumn In dtMLot.Columns + drAdd(dcMLot.ColumnName) = drMLot(dcMLot.ColumnName).ToString() + Next + dsWIP.Tables(tblTmpMTLLotNo).Rows.Add(drAdd) + Next + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + Private Sub iugEquipment_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugEquipment.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + Dim colShow As New Collection + + With e.Layout + 'Hide all, No Edit + + 'Equipment + For i = 0 To dsWIP.Tables(tblAreaEquipment).Columns.Count - 1 + Select Case dsWIP.Tables(tblAreaEquipment).Columns(i).ColumnName.ToUpper + Case "CHECKFLAG" + With .Bands(tblAreaEquipment).Columns("CheckFlag") + .Width = 50 + .Header.VisiblePosition = 1 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellAppearance.BackColor = System.Drawing.Color.White + End With + Case "EQUIPMENTNO" + With .Bands(tblAreaEquipment).Columns("EquipmentNo") + .Width = 100 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "EQUIPMENTNAME" + '[Mantis:80651]2020/10/27,Boyi,EquipmentDescription => EquipmentName + ' dsWIP.Tables(tblAreaEquipment).Columns("EquipmentName").ColumnName = "EquipmentDescription" + With .Bands(tblAreaEquipment).Columns("EquipmentName") + .Header.Caption = "EquipmentName" + .Width = 150 + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "RECIPEGROUP" + With .Bands(tblAreaEquipment).Columns("RecipeGroup") + .Width = 80 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "RECIPEVERSION" + With .Bands(tblAreaEquipment).Columns("RecipeVersion") + .Width = 50 + .Header.VisiblePosition = 5 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "DESCRIPTION" + With .Bands(tblAreaEquipment).Columns("Description") + .Width = 100 + .Header.VisiblePosition = 6 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "QCLISTNO" + With .Bands(tblAreaEquipment).Columns("QCListNo") + .Header.VisiblePosition = 7 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "DISPATCHORDER" + With .Bands(tblAreaEquipment).Columns("DispatchOrder") + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + End With + Case "DISPATCHDATE" ''2020/11/05 Steven Mantis:0081316: 手動派工,新增顯示欄位 + With .Bands(tblAreaEquipment).Columns("DispatchDate") + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .Format = "yyyy/MM/dd" + .Width = 100 + End With + '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + 'Case "LOGICALRECIPENAME" '2023/07/20, 0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 19245 + ' With .Bands(tblAreaEquipment).Columns("LogicalRecipeName") + ' .Width = 80 + ' .Header.VisiblePosition = 4 + ' .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + ' .TabStop = False + ' End With + 'Case "LOGICALRECIPEVERSION" '2023/07/20, 0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 19245 + ' With .Bands(tblAreaEquipment).Columns("LogicalRecipeVersion") + ' .Width = 100 + ' .Header.VisiblePosition = 5 + ' .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + ' .TabStop = False + ' End With + Case Else + With .Bands(tblAreaEquipment).Columns(dsWIP.Tables(tblAreaEquipment).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + 'Chamber + If Not dsWIP.Tables("Chamber") Is Nothing Then + For i = 0 To dsWIP.Tables("Chamber").Columns.Count - 1 + Select Case dsWIP.Tables("Chamber").Columns(i).ColumnName.ToUpper + Case "SELECT1" + With .Bands("Chamber").Columns("SELECT1") + .Width = 50 + .Header.VisiblePosition = 1 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellAppearance.BackColor = System.Drawing.Color.White + End With + Case "EQUIPMENTNO" + With .Bands("Chamber").Columns("EQUIPMENTNO") + .Width = 100 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "EQUIPMENTNAME" + With .Bands("Chamber").Columns("EQUIPMENTNAME") + .Header.Caption = "EquipmentName" + .Width = 150 + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "DESCRIPTION" + With .Bands("Chamber").Columns("Description") + .Width = 100 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case Else + With .Bands("Chamber").Columns(dsWIP.Tables("Chamber").Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End If + 'For i = 1 To colShow.Count + ' .Columns(CStr(colShow(i))).Hidden = False + ' .Columns(CStr(colShow(i))).Header.VisiblePosition = i + 'Next + + colShow.Add("CHECKFLAG") + colShow.Add("EQUIPMENTNO") + colShow.Add("EQUIPMENTNAME") + colShow.Add("RECIPEGROUP") + colShow.Add("RECIPEVERSION") + 'colShow.Add("LOGICALRECIPENAME") '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + 'colShow.Add("LOGICALRECIPEVERSION") + colShow.Add("DESCRIPTION") + colShow.Add("QCLISTNO") + colShow.Add("DISPATCHDATE") + colShow.Add("DISPATCHORDER") + + 'Accessory + If Not dsWIP.Tables("AccState") Is Nothing Then + For i = 0 To dsWIP.Tables("AccState").Columns.Count - 1 + Select Case dsWIP.Tables("AccState").Columns(i).ColumnName.ToUpper + Case "SELECT" + With .Bands("Accessory").Columns("SELECT") + .Width = 50 + .Header.VisiblePosition = 1 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellAppearance.BackColor = System.Drawing.Color.White + End With + Case "ACCESSORYNO" + With .Bands("Accessory").Columns("AccessoryNo") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "ACCESSORYTYPE" + With .Bands("Accessory").Columns("AccessoryType") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "STARTTIME" + With .Bands("Accessory").Columns("StartTime") + .Width = 120 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .Format = "yyyy/MM/dd HH:mm:ss" + End With + Case "ACCUMULATEQTY" + With .Bands("Accessory").Columns("AccumulateQty") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 5 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .TabStop = False + .Format = "0.######" + End With + Case "REPAIRCYCLE" + With .Bands("Accessory").Columns("RepairCycle") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 6 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .TabStop = False + .Format = "0.######" + End With + Case Else + With .Bands("Accessory").Columns(dsWIP.Tables("AccState").Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End If + + 'Recipe + 'Dim vlRecipeType As New ValueList '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + 'vlRecipeType = COM_Utility.ValueListProvider.GetInstance.GetValueList("TBLPRDMACHINERECIPEDETAIL", "RECIPETYPE", True) + + If Not dsWIP.Tables("RecipeDetail") Is Nothing Then + For i = 0 To dsWIP.Tables("RecipeDetail").Columns.Count - 1 + Select Case dsWIP.Tables("RecipeDetail").Columns(i).ColumnName.ToUpper + Case "RECIPENO" + With .Bands("Recipe").Columns("RecipeNo") + .Width = 80 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 1 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "RECIPEVALUE" + With .Bands("Recipe").Columns("RecipeValue") + .Width = 100 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + 'Case "RECIPEPARAMETERNO" '0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 2023/07/20, 19245 + ' With .Bands("Recipe").Columns("RecipeParameterNo") + ' .Width = 80 + ' .Header.Appearance.BackColor = System.Drawing.Color.Yellow + ' .Header.VisiblePosition = 1 + ' .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + ' .TabStop = False + ' End With + 'Case "RECIPETYPE" '0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 2023/07/21, 19245 + ' With .Bands("Recipe").Columns("RecipeType") + ' .Width = 80 + ' .Header.Appearance.BackColor = System.Drawing.Color.Yellow + ' .Header.VisiblePosition = 2 + ' .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + ' .TabStop = False + ' .ValueList = vlRecipeType + 'End With + + Case Else + With .Bands("Recipe").Columns(dsWIP.Tables("RecipeDetail").Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End If + End With + + 'UltraGrid + iugEquipment.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + iugEquipment.iMESUltraGrid.Rows.ExpandAll(True) + + End Sub + + Private Sub iugEquipment_iMESUltraGrid_BeforeCellUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeCellUpdateEventArgs) Handles iugEquipment.iMESUltraGrid_BeforeCellUpdate + Dim drTemp As DataRow() + Dim strType As String + Dim blnNeedSelect As Boolean + '勾選設備後,才自動勾選模治具 + If e.Cell.Column.Key.ToUpper = "CHECKFLAG" AndAlso e.NewValue = True Then + '預設選取每個類別第一個模治具 + For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo = '" & e.Cell.Row.Cells(1).Text & "'") + strType = "" + blnNeedSelect = True + If dr("AllowExecute") = 1 Then '可使用 + drTemp = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "'") + For i = 0 To drTemp.Count - 1 + If drTemp(i)("Select") = True Then blnNeedSelect = False + Next + If drTemp.Length > 0 AndAlso blnNeedSelect = True Then + '有掛模治具 + For Each dr1 As DataRow In drTemp + If strType = "" Then + strType = dr1("AccessoryType") + dr1("Select") = True + ElseIf strType <> dr1("AccessoryType") Then + dr1("Select") = True + strType = dr1("AccessoryType") + End If + Next + End If + End If + Next + End If + End Sub + Private Sub iugEquipment_iMESUltraGrid_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles iugEquipment.iMESUltraGrid_KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub iugEquipment_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugEquipment.iMESUltraGrid_InitializeRow + + If e.Row.Band.Key = tblAreaEquipment Then 'Equipment + If e.Row.Cells("AllowExecute").Value = 0 Then '不可使用 + e.Row.Cells("CheckFlag").Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled + e.Row.Cells("CheckFlag").Appearance.BackColor = System.Drawing.Color.Gainsboro + ElseIf e.Row.Cells("AllowExecute").Value = 1 Then '可使用 + + 'CheckFlag + If EquipmentNo = defString Then + Else + '以機台下貨,關閉勾選介面. + e.Row.Cells("CheckFlag").Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled + e.Row.Cells("CheckFlag").Appearance.BackColor = System.Drawing.Color.Gainsboro + End If + End If + End If + '子設備 + 'TsungYu 2021/06/09 + If e.Row.Band.Key = "Chamber" Then 'Equipment + If e.Row.Cells("AllowExecute").Value = 0 Then '不可使用 + e.Row.Cells("Select1").Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled + e.Row.Cells("Select1").Appearance.BackColor = System.Drawing.Color.Gainsboro + ElseIf e.Row.Cells("AllowExecute").Value = 1 Then '可使用 + 'CheckFlag + If EquipmentNo = defString Then + Else + e.Row.Cells("Select1").Activation = Infragistics.Win.UltraWinGrid.Activation.Disabled + e.Row.Cells("Select1").Appearance.BackColor = System.Drawing.Color.Gainsboro + End If + End If + End If + If e.Row.Band.Key.ToUpper = "ACCESSORY" Then '模治具 + '2014/11/24 Kevin,如果是產品-作業站-模治具所設定的模治具則改變底色 + If Not dsWIP.Tables("PRDAccessory") Is Nothing Then + Dim drSelPRD As DataRow() + drSelPRD = dsWIP.Tables("PRDAccessory").Select("AccessoryNo = '" & e.Row.Cells("AccessoryNo").Value & "'") + If drSelPRD.Length > 0 Then + e.Row.Appearance.BackColor = System.Drawing.Color.Yellow + Else + '找不到的話再看一次模治具類別 + drSelPRD = dsWIP.Tables("PRDAccessory").Select("AccessoryType = '" & e.Row.Cells("AccessoryType").Value & "' And AccessoryNo ='*'") + If drSelPRD.Length > 0 Then + e.Row.Appearance.BackColor = System.Drawing.Color.Yellow + End If + End If + End If + End If + + End Sub + + + Private Sub iugEquipment_iMESUltraGrid_AfterCellUpdate(sender As System.Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugEquipment.iMESUltraGrid_AfterCellUpdate + + '如有點選模製具則將設備自動勾選 + If e.Cell.Column.Key.ToUpper = "SELECT" AndAlso e.Cell.Row.Cells("SELECT").Value Then + drSelE = dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo = '" & e.Cell.Row.Cells("EquipmentNo").Value & "'") + For Each dr As DataRow In drSelE + dr("CHECKFLAG") = True + Next + End If + + If e.Cell.Column.Key.ToUpper = "CHECKFLAG" AndAlso e.Cell.Row.Cells("CHECKFLAG").Value = False Then + drSelE = dsWIP.Tables("AccState").Select("EquipmentNo = '" & iugEquipment.iMESUltraGrid.ActiveRow.Cells("EquipmentNo").Value & "'") + For Each dr As DataRow In drSelE + dr("Select") = False + Next + + '2021/9/14 Mantis:0099587 當取消勾選設備時,此設備已開立的點檢單應刪除 + '自動開立點檢務單 + Call funCheckEQPQCTask(e.Cell.Row.Cells("EquipmentNo").Value, True) + + If blnByEQP = True Then + DeleteTmpMTLLotNo(e.Cell.Row.Cells("EquipmentNo").Value) + End If + + Else + If blnByEQP = True Then + Call LoadMaterialByEquipment(e.Cell.Row.Cells("EquipmentNo").Value) + End If + End If + + If Not dsWIP.Tables("Chamber") Is Nothing Then + If dsWIP.Tables("Chamber").Rows.Count > 0 Then + '如有點選子設備則將設備自動勾選 + If e.Cell.Column.Key.ToUpper = "SELECT1" AndAlso e.Cell.Row.Cells("SELECT1").Value Then + If Not String.IsNullOrEmpty(e.Cell.Row.Cells("BELONGEQUIPMENTNO").Value.ToString) Then + drSelE = dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo = '" & e.Cell.Row.Cells("BelongEquipmentNo").Value & "'") + For Each dr As DataRow In drSelE + dr("CHECKFLAG") = True + Next + End If + End If + '設備取消時子設備的勾選也自動取消 + If e.Cell.Column.Key.ToUpper = "CHECKFLAG" AndAlso e.Cell.Row.Cells("CHECKFLAG").Value = False Then + drSelE = dsWIP.Tables("Chamber").Select("BelongEquipmentNo = '" & iugEquipment.iMESUltraGrid.ActiveRow.Cells("EquipmentNo").Value & "'") + For Each dr As DataRow In drSelE + dr("SELECT1") = False + Next + '設備勾選時自動勾選子設備 + ElseIf e.Cell.Column.Key.ToUpper = "CHECKFLAG" AndAlso e.Cell.Row.Cells("CHECKFLAG").Value Then + drSelE = dsWIP.Tables("Chamber").Select("BelongEquipmentNo = '" & iugEquipment.iMESUltraGrid.ActiveRow.Cells("EquipmentNo").Value & "' and AllowExecute = 1") + For Each dr As DataRow In drSelE + dr("SELECT1") = True + Next + End If + End If + End If + ' 2016/01/27 YF, 取得設備參數值 + e.Cell.Row.Update() + + funGetEquipmentRecipe() + + + End Sub + + Private Sub iugEquipment_iMESUltraGrid_CellChange(sender As Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugEquipment.iMESUltraGrid_CellChange + ' CheckFlag被點選時, 可立即將結果異動回DataTable + e.Cell.Row.Update() + Me.iugEquipment.iMESUltraGrid.ActiveRow = e.Cell.Row + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugKeyIn.iMESUltraGrid_InitializeLayOut + + With e.Layout + With .Bands("KeyIn").Columns("AttribNo") + .Header.Caption = "AttribNo" + .Width = 90 + .Header.VisiblePosition = 1 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribName") + .Header.Caption = "AttribName" + .Width = 150 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribValue") + .Header.Caption = "AttribValue" + .Width = 130 + .Header.VisiblePosition = 3 + End With + '2015-12-18, Joe, Add + With .Bands("KeyIn").Columns("QCItemNo") + .Header.Caption = "QCItemNo" + .Width = 90 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribSequence") + .Hidden = True + End With + With .Bands("KeyIn").Columns("InputType") + .Hidden = True + End With + With .Bands("KeyIn").Columns("DataType") + .Hidden = True + End With + With .Bands("KeyIn").Columns("ValueType") + .Hidden = True + End With + + .Bands("KeyIn").Columns("OrgAttribValue").Hidden = True ' 2016/01/27 YF + End With + + 'UltraGrid + iugKeyIn.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles iugKeyIn.iMESUltraGrid_KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugKeyIn.iMESUltraGrid_InitializeRow + Dim strAttribValue As String + + Try + + 'InputType=1 清單選擇 + If e.Row.Cells("InputType").Value = 1 Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + ElseIf e.Row.Cells("DataType").Value = 3 Then + e.Row.Cells("AttribValue").Style = ColumnStyle.DateTime + e.Row.Cells("AttribValue").Editor = editor + e.Row.Cells("AttribValue").Appearance.BackColor = Color.White + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugKeyIn.iMESUltraGrid_ClickCellButton + + Dim intValueType As Integer + + Cursor.Current = Cursors.WaitCursor + + Try + + intValueType = iugKeyIn.iMESUltraGrid.ActiveRow.Cells("ValueType").Value + + If intValueType = 3 OrElse intValueType = 1 Then 'Reference System Parameter / Assign Valid Value + If Not IsNothing(dsWIP.Tables(strDefaultValue)) Then + dsWIP.Tables.Remove(strDefaultValue) + End If + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("elementno", "PropertyType", "String", iugKeyIn.iMESUltraGrid.ActiveRow.Cells("AttribNo").Value, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsSYS.LoadElementValue", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出Data + strDefaultValue = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadelementvalue").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadelementvalue").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadelementvalue").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" And XmlData <> "fail" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + + Dim fSearch As New frmCOMSearch + '如果 PropertyNo 的有效性檢查來自 MESParameter,則取出有效值提供選擇 + fSearch.dvSearch = dsWIP.Tables(strDefaultValue).DefaultView + fSearch.strFindColumnName = dsWIP.Tables(strDefaultValue).Columns(0).ColumnName + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If Not drSearch Is Nothing Then + If Not IsDBNull(drSearch(0).ToString) Then + iugKeyIn.iMESUltraGrid.ActiveRow.Cells("AttribValue").Value = drSearch(0).ToString + End If + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + End Sub + + Private Sub iugSubOP_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblSubOP).Columns.Count - 1 + Select Case dsWIP.Tables(tblSubOP).Columns(i).ColumnName.ToUpper + Case "SUBOPSEQUENCE" + With .Bands(tblSubOP).Columns("SubOPSequence") + .Header.Caption = "SubOPSequence" + .Width = 50 + .Hidden = False + .Header.VisiblePosition = 1 + End With + Case "SUBOPNO" + With .Bands(tblSubOP).Columns("SubOPNo") + .Header.Caption = "SubOPNo" + .Width = 80 + .Header.VisiblePosition = 2 + End With + Case "SUBOPNAME" + With .Bands(tblSubOP).Columns("SubOPName") + .Header.Caption = "SubOPName" + .Width = 180 + .Header.VisiblePosition = 3 + End With + Case "CREATOR" + With .Bands(tblSubOP).Columns("Creator") + .Header.Caption = "Creator" + .Width = 70 + .Hidden = True + .Header.VisiblePosition = 4 + End With + Case "CREATEDATE" + With .Bands(tblSubOP).Columns("CreateDate") + .Width = 120 + .Header.VisiblePosition = 5 + .Hidden = True + .Format = "yyyy/MM/dd HH:mm:ss" + End With + Case Else + With .Bands(tblSubOP).Columns(dsWIP.Tables(tblSubOP).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + End With + + End Sub + +#End Region + +#Region "Equipment" + + Private Sub txtEquipmentNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEquipmentNo.Enter + txtEquipmentNo.SelectAll() + End Sub + Private Sub txtEquipmentNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtEquipmentNo.KeyPress + + Cursor.Current = Cursors.WaitCursor + + '強制使用機台,故不提供此功能 + + If EquipmentNo <> defString Then Exit Sub + + If e.KeyChar = Convert.ToChar(13) Then + If txtEquipmentNo.Text.Trim <> "" Then + Dim drSel() As DataRow + Dim strEQPNo As String + strEQPNo = txtEquipmentNo.Text.Trim.ToUpper + '檢查EquipmentNo是否存在 + drSel = dsWIP.Tables(tblAreaEquipment).Select("EquipmentNo='" & strEQPNo & "'") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%EquipmentNo%]:" & strEQPNo & " [%is not in area%]:" & txtAreaNo.Text & "!"), MsgBoxStyle.Exclamation, Me.Text) + txtEquipmentNo.SelectAll() + Exit Sub + Else + If drSel(0)("AllowExecute") = 1 Then '可使用 + drSel(0)("CheckFlag") = True + If blnByEQP = True Then + Call LoadMaterialByEquipment(strEQPNo) + End If + + Else '不可使用 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203072", "[%EquipmentNo%]:" & strEQPNo & " [%is not available%] " & Chr(10) + Chr(13) & drSel(0)("Description")), MsgBoxStyle.Exclamation, Me.Text) + txtEquipmentNo.SelectAll() + Exit Sub + End If + End If + + 'Focus + Dim ugrRow As Infragistics.Win.UltraWinGrid.UltraGridRow + ugrRow = FindRecordPosition(iugEquipment, "EquipmentNo", strEQPNo) + If Not ugrRow Is Nothing Then + iugEquipment.iMESUltraGrid.ActiveRow = ugrRow + iugEquipment.iMESUltraGrid.ActiveRow.Selected = True + End If + + txtEquipmentNo.Text = "" + txtEquipmentNo.Focus() + End If + End If + + Cursor.Current = Cursors.Default + + End Sub + + +#End Region + +#Region "Load functions" + + Private Function funLoadLotState() As Integer + + funLoadLotState = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadLotBasisJoinState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblLotState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadlotbasisjoinstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasisjoinstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasisjoinstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + If dsWIP.Tables(tblLotState).Rows.Count > 0 Then + If dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString = "1" Then + blnByEQP = True + End If + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadLotState = 0 + + End Function + + Private Function funLoadTemp_AttribJoinBasis() As Integer + + funLoadTemp_AttribJoinBasis = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_AttribJoinBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTAttrib = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_attrib").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_attrib").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_attrib").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + Call funAddValueList_Attrib() + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_AttribJoinBasis = 0 + + + End Function + + Private Function funLoadTemp_Material() As Integer + + funLoadTemp_Material = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_Material", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTMaterial = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_material").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_material").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_material").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + '新增OrgMaterialNo,紀錄原來的主物料用 + Dim colOrgMaterialNo As New DataColumn + colOrgMaterialNo.ColumnName = "OrgMaterialNo" + colOrgMaterialNo.DataType = System.Type.GetType("System.String") + colOrgMaterialNo.DefaultValue = 0 + colOrgMaterialNo.AllowDBNull = False + dsWIP.Tables(tblTMaterial).Columns.Add(colOrgMaterialNo) + + '加入標準用量欄位 + Dim colStdQty As New DataColumn + colStdQty.ColumnName = "StdUseQty" + colStdQty.DataType = System.Type.GetType("System.Decimal") + colStdQty.DefaultValue = 0 + colStdQty.AllowDBNull = False + dsWIP.Tables(tblTMaterial).Columns.Add(colStdQty) + + '計算標準使用量 + Dim decCurQty, decStdQty As Decimal + Dim i As Integer + + 'Rows(0)一定會有資料. + decCurQty = dsWIP.Tables(tblLotState).Rows(0)("CurQty") + For i = 0 To dsWIP.Tables(tblTMaterial).Rows.Count - 1 + decStdQty = decCurQty * dsWIP.Tables(tblTMaterial).Rows(i)("StdQty") * (1 + dsWIP.Tables(tblTMaterial).Rows(i)("DecreaseRate")) + dsWIP.Tables(tblTMaterial).Rows(i)("StdUseQty") = Format(decStdQty, "0.######") + + '紀錄原來的主物料 + dsWIP.Tables(tblTMaterial).Rows(i)("OrgMaterialNo") = dsWIP.Tables(tblTMaterial).Rows(i)("MaterialNo") + Next + + dsWIP.Tables(tblTMaterial).Columns("MaterialLevel").ColumnName = "MaterialLevelShow" + + '加入可供使用者點擊搜尋的欄位 + dsWIP.Tables(tblTMaterial).Columns.Add(New DataColumn("MTLLotNoSearch", System.Type.GetType("System.String"))) + dsWIP.Tables(tblTMaterial).DefaultView.RowFilter = "MaterialNo = OrgMaterialNo" + dsWIP.Tables(tblTMaterial).DefaultView.Sort = "MaterialType,OrgMaterialNo,MaterialNo" + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_Material = 0 + + + End Function + + Private Function funLoadAvailableEquipment(ByRef LotNo As String) As Integer + + funLoadAvailableEquipment = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + strParameter += CombineXMLParameter("getrecipe", "GetRecipe", "Boolean", True, "") + strParameter += CombineXMLParameter("getaccessory", "GetAccessory", "Boolean", blnGetAccessory, "") + strParameter += CombineXMLParameter("multiqclist", "MultiQCList", "Boolean", True, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadAvailableEquipment_All", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblAreaEquipment = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadavailableequipment_all").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipment_all").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipment_all").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + '2023/12/21,Ning,154124: L_CI_GEN [語系未處理] 挑選設備後,彈窗訊息顯示 LoadPort is full. + For Each drEQP As DataRow In dsWIP.Tables(tblAreaEquipment).Rows + If drEQP("Description").ToString <> "" Then + drEQP("Description") = ChgTranslateName_Content(drEQP("Description")) + End If + Next + + '加入Check Field + Dim colCheckFlag As New DataColumn + colCheckFlag.ColumnName = "CheckFlag" + colCheckFlag.DataType = System.Type.GetType("System.Boolean") + colCheckFlag.DefaultValue = False + colCheckFlag.AllowDBNull = False + dsWIP.Tables(tblAreaEquipment).Columns.Add(colCheckFlag) + '加入LoadPort + Dim colPort As New DataColumn + colPort.ColumnName = "LoadPort" + colPort.DataType = System.Type.GetType("System.String") + dsWIP.Tables(tblAreaEquipment).Columns.Add(colPort) + + '加入點檢識別欄位 + dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCType", System.Type.GetType("System.Decimal"))) + dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCFinish", System.Type.GetType("System.Decimal"))) + + '開放可編輯 + dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + + If Not dsWIP.Tables("Chamber") Is Nothing Then + '加入勾選的按鈕 + Dim colChamberCheckFlag As New DataColumn + colChamberCheckFlag.ColumnName = "SELECT1" + colChamberCheckFlag.DataType = System.Type.GetType("System.Boolean") + colChamberCheckFlag.DefaultValue = False + colChamberCheckFlag.AllowDBNull = False + dsWIP.Tables("Chamber").Columns.Add(colChamberCheckFlag) + dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + End If + 'Kevin 20131223,如有模治具則開放用選取的方式 + If Not dsWIP.Tables("AccState") Is Nothing Then + '加入勾選的按鈕 + Dim colSelect As New DataColumn + colSelect.ColumnName = "Select" + colSelect.DataType = System.Type.GetType("System.Boolean") + colSelect.DefaultValue = False + colSelect.AllowDBNull = False + dsWIP.Tables("AccState").Columns.Add(colSelect) + + dsWIP.Tables("AccState").DefaultView.Sort = "AccessoryType,AccessoryNo" + Dim strType As String = "" + Dim drTemp As DataRow() + + '預設選取每個類別第一個模治具 + 'For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Rows + ' strType = "" + ' If dr("AllowExecute") = 1 Then '可使用 + ' drTemp = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "'") + ' If drTemp.Length > 0 Then + ' '有掛模治具 + ' For Each dr1 As DataRow In drTemp + ' If strType = "" Then + ' strType = dr1("AccessoryType") + ' dr1("Select") = True + ' ElseIf strType <> dr1("AccessoryType") Then + ' dr1("Select") = True + ' strType = dr1("AccessoryType") + ' End If + ' Next + ' End If + ' End If + 'Next + '2020/02/26 Grace Mantis 67753 取得此批號於此作業站上的派工資料 + Call funLoadWIPEQPDispatchState(LotNo:=LotNo, OPNo:=txtOPNo.Text) + '增加顯示欄位:派工日期、派工順序 + If dsWIP.Tables(tblAreaEquipment).Columns.Contains("DispatchOrder") Then + dsWIP.Tables(tblAreaEquipment).Columns.Remove("DispatchOrder") + End If + Dim colDispatchDate As New DataColumn + colDispatchDate.ColumnName = "DispatchDate" + colDispatchDate.DataType = System.Type.GetType("System.DateTime") + dsWIP.Tables(tblAreaEquipment).Columns.Add(colDispatchDate) + Dim colDispatchOrder As New DataColumn + colDispatchOrder.ColumnName = "DispatchOrder" + colDispatchOrder.DataType = System.Type.GetType("System.String") + dsWIP.Tables(tblAreaEquipment).Columns.Add(colDispatchOrder) + + If Not IsNothing(dsTemp.Tables(tblEQPDispatchState)) Then + If dsTemp.Tables(tblEQPDispatchState).Rows.Count > 0 Then + Dim strCheckInDate As String = Now.ToString("yyyy/MM/dd") 'Check In 日期 + '2020/11/05 Steven Mantis:0081316: '增加顯示欄位:派工日期、派工順序 + For i As Integer = 0 To dsWIP.Tables(tblAreaEquipment).Rows.Count - 1 + '1. 檢查是否有派工設備 + Dim drSelEQP As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & + dsWIP.Tables(tblAreaEquipment).Rows(i)("EquipmentNo").ToString() & "'And LotNo = '" & txtLotNo.Text & "'And DispatchDate = '" & strCheckInDate & "'") + If drSelEQP.Count > 0 Then '優先顯示派工日期為當天 + dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchOrder") = drSelEQP(0)("DispatchOrder").ToString + If drSelEQP(0)("DispatchDate").ToString <> "" Then + dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchDate") = drSelEQP(0)("DispatchDate") + End If + Else '如非當天派工日期再顯示 + Dim drSelEQP2 As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & + dsWIP.Tables(tblAreaEquipment).Rows(i)("EquipmentNo").ToString() & "'And LotNo = '" & txtLotNo.Text & "'") + If drSelEQP2.Length > 0 Then + dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchOrder") = drSelEQP2(0)("DispatchOrder").ToString + If drSelEQP2(0)("DispatchDate").ToString <> "" Then + dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchDate") = drSelEQP2(0)("DispatchDate") + End If + End If + End If + Next + End If + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadAvailableEquipment = 0 + + + End Function + + '2023/07/25會議結論, 規格書規畫尚不清晰,此項目註解。 + '0138119: [6.0.7]recipe配方管理优化派工--配方关联设定, 2023-07-20, 19245 + 'Private Function funLoadAvailableEquipmentInfo(ByRef LotNo As String) As Integer + + ' funLoadAvailableEquipmentInfo = -1 + + ' '組InXml的字串 + ' strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + ' strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + ' strParameter += CombineXMLParameter("getrecipe", "GetRecipe", "Boolean", True, "") + ' strParameter += CombineXMLParameter("getaccessory", "GetAccessory", "Boolean", blnGetAccessory, "") + ' strParameter += CombineXMLParameter("multiqclist", "MultiQCList", "Boolean", True, "") + ' InXml = CombineXMLRequest(strIdentity, strParameter) + + ' Try + ' OutXml = InvokeSrv("wsWIP.LoadAvailableEquipmentInfo", InXml) + + ' Dim XmlDoc As New XmlDocument + ' XmlDoc.LoadXml(OutXml) + ' If ChkExecutionSuccess(XmlDoc) Then + ' tblAreaEquipment = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadavailableequipmentinfo").Item(0).SelectNodes("name").Item(0).InnerXml + ' '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + ' XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipmentinfo").Item(0).SelectNodes("schema").Item(0).InnerXml + ' If XmlSchema <> "" Then + ' '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + ' tmpStringReader = New System.IO.StringReader(XmlSchema) + ' dsWIP.ReadXmlSchema(tmpStringReader) + ' tmpStringReader.Close() + ' End If + ' XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipmentinfo").Item(0).SelectNodes("value").Item(0).InnerXml + ' If XmlData <> "" Then + ' tmpStringReader = New System.IO.StringReader(XmlData) + ' dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + ' tmpStringReader.Close() + ' End If + + ' '加入Check Field + ' Dim colCheckFlag As New DataColumn + ' colCheckFlag.ColumnName = "CheckFlag" + ' colCheckFlag.DataType = System.Type.GetType("System.Boolean") + ' colCheckFlag.DefaultValue = False + ' colCheckFlag.AllowDBNull = False + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(colCheckFlag) + ' '加入LoadPort + ' Dim colPort As New DataColumn + ' colPort.ColumnName = "LoadPort" + ' colPort.DataType = System.Type.GetType("System.String") + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(colPort) + + ' '加入點檢識別欄位 + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCType", System.Type.GetType("System.Decimal"))) + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCFinish", System.Type.GetType("System.Decimal"))) + + ' '開放可編輯 + ' dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + + ' If Not dsWIP.Tables("Chamber") Is Nothing Then + ' '加入勾選的按鈕 + ' Dim colChamberCheckFlag As New DataColumn + ' colChamberCheckFlag.ColumnName = "SELECT1" + ' colChamberCheckFlag.DataType = System.Type.GetType("System.Boolean") + ' colChamberCheckFlag.DefaultValue = False + ' colChamberCheckFlag.AllowDBNull = False + ' dsWIP.Tables("Chamber").Columns.Add(colChamberCheckFlag) + ' dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + ' End If + ' 'Kevin 20131223,如有模治具則開放用選取的方式 + ' If Not dsWIP.Tables("AccState") Is Nothing Then + ' '加入勾選的按鈕 + ' Dim colSelect As New DataColumn + ' colSelect.ColumnName = "Select" + ' colSelect.DataType = System.Type.GetType("System.Boolean") + ' colSelect.DefaultValue = False + ' colSelect.AllowDBNull = False + ' dsWIP.Tables("AccState").Columns.Add(colSelect) + + ' dsWIP.Tables("AccState").DefaultView.Sort = "AccessoryType,AccessoryNo" + ' Dim strType As String = "" + ' Dim drTemp As DataRow() + + ' '預設選取每個類別第一個模治具 + ' 'For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Rows + ' ' strType = "" + ' ' If dr("AllowExecute") = 1 Then '可使用 + ' ' drTemp = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "'") + ' ' If drTemp.Length > 0 Then + ' ' '有掛模治具 + ' ' For Each dr1 As DataRow In drTemp + ' ' If strType = "" Then + ' ' strType = dr1("AccessoryType") + ' ' dr1("Select") = True + ' ' ElseIf strType <> dr1("AccessoryType") Then + ' ' dr1("Select") = True + ' ' strType = dr1("AccessoryType") + ' ' End If + ' ' Next + ' ' End If + ' ' End If + ' 'Next + ' '2020/02/26 Grace Mantis 67753 取得此批號於此作業站上的派工資料 + ' Call funLoadWIPEQPDispatchState(LotNo:=LotNo, OPNo:=txtOPNo.Text) + ' '增加顯示欄位:派工日期、派工順序 + ' If dsWIP.Tables(tblAreaEquipment).Columns.Contains("DispatchOrder") Then + ' dsWIP.Tables(tblAreaEquipment).Columns.Remove("DispatchOrder") + ' End If + ' Dim colDispatchDate As New DataColumn + ' colDispatchDate.ColumnName = "DispatchDate" + ' colDispatchDate.DataType = System.Type.GetType("System.DateTime") + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(colDispatchDate) + ' Dim colDispatchOrder As New DataColumn + ' colDispatchOrder.ColumnName = "DispatchOrder" + ' colDispatchOrder.DataType = System.Type.GetType("System.String") + ' dsWIP.Tables(tblAreaEquipment).Columns.Add(colDispatchOrder) + + ' If Not IsNothing(dsTemp.Tables(tblEQPDispatchState)) Then + ' If dsTemp.Tables(tblEQPDispatchState).Rows.Count > 0 Then + ' Dim strCheckInDate As String = Now.ToString("yyyy/MM/dd") 'Check In 日期 + ' '2020/11/05 Steven Mantis:0081316: '增加顯示欄位:派工日期、派工順序 + ' For i As Integer = 0 To dsWIP.Tables(tblAreaEquipment).Rows.Count - 1 + ' '1. 檢查是否有派工設備 + ' Dim drSelEQP As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("EquipmentNo").ToString() & "'And LotNo = '" & txtLotNo.Text & "'And DispatchDate = '" & strCheckInDate & "'") + ' If drSelEQP.Count > 0 Then '優先顯示派工日期為當天 + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchOrder") = drSelEQP(0)("DispatchOrder").ToString + ' If drSelEQP(0)("DispatchDate").ToString <> "" Then + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchDate") = drSelEQP(0)("DispatchDate") + ' End If + ' Else '如非當天派工日期再顯示 + ' Dim drSelEQP2 As DataRow() = dsTemp.Tables(tblEQPDispatchState).Select("EquipmentNo = '" & + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("EquipmentNo").ToString() & "'And LotNo = '" & txtLotNo.Text & "'") + ' If drSelEQP2.Length > 0 Then + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchOrder") = drSelEQP2(0)("DispatchOrder").ToString + ' If drSelEQP2(0)("DispatchDate").ToString <> "" Then + ' dsWIP.Tables(tblAreaEquipment).Rows(i)("DispatchDate") = drSelEQP2(0)("DispatchDate") + ' End If + ' End If + ' End If + ' Next + ' End If + ' End If + ' End If + ' Else + ' ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + ' Exit Function + ' End If + + ' XmlDoc = Nothing + + ' Catch ex As iMESException.MESException + ' ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + ' Exit Function + ' Catch ex As Exception + ' ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + ' Exit Function + ' End Try + + ' funLoadAvailableEquipmentInfo = 0 + + + 'End Function + + Private Function funLoadAvailableEquipment_Chamber(ByRef LotNo As String) As Integer + + funLoadAvailableEquipment_Chamber = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + strParameter += CombineXMLParameter("getrecipe", "GetRecipe", "Boolean", True, "") + strParameter += CombineXMLParameter("getaccessory", "GetAccessory", "Boolean", blnGetAccessory, "") + strParameter += CombineXMLParameter("multiqclist", "MultiQCList", "Boolean", True, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsWIP.LoadAvailableEquipment_All(InXml) + OutXml = InvokeSrv("wsWIP.LoadAvailableEquipment_All", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblAreaEquipment = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadavailableequipment_all").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipment_all").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadavailableequipment_all").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + '加入Check Field + Dim colCheckFlag As New DataColumn + colCheckFlag.ColumnName = "CheckFlag" + colCheckFlag.DataType = System.Type.GetType("System.Boolean") + colCheckFlag.DefaultValue = False + colCheckFlag.AllowDBNull = False + dsWIP.Tables(tblAreaEquipment).Columns.Add(colCheckFlag) + '加入LoadPort + Dim colPort As New DataColumn + colPort.ColumnName = "LoadPort" + colPort.DataType = System.Type.GetType("System.String") + dsWIP.Tables(tblAreaEquipment).Columns.Add(colPort) + + '加入點檢識別欄位 + dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCType", System.Type.GetType("System.Decimal"))) + dsWIP.Tables(tblAreaEquipment).Columns.Add(New DataColumn("QCFinish", System.Type.GetType("System.Decimal"))) + + '開放可編輯 + dsWIP.Tables(tblAreaEquipment).DefaultView.AllowEdit = True + + 'Kevin 20131223,如有模治具則開放用選取的方式 + If Not dsWIP.Tables("AccState") Is Nothing Then + '加入勾選的按鈕 + Dim colSelect As New DataColumn + colSelect.ColumnName = "Select" + colSelect.DataType = System.Type.GetType("System.Boolean") + colSelect.DefaultValue = False + colSelect.AllowDBNull = False + dsWIP.Tables("AccState").Columns.Add(colSelect) + + dsWIP.Tables("AccState").DefaultView.Sort = "AccessoryType,AccessoryNo" + Dim strType As String = "" + Dim drTemp As DataRow() + + '預設選取每個類別第一個模治具 + 'For Each dr As DataRow In dsWIP.Tables(tblAreaEquipment).Rows + ' strType = "" + ' If dr("AllowExecute") = 1 Then '可使用 + ' drTemp = dsWIP.Tables("AccState").Select("EquipmentNo = '" & dr("EquipmentNo") & "'") + ' If drTemp.Length > 0 Then + ' '有掛模治具 + ' For Each dr1 As DataRow In drTemp + ' If strType = "" Then + ' strType = dr1("AccessoryType") + ' dr1("Select") = True + ' ElseIf strType <> dr1("AccessoryType") Then + ' dr1("Select") = True + ' strType = dr1("AccessoryType") + ' End If + ' Next + ' End If + ' End If + 'Next + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadAvailableEquipment_Chamber = 0 + + + End Function + Private Function funGetShift() As Integer + + funGetShift = -1 + + Dim strShiftNo As String = "N/A" + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("userno", "UserNo", "String", UserId, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsUSR.GetShift", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出ShiftNo + If XmlDoc.GetElementsByTagName("shiftno").Item(0).SelectNodes("value").Count > 0 Then + strShiftNo = XmlDoc.DocumentElement.GetElementsByTagName("shiftno").Item(0).SelectNodes("value").Item(0).InnerText + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + txtShiftNo.Text = strShiftNo + + funGetShift = 0 + + End Function + + Private Function funGetOPDescription(ByRef LotNo As String) As Integer + + funGetOPDescription = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.GetLotOPDescription", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + If XmlDoc.GetElementsByTagName("opdescription").Count > 0 Then + If XmlDoc.GetElementsByTagName("opdescription").Item(0).SelectNodes("value").Count > 0 Then + txtOPDescription.Text = XmlDoc.DocumentElement.GetElementsByTagName("opdescription").Item(0).SelectNodes("value").Item(0).InnerText + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funGetOPDescription = 0 + + End Function + + Private Function funLoadSubOP() As Integer + + funLoadSubOP = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + + '用opreference決定現在要用產品 or Module去抓,2011/04/08,by Sherry + If dsWIP.Tables(tblLotState).Rows(0)("OPReference") = 1 Then 'Module + strParameter = CombineXMLParameter("productno", "ProductNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("ModuleNo").ToString), "") + strParameter += CombineXMLParameter("productversion", "ProductVersion", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("ModuleVersion").ToString), "") + Else 'Product + strParameter = CombineXMLParameter("productno", "ProductNo", "String", txtProductNo.Text, "") + strParameter += CombineXMLParameter("productversion", "ProductVersion", "String", dsWIP.Tables(tblLotState).Rows(0)("ProductVersion").ToString, "") + End If + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(txtOPNo.Text), "") '將OPNo加上CInput轉換特殊字元,2010/04/08,by yumei + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsPRD.LoadPRDOpSubOp", InXml) + + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblSubOP = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadprdopsubop").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadprdopsubop").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadprdopsubop").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + dsWIP.Tables(tblSubOP).DefaultView.Sort = "SubOPSequence,SubOPNo" + iugSubOP.iMESUltraGrid.DataSource = dsWIP.Tables(tblSubOP).DefaultView + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadSubOP = 0 + + End Function + + '20240118 实习生客制表数据获取方法 + Private Function funLoadKzTable() As Integer + + funLoadKzTable = -1 + + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + + strParameter = defString + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + 'OutXml = InvokeSrv("wsPRD.LoadPRDOpSubOp", InXml) + OutXml = InvokeSrv("ABC.wsWIP_21681.LoadWIPKzTable", InXml) + + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblKzTable = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadkzinformation").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadkzinformation").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsKz.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadkzinformation").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsKz.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + '加入Check Field + Dim colCheckFlag As New DataColumn + colCheckFlag.ColumnName = "CheckFlag" + colCheckFlag.DataType = System.Type.GetType("System.Boolean") + colCheckFlag.DefaultValue = False + colCheckFlag.AllowDBNull = False + + dsKz.Tables(tblKzTable).Columns.Add(colCheckFlag) + iugKzxx.iMESUltraGrid.DataSource = dsKz.Tables(tblKzTable).DefaultView + + '開放可編輯 + dsKz.Tables(tblKzTable).DefaultView.AllowEdit = True + + + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadKzTable = 0 + + End Function + + Private Function funLoadLotLoginState() As Integer + + funLoadLotLoginState = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString), "") + strParameter += CombineXMLParameter("userno", "UserNo", "String", CInput(UserId), "") + Dim strAdditional As String + strAdditional = CombineXMLAdditional(CombineAddXML_Condition("CheckOutTime is null")) + strParameter += strAdditional + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadLotLoginState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblLotLoginState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadlotloginstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadlotloginstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadlotloginstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadLotLoginState = 0 + + End Function + Private Function funLoadMOMaterialState(ByVal MONo As String, + ByVal MaterialLotNo As String, + Optional ByVal MaterialNo As String = defString) As Integer + + funLoadMOMaterialState = -1 + + Dim XmlDoc As New XmlDocument + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblMOMaterialState)) Then + dsWIP.Tables.Remove(tblMOMaterialState) + End If + + '組InXml的字串 + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("mono", "MONo", "String", CInput(MONo), "") + strParameter += CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(MaterialLotNo), "") + If MaterialNo <> defString Then + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + End If + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, Using wsOE As New wsOE.wsOE + ' 2016 YF, wsOE.Url = LocalizeWebService(wsOE.Url.ToString) + ' 2016 YF, wsOE.EnableDecompression = True + ' 2016 YF, OutXml = wsOE.LoadMOMaterialState(InXml) + OutXml = InvokeSrv("wsOE.LoadMOMaterialState", InXml) + + ' 2016 YF, End Using + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblMOMaterialState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmomaterialstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmomaterialstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmomaterialstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadMOMaterialState = 0 + + End Function + + Private Function funLoadWIPInventory_Raw(ByVal MaterialLotNo As String, + Optional ByVal MaterialNo As String = defString, + Optional ByVal InventoryNo As String = defString) As Integer + + funLoadWIPInventory_Raw = -1 + + Dim XmlDoc As New XmlDocument + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblWIPINVRaw)) Then + dsWIP.Tables.Remove(tblWIPINVRaw) + End If + + '組InXml的字串 + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(MaterialLotNo), "") + '2019/06/17 Shih Kai, Mantis:0058359 多加入條件參數 + If MaterialNo <> defString Then + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + End If + If InventoryNo <> defString Then + strParameter += CombineXMLParameter("inventoryno", "InventoryNo", "String", CInput(InventoryNo), "") + End If + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsINV.LoadWIPInventory_Raw", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblWIPINVRaw = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadwipinventory_raw").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_raw").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_raw").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadWIPInventory_Raw = 0 + + End Function + + Private Function funLoadWIPInventory_SEMI(ByVal LotNo As String, + Optional ByVal ProductNo As String = defString, + Optional ByVal InventoryNo As String = defString) As Integer + + funLoadWIPInventory_SEMI = -1 + + Dim XmlDoc As New XmlDocument + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblWIPINVSEMI)) Then + dsWIP.Tables.Remove(tblWIPINVSEMI) + End If + + '組InXml的字串 + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + '2019/06/17 Shih Kai, Mantis:0058359 多加入條件參數 + If ProductNo <> defString Then + strParameter += CombineXMLParameter("productno", "ProductNo", "String", CInput(ProductNo), "") + End If + If InventoryNo <> defString Then + strParameter += CombineXMLParameter("inventoryno", "InventoryNo", "String", CInput(InventoryNo), "") + End If + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadWIPInventory_SEMI", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblWIPINVSEMI = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadwipinventory_semi").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_semi").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_semi").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadWIPInventory_SEMI = 0 + + End Function + + '取出用料清單 + Private Function funLoadSubstituteMaterial_Main(ByVal LotNo As String, ByVal MaterialNo As String, + ByVal UnitNo As String) As Integer + funLoadSubstituteMaterial_Main = -1 + + Dim XmlDoc As New XmlDocument '處理Xml字串之物件 + Dim tmpStringReader As System.IO.StringReader '將字串轉換成可讀入DataSet的物件 + Dim InXml, OutXml, strIdentity, strParameter, XmlData, XmlSchema As String + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblSubstituteMaterial)) Then + dsWIP.Tables.Remove(tblSubstituteMaterial) + End If + + '組InXml的字串 + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + strParameter += CombineXMLParameter("unitno", "UnitNo", "String", CInput(UnitNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadSubstituteMaterial_Main", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSubstituteMaterial = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadsubstitutematerial_main").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadsubstitutematerial_main").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadsubstitutematerial_main").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + Finally + XmlDoc = Nothing + tmpStringReader = Nothing + End Try + + funLoadSubstituteMaterial_Main = 0 + + End Function + + ''' + ''' 2016/10/19 YF, 依設備及工單取出設備上料現況 + ''' + ''' + ''' + ''' + ''' 2:原物料線邊倉(RAW) 3:工單存料現況(MO) 4:半成品線邊倉(SEMI) + ''' + Private Function LoadEQPMaterialState(ByRef pTable As DataTable, Optional ByVal pEquipmentNo As String = defString, + Optional ByVal pMONo As String = defString, Optional ByVal pMaterialNo As String = defString, + Optional ByVal pPutInPlaceType As Integer = 3) As Boolean + + Dim result As Boolean = False + Dim XmlDoc As New XmlDocument + Dim dsTemp As New DataSet + + Try + + Cursor.Current = Cursors.WaitCursor + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = "" + + If (pEquipmentNo <> defString) Then + strParameter += CombineXMLParameter("equipmentno", "EquipmentNo", "String", pEquipmentNo, "") + End If + + '不需要工单 新设备上料14278 + 'If (pMONo <> defString) Then + ' strParameter += CombineXMLParameter("mono", "MONo", "String", CInput(pMONo), "") + 'End If + + If (pMaterialNo <> defString) Then + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(pMaterialNo), "") + End If + + ' 取出剩餘數量>0 + Dim strAdditional As String + strAdditional = CombineXMLAdditional(CombineAddXML_Condition("Qty > 0")) + strParameter += strAdditional + + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsWIP_Material.LoadWIPEQPMaterialState", InXml) + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipeqpmaterialstate").Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipeqpmaterialstate").Item(0).SelectNodes("value").Item(0).InnerXml + + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If (dsTemp.Tables.Count > 0) Then + pTable = dsTemp.Tables(0).Copy + result = True + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + XmlDoc = Nothing + dsTemp = Nothing + Cursor.Current = Cursors.Default + End Try + + Return result + + End Function + + '2019/01/18 Eric + Private Function funLoadParameter(ByVal ParameterNo As String) As String + + Dim dsPara As New DataSet + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("parameterno", "ParameterNo", "String", CInput(ParameterNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsSYS.LoadParameter", InXml) + + Dim XmlDoc As New XmlDocument '//處理Xml字串之物件 + XmlDoc.LoadXml(OutXml) + If Not ChkExecutionSuccess(XmlDoc) Then + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Dim tblParameter As String = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadparameter").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsPara.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsPara.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If dsPara.Tables(tblParameter).Rows.Count > 0 Then + Return dsPara.Tables(tblParameter).Rows(0)("PARAMETERVALUE").ToString + End If + + Return "" + + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + End Try + + End Function + + '2020/10/29 Grace 料批查核,相同料批只能刷一個料號,增加料號刷入 + Private Sub txtMaterialNo_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtMaterialNo.KeyPress, UltraTextEditor1.KeyPress + Try + If (e.KeyChar <> Convert.ToChar(13)) Then + Exit Sub + End If + txtMaterialLotNo.Focus() + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + End Sub + + + Private Sub iugMaterial_Click(sender As Object, e As EventArgs) Handles iugMaterial.Click, IMESUltraGridControl1.Click + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + txtMaterialNo.Text = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + End Sub + + Private Function funLoadTemp_LotState() As Integer + + funLoadTemp_LotState = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_LotState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTLotState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_lotstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_lotstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_lotstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_LotState = 0 + + + End Function + + Private Sub UltraTabControl1_SelectedTabChanged(sender As Object, e As UltraWinTabControl.SelectedTabChangedEventArgs) Handles UltraTabControl1.SelectedTabChanged + + End Sub + + Private Sub iugSubOP_Load(sender As Object, e As EventArgs) + + End Sub + + Private Sub iugMaterial_Load(sender As Object, e As EventArgs) Handles iugMaterial.Load + + End Sub + + Private Sub iugKzTable_Load(sender As Object, e As EventArgs) + + End Sub + + Private Sub iugEquipment_Load(sender As Object, e As EventArgs) Handles iugEquipment.Load + + End Sub + + '20240118 实习生 kzxx的layout布局方法 + Private Sub iugKzxx_iMESUltraGrid_InitializeLayOut(sender As Object, e As InitializeLayoutEventArgs) Handles iugKzxx.iMESUltraGrid_InitializeLayOut + + With e.Layout + With .Bands(tblKzTable).Columns("CheckFlag") + .Width = 50 + .Header.VisiblePosition = 1 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellAppearance.BackColor = System.Drawing.Color.White + End With + With .Bands(tblKzTable).Columns("LotNoBySLC") + .Width = 100 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + End With + With .Bands(tblKzTable).Columns("SelectFlag") + .Width = 50 + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + .ValueList = vlKzTable + End With + 'UltraGrid + iugKzxx.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + iugKzxx.iMESUltraGrid.Rows.ExpandAll(True) + + End With + End Sub + + Private Sub iugKzxx_Load(sender As Object, e As EventArgs) Handles iugKzxx.Load + + End Sub + + Private Sub uplEquipment_PaintClient(sender As Object, e As PaintEventArgs) Handles uplEquipment.PaintClient + + End Sub + + '2019/10/17 Grace 查詢作業站資料 + Private Sub funLoadOPBasis(ByVal OPNo As String) + + If Not IsNothing(dsTemp.Tables(tblOPBasis)) Then + dsTemp.Tables.Remove(tblOPBasis) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("opno", "OPNo", "String", CInput(OPNo), "") + '2020/02/07 Grace 增加傳入GetXml_CLOB = false, 避免取回企業邏輯CLOB資料 + strParameter += CombineXMLParameter("getxml_clob", "GetXML_CLOB", "Boolean", False, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Dim XmlDoc As New XmlDocument + + Try + ' 2016 YF, Using wsOP As New wsOP.wsOP + ' 2016 YF, wsOP.Url = LocalizeWebService(wsOP.Url.ToString) + ' 2016 YF, wsOP.EnableDecompression = True + ' 2016 YF, OutXml = wsOP.LoadOPBasis(InXml) + OutXml = InvokeSrv("wsOP.LoadOPBasis", InXml) + + ' 2016 YF, End Using + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出 Tablename + tblOPBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadopbasis").Item(0).SelectNodes("name").Item(0).InnerXml + '//取出 Table Schma + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadopbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '//取出Attrib Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadopbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + End Sub + + '2020/02/26 Grace 查詢設備派工資料 + Private Sub funLoadWIPEQPDispatchState(Optional ByVal EquipmentNo As String = defString, Optional ByVal LotNo As String = defString, + Optional ByVal OPNo As String = defString, Optional ByVal DispatchDate As DateTime = defDateTime) + + If Not IsNothing(dsTemp.Tables(tblEQPDispatchState)) Then + dsTemp.Tables.Remove(tblEQPDispatchState) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = "" + If EquipmentNo <> defString Then strParameter += CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + If LotNo <> defString Then strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + If OPNo <> defString Then strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(OPNo), "") + If chkUpdCheckInTime.Checked And DispatchDate <> defDateTime Then + strParameter += CombineXMLParameter("dispatchdate", "DispatchDate", "String", dtpcheckintime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") + End If + + InXml = CombineXMLRequest(strIdentity, strParameter) + Dim XmlDoc As New XmlDocument + + Try + ' 2016 YF, Using wsOP As New wsOP.wsOP + ' 2016 YF, wsOP.Url = LocalizeWebService(wsOP.Url.ToString) + ' 2016 YF, wsOP.EnableDecompression = True + ' 2016 YF, OutXml = wsOP.LoadOPBasis(InXml) + OutXml = InvokeSrv("wsWIP.LoadWIPEQPDispatchState", InXml) + + ' 2016 YF, End Using + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出 Tablename + tblEQPDispatchState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadwipeqpdispatchstate").Item(0).SelectNodes("name").Item(0).InnerXml + '//取出 Table Schma + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipeqpdispatchstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '//取出Attrib Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipeqpdispatchstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + End Sub + + +#End Region + +#Region "Others" + + Private Function funInitialize() + + iugAttrib.iMESUltraGrid.Text = "Attrib" + iugAttrib.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugAttrib.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugAttrib.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + '20240119 By 21681 客制 + iugKzxx.iMESUltraGrid.Text = "Kzxx" + iugKzxx.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugKzxx.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugKzxx.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + 'iugMaterial.iMESUltraGrid.Text = "Material" + iugMaterial.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugMaterial.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugMaterial.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + iugEquipment.iMESUltraGrid.Text = "Equipment" + iugEquipment.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugEquipment.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugEquipment.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + iugEquipment.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + '78912: 进站选择模治具时,如该机台领用多套模具,会默认选择第一套而不会选择产品作业站设定绑定使用的的模治具 + '78879: 若PRD主檔有設定限定模治具,則勾選各類別限定模治具的第一筆,設定為星號亦同,若未設定則不預勾 Edison 2020/10/15 + '===========================================78879 Start =========================================== + If Not dsWIP.Tables("AccState") Is Nothing Then + For Each r As DataRow In dsWIP.Tables("AccState").Rows + r("Select") = False + Next r + End If + + If Not dsWIP.Tables("PRDAccessory") Is Nothing AndAlso dsWIP.Tables("PRDAccessory").Rows.Count > 0 AndAlso Not dsWIP.Tables("AccState") Is Nothing Then + Dim blnChkACC As Boolean = False + + Dim dtAccType As DataTable = dsWIP.Tables("PRDAccessory").DefaultView.ToTable(True, "AccessoryType") + Dim drSelPRDACC() As DataRow + Dim drSelAccState() As DataRow + + For Each r As DataRow In dtAccType.Rows + drSelPRDACC = dsWIP.Tables("PRDAccessory").Select("AccessoryType = '" & r("AccessoryType") & "'") + If drSelPRDACC.Length > 0 Then + If drSelPRDACC(0)("AccessoryNo") <> "*" Then + drSelAccState = dsWIP.Tables("AccState").Select("AccessoryType = '" & drSelPRDACC(0)("AccessoryType") & "' AND AccessoryNo = '" & drSelPRDACC(0)("AccessoryNo") & "' ") + If drSelAccState.Length > 0 Then + drSelAccState(0)("Select") = True + End If + Else + drSelAccState = dsWIP.Tables("AccState").Select("AccessoryType = '" & drSelPRDACC(0)("AccessoryType") & "' ") + If drSelAccState.Length > 0 Then + drSelAccState(0)("Select") = True + End If + End If + End If + Next r + + End If + '===========================================78879 End =========================================== + + '78913: 【德瑞客户】CI画面放大画面后再缩小画面然后拉伸设备栏位会造成多个设备功能框 Edison 2020/09/24 + '================================ 78913 Start ================================ + '防止透過Scroll Bar分割Grid + iugEquipment.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugEquipment.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + '================================ 78913 End ================================ + + iugKeyIn.iMESUltraGrid.Text = "Key In" + iugKeyIn.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugKeyIn.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugKeyIn.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + iugKeyIn.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugKeyIn.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + + 'iugSubOP.iMESUltraGrid.Text = "Sub OP" + iugSubOP.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugSubOP.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugSubOP.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + SBar1.Panels(0).Text = "UserNo:" & UserId + SBar1.Panels(3).Text = Format(datEventTime, "yyyy/MM/dd H:mm:ss") + + txtPriority.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + txtCurQty.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + txtSysQty.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + dtpcheckintime.Value = datEventTime + + btnConfirm.Enabled = True + 'btnMultiUser.Enabled = True + + '2019/10/17 Grace 依系統參數是否啟動多人加工, 且多人加工模式為生產批, 來決定是否顯示"多人加工"按鈕 + btnMultiUser.Visible = False + btnMultiUser.Enabled = False + + If Val(funGetSysParameter("MultiOperator")) Then + Call funLoadOPBasis(txtOPNo.Text) + If Not IsNothing(dsTemp.Tables(tblOPBasis)) Then + If dsTemp.Tables(tblOPBasis).Rows.Count > 0 Then + If dsTemp.Tables(tblOPBasis).Rows(0)("MultiOperatorMode").ToString = "5" Then + btnMultiUser.Visible = True + btnMultiUser.Enabled = True + End If + End If + End If + End If + + + ' 2016/12/26 YF, 依系統參數是否啟動多人加工來決定是否顯示"作業人員"按鈕 + Me.btnOperator.Visible = Val(funGetSysParameter("MultiOperator")) + + End Function + + Private Function funLotInfo_Show() + + RevLotSerial = dsWIP.Tables(tblLotState).Rows(0)("LotSerial") + RevLotStamp = dsWIP.Tables(tblLotState).Rows(0)("LotStamp") + LotSerial = dsWIP.Tables(tblLotState).Rows(0)("LotSerial") + LogGroupSerial = dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString + txtCurQty.Text = Format(dsWIP.Tables(tblLotState).Rows(0)("CurQty"), "0.####") + txtCurUnitNo.Text = dsWIP.Tables(tblLotState).Rows(0)("CurUnitNo").ToString + txtSysQty.Text = Format(dsWIP.Tables(tblLotState).Rows(0)("SysQty"), "0.####") + txtSysUnitNo.Text = dsWIP.Tables(tblLotState).Rows(0)("SysUnitNo").ToString + txtOPNo.Text = dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString + txtOpName.Text = dsWIP.Tables(tblLotState).Rows(0)("OPName").ToString + + '2009/05/11 Sophia.Pan R0905002 作業站編號及名稱加上ToolTip + ToolTip1.SetToolTip(Me.txtOPNo, dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString) + ToolTip1.SetToolTip(Me.txtOpName, dsWIP.Tables(tblLotState).Rows(0)("OPName").ToString) + + txtAreaNo.Text = dsWIP.Tables(tblLotState).Rows(0)("AreaNo").ToString + txtProductNo.Text = dsWIP.Tables(tblLotState).Rows(0)("ProductNo").ToString + PhaseNo = dsWIP.Tables(tblLotState).Rows(0)("PhaseNo") + + txtPriority.Text = dsWIP.Tables(tblLotState).Rows(0)("Priority") + If dsWIP.Tables(tblLotState).Rows(0)("Priority") = 1 Then + txtPriority.BackColor = System.Drawing.Color.Red + ElseIf dsWIP.Tables(tblLotState).Rows(0)("Priority") = 2 Then + txtPriority.BackColor = System.Drawing.Color.Yellow + ElseIf dsWIP.Tables(tblLotState).Rows(0)("Priority") = 3 Then + txtPriority.BackColor = System.Drawing.Color.LimeGreen + End If + txtMONo.Text = dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString + txtCustomerLotNo.Text = dsWIP.Tables(tblLotState).Rows(0)("CustomerLotNo").ToString + + End Function + + Private Sub funAddValueList_Attrib() + + iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists.Add("ASource") + With iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists("ASource").ValueListItems + .Clear() + .Add(0, "KeyIn") + .Add(1, "Calculate") + .Add(2, "System") + .Add(3, "Setup") + End With + + End Sub + + Private Function funGetSampleData() + + Cursor.Current = Cursors.WaitCursor + + '轉換抽樣參數 + Dim strAQLType, strAQL, strQCLevel, strTemp As String + + If dsWIP.Tables(tblTAttrib) Is Nothing Then Exit Function + + Dim drSel() As DataRow + + '若已轉換,不再轉 + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'SampleQty'") + If drSel.Length > 0 Then + If Not IsDBNull(drSel(0)("AttribValue")) Then + If drSel(0)("AttribValue") <> "" Then + Exit Function + End If + End If + End If + + 'AQLType + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AQLType'") + If drSel.Length > 0 Then + strAQLType = drSel(0)("AttribValue") + Else + strAQLType = defString + End If + 'AQL + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AQL'") + If drSel.Length > 0 Then + strAQL = drSel(0)("AttribValue") + Else + strAQL = defString + End If + 'QCLevel + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'QCLevel'") + If drSel.Length > 0 Then + strQCLevel = drSel(0)("AttribValue") + Else + strQCLevel = defString + End If + + drSel = Nothing + + If strAQLType = defString Or strAQL = defString Or strQCLevel = defString Then Exit Function + + '取出抽樣數 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("aqltype", "AQLType", "String", strAQLType, "") + strParameter += CombineXMLParameter("qty", "QTY", "Long", dsWIP.Tables(tblLotState).Rows(0)("CurQty"), "") + strParameter += CombineXMLParameter("qclevel", "QCLevel", "String", strQCLevel, "") + strParameter += CombineXMLParameter("aql", "AQL", "String", strAQL, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + Try + OutXml = InvokeSrv("wsQC.GetAQLQty", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + 'SampleQty + If XmlDoc.GetElementsByTagName("sampleqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("sampleqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'SampleQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%SampleQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + 'AcceptQty + If XmlDoc.GetElementsByTagName("acceptqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("acceptqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AcceptQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%AcceptQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + 'RejectQty + If XmlDoc.GetElementsByTagName("rejectqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("rejectqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'RejectQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%RejectQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + Cursor.Current = Cursors.Default + + End Function + + Private Function funGetActiveRows() As DataRow() + Dim Rows As DataRow() + Dim oRow As Infragistics.Win.UltraWinGrid.UltraGridRow + oRow = iugEquipment.iMESUltraGrid.ActiveRow + + If oRow Is Nothing Then + Return Nothing + End If + + '找出DataSet中在目前游標列的資料列(DataRow) + + Rows = dsWIP.Tables(tblAreaEquipment).Select( + "EquipmentNo ='" & Replace(oRow.Cells("EquipmentNo").Value.ToString, "'", "''") & "'") + + If Rows.Length = 0 Then + Return Nothing + Else + Return Rows + End If + End Function + + Private Function funMultiUser() As Integer + + funMultiUser = -1 + + If funLoadLotLoginState() < 0 Then Exit Function + + '產生多人加工暫存表 + dtTmpLoginState = New DataTable("TmpLoginState") + dtTmpLoginState.Columns.Add("UserNo", System.Type.GetType("System.String")) + dtTmpLoginState.Columns.Add("UserName", System.Type.GetType("System.String")) + dtTmpLoginState.Columns.Add("CheckInTime", System.Type.GetType("System.DateTime")) + + '檢查tblWIPLotLoginState內是否已有本站未登出的資料,若有,則不自動加入. + If dsWIP.Tables(tblLotLoginState).Rows.Count = 0 Then + drAdd = dtTmpLoginState.NewRow + drAdd("UserNo") = UserId + drAdd("UserName") = UserName + 'Kevin,2012/12/18,不取client端的時間作CI時間 + 'drAdd("CheckInTime") = datEventTime + dtTmpLoginState.Rows.Add(drAdd) + End If + + funMultiUser = 0 + + End Function + + Private Function funGetSysParameter(ByVal pParameterNo As String) As String + + funGetSysParameter = "0" + + '組InXml的字串 + strParameter = "" + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("parameterno", "ParameterNo", "String", CInput(pParameterNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + Dim XmlDoc As New XmlDocument + + OutXml = InvokeSrv("wsSYS.GetParameter", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + If XmlDoc.DocumentElement.SelectNodes("returnvalue").Count > 0 Then + funGetSysParameter = XmlDoc.DocumentElement("returnvalue").InnerXml + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + End Function + +#End Region + +#Region "取得設備參數" + + ' 2016/01/27 YF, 取得設備參數值 + Private Sub funGetEquipmentRecipe() + + Const FUNCTION_NAME As String = "#GETEQPRECIPE" + + Dim strEquipmentNo As String = "" + Dim XmlDoc As New XmlDocument + Dim SelRows() As DataRow + + Try + + ' 取出勾選的設備編號 + For Each row As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag = " & True, "EquipmentNo") + strEquipmentNo += row("EquipmentNo").ToString & "," + Next + + If (strEquipmentNo <> "") Then + strEquipmentNo = strEquipmentNo.TrimEnd(",") + End If + + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + + ' 逐筆判斷特性值的函式是否為#GETEQPRECIPE, 若是則至後端取回參數值 + For Each row As DataRow In dsWIP.Tables(tblTAttrib).Rows + + If (Microsoft.VisualBasic.Left(row("OrgAttribValue").ToString, FUNCTION_NAME.Length).ToUpper <> FUNCTION_NAME) Then + Continue For + End If + + ' 沒有挑選設備, 清空#GetEQPRecipe特性值 + If (strEquipmentNo = "") Then + row("AttribValue") = "" + Continue For + End If + + ' 取回設備參數 + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", strEquipmentNo, "") + strParameter += CombineXMLParameter("recipescript", "RecipeScript", "String", row("OrgAttribValue").ToString, "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsWIP.GetEquipmentRecipe", InXml) + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + If XmlDoc.GetElementsByTagName("itemvalue").Count > 0 Then + If XmlDoc.GetElementsByTagName("itemvalue").Item(0).SelectNodes("value").Count > 0 Then + row("AttribValue") = XmlDoc.DocumentElement.GetElementsByTagName("itemvalue").Item(0).SelectNodes("value").Item(0).InnerText + + ' 更新KeyIn的特性值 + SelRows = dtKeyIn.Select("AttribNo = '" & row("AttribNo") & "'") + + If (SelRows.Length > 0) Then + SelRows(0)("AttribValue") = row("AttribValue") + End If + + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Next + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + XmlDoc = Nothing + End Try + + End Sub + +#End Region + +#Region "用料檢查" + + ''' + ''' 2016/10/19 YF, 投料點用料檢查 + ''' + ''' + Private Function CheckMaterialByPutinPlace(ByVal pMONo As String, ByVal pMaterialLotNo As String, ByVal pMaterialNo As String) As Boolean + + Dim PutinPlace As Integer + Dim intInputFlag As Integer = 0 + Dim strTmpOrgMaterialNo As String = "" + Dim strTmpMaterialNo As String = "" + Dim strTmpMaterialLotNo As String = "" + Dim decQty As Decimal = 0 + Dim strCheckPlaceMsg As String = "" + + + '至工單發料區與線邊倉取出輸入的料批 + If funLoadMOMaterialState(dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString, txtMaterialLotNo.Text) < 0 Then Exit Function + If funLoadWIPInventory_Raw(pMaterialLotNo) < 0 Then Exit Function + If funLoadWIPInventory_SEMI(pMaterialLotNo) < 0 Then Exit Function + + '檢查是否有符合的物料編號與投料點 + + If dsWIP.Tables(tblMOMaterialState).Rows.Count > 0 Then '工單發料區 + + For Each drRaw As DataRow In dsWIP.Tables(tblMOMaterialState).Rows + '2020/10/30 Grace 先檢查輸入的物料編號, 相符後再往下找物料批號 + If drRaw("MaterialNo") = pMaterialNo Then + + 'Kevin 2013/1/2,不同主料替代料有可能相同,先檢查游標所選的主物料 + Dim drSelMTL As DataRow() + + drSelMTL = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & drRaw("MaterialNo") & "'" & + " And OrgMaterialNo ='" & iugMaterial.iMESUltraGrid.ActiveRow.Cells("OrgMaterialNo").Value & "'" & + " And PutInPlaceType = 3 ") + If drSelMTL.Length > 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = drSelMTL(0)("OrgMaterialNo") + strTmpMaterialNo = drRaw("MaterialNo") + strTmpMaterialLotNo = drRaw("MaterialLotNo") + decQty = drRaw("Qty") + End If + intInputFlag = 1 + Else + '全部主物料比對 + For Each dr As DataRow In dsWIP.Tables(tblTMaterial).Rows + '檢查物料編號 + If dr("MaterialNo") = drRaw("MaterialNo") Then + '檢查投料點 + If dr("PutInPlaceType") = 3 Then + Dim drSel() As DataRow + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select("MaterialNo='" & drRaw("MaterialNo") & "' And MaterialLotNo ='" & drRaw("MaterialLotNo") & "'") + If drSel.Length = 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = dr("OrgMaterialNo") + strTmpMaterialNo = drRaw("MaterialNo") + strTmpMaterialLotNo = drRaw("MaterialLotNo") + decQty = drRaw("Qty") + End If + intInputFlag = 1 + End If + Else + strCheckPlaceMsg = "[%MaterialLotNo%]:" & pMaterialLotNo & ",[%MaterialNo%]:" & + dr("MaterialNo") & " [%PutInPlace%][%is not%][%MO%] !" + End If + End If + Next + End If + + End If + Next + End If + + If dsWIP.Tables(tblWIPINVRaw).Rows.Count > 0 Then '線邊倉 + + For Each drRaw As DataRow In dsWIP.Tables(tblWIPINVRaw).Rows + + '2020/10/30 Grace 先檢查輸入的物料編號, 相符後再往下找物料批號 + If drRaw("MaterialNo") = pMaterialNo Then + + 'Kevin 2013/1/2,不同主料替代料有可能相同,先檢查游標所選的主物料 + Dim drSelMTL As DataRow() + drSelMTL = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & drRaw("MaterialNo") & "'" & + " And OrgMaterialNo ='" & iugMaterial.iMESUltraGrid.ActiveRow.Cells("OrgMaterialNo").Value & "'" & + " And PutInPlaceType = 2 ") + If drSelMTL.Length > 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = drSelMTL(0)("OrgMaterialNo") + strTmpMaterialNo = drRaw("MaterialNo") + strTmpMaterialLotNo = drRaw("MaterialLotNo") + decQty = drRaw("Qty") + End If + intInputFlag = 1 + Else + '全部主物料比對 + For Each dr As DataRow In dsWIP.Tables(tblTMaterial).Rows + '檢查物料編號 + If dr("MaterialNo") = drRaw("MaterialNo") Then + '檢查投料點 + If dr("PutInPlaceType") = 2 Then + Dim drSel() As DataRow + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select("MaterialNo='" & drRaw("MaterialNo") & "' And MaterialLotNo ='" & drRaw("MaterialLotNo") & "'") + If drSel.Length = 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = dr("OrgMaterialNo") + strTmpMaterialNo = drRaw("MaterialNo") + strTmpMaterialLotNo = drRaw("MaterialLotNo") + decQty = drRaw("Qty") + End If + intInputFlag = 1 + End If + Else + strCheckPlaceMsg = "[%MaterialLotNo%]:" & pMaterialLotNo & ",[%MaterialNo%]:" & + dr("MaterialNo") & " [%PutInPlace%][%is not%][%WIP INVENTORY%] !" + End If + End If + Next + End If + + End If + Next + End If + + If dsWIP.Tables(tblWIPINVSEMI).Rows.Count > 0 Then '半成品線邊倉 + + For Each drSEMI As DataRow In dsWIP.Tables(tblWIPINVSEMI).Rows + + '2020/10/30 Grace 先檢查輸入的物料編號, 相符後再往下找物料批號 + If drSEMI("ProductNo") = pMaterialNo Then + + 'Kevin 2013/1/2,不同主料替代料有可能相同,先檢查游標所選的主物料 + Dim drSelMTL As DataRow() + drSelMTL = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & drSEMI("ProductNo") & "'" & + " And OrgMaterialNo ='" & iugMaterial.iMESUltraGrid.ActiveRow.Cells("OrgMaterialNo").Value & "'" & + " And PutInPlaceType = 4 ") + If drSelMTL.Length > 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = drSelMTL(0)("OrgMaterialNo") + strTmpMaterialNo = drSEMI("ProductNo") + strTmpMaterialLotNo = drSEMI("LotNo") + decQty = drSEMI("Qty") + End If + intInputFlag = 1 + Else + '全部主物料比對 + For Each dr As DataRow In dsWIP.Tables(tblTMaterial).Rows + '檢查物料編號 + If dr("MaterialNo") = drSEMI("ProductNo") Then + '檢查投料點 + If dr("PutInPlaceType") = 2 Then + Dim drSel() As DataRow + drSel = dsWIP.Tables(tblTmpMTLLotNo).Select("MaterialNo='" & drSEMI("ProductNo") & "' And MaterialLotNo ='" & drSEMI("LotNo") & "'") + If drSel.Length = 0 Then + If intInputFlag <> 1 Then + strTmpOrgMaterialNo = dr("OrgMaterialNo") + strTmpMaterialNo = drSEMI("ProductNo") + strTmpMaterialLotNo = drSEMI("LotNo") + decQty = drSEMI("Qty") + End If + intInputFlag = 1 + End If + Else + strCheckPlaceMsg = "[%MaterialLotNo%]:" & pMaterialLotNo & ",[%MaterialNo%]:" & + dr("MaterialNo") & " [%PutInPlace%][%is not%][%WIP INVENTORY%] !" + End If + End If + Next + End If + + End If + Next + End If + + If intInputFlag = 1 Then + + '2019/06/18 Shih Kai, Mantis:0058359 ,若物料為指定用料, 則不可使用替代料 + If funGetSysParameter("CIMTLDBCheck") = "1" Then + If dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & strTmpOrgMaterialNo & "' And Specified = 1").Length > 0 AndAlso + strTmpOrgMaterialNo <> strTmpMaterialNo Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203079", "[%MaterialNo%]:" & strTmpOrgMaterialNo), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + + Dim drAdd As DataRow + drAdd = dsWIP.Tables(tblTmpMTLLotNo).NewRow + drAdd("OrgMaterialNo") = strTmpOrgMaterialNo + drAdd("MaterialNo") = strTmpMaterialNo + drAdd("SUBSTITUTEMATERIALNO") = strTmpMaterialNo + drAdd("MaterialLotNo") = strTmpMaterialLotNo + drAdd("Qty") = decQty + dsWIP.Tables(tblTmpMTLLotNo).Rows.Add(drAdd) + Else + If strCheckPlaceMsg <> "" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", strCheckPlaceMsg), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202104", "[%MaterialLotNo%]!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + + '選到新加入的列 + Dim Vals(1) As Object + Dim PmyKey(1) As DataColumn + PmyKey(0) = dsWIP.Tables(tblTmpMTLLotNo).Columns("MaterialNo") + PmyKey(1) = dsWIP.Tables(tblTmpMTLLotNo).Columns("MaterialLotNo") + Vals(0) = strTmpMaterialNo + Vals(1) = strTmpMaterialLotNo + + ugrRow = FindRecordPosition_ByMutiCol(iugMaterial, PmyKey, Vals) + If Not ugrRow Is Nothing Then + iugMaterial.iMESUltraGrid.ActiveRow = ugrRow + iugMaterial.iMESUltraGrid.ActiveRow.Selected = True + End If + + Return True + + End Function + +#End Region + +#Region "物料數量檢查" + + Structure MethodNames + ''' + ''' 檢查物料數量 + ''' + Const funCheckMTLQuantity = "funCheckMTLQuantity" + End Structure + + Private Function funCheckMTL() As Boolean + + For Each row As DataRow In dsWIP.Tables(tblTMaterial).Rows + If dsWIP.Tables(tblTmpMTLLotNo).Select("OrgMaterialNo = '" & row("OrgMaterialNo") & "'").Length <= 0 Then + ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203083", + row("MaterialNo") & "[%IS NOT ENOUGH%], [%PLEASE%][%EXECUTE%][%MOUNTMATERIAL%]")) + Return False + End If + Next + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter &= CombineXMLParameter("checkin", "CheckIn", "Boolean", CInput(True), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP_Material.CheckMTLForBR", InXml, dtTmpMTLLotNo.Copy) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + + If Not ChkExecutionSuccess(XmlDoc) Then + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Return False + End If + + Dim xmlList As XmlNodeList = XmlDoc.GetElementsByTagName("message") + If xmlList.Count > 0 Then + xmlList = xmlList(0).SelectNodes("note") + If xmlList.Count > 0 Then + For Each xmlNode As XmlNode In xmlList + If funProcessMessages(xmlNode) = False Then Return False + Next + End If + End If + + Return True + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Function + Private Function funProcessMessages(ByVal xmlNode As XmlNode) As Boolean + + Dim MCode, MType, MMsg As String + MCode = xmlNode.SelectNodes("mcode").Item(0).InnerText + MType = xmlNode.SelectNodes("mtype").Item(0).InnerText + MMsg = xmlNode.SelectNodes("mmsg").Item(0).InnerText + + Dim methodName As String = "" + If MMsg.Contains("{") AndAlso MMsg.Contains("}") Then + Dim intStart As Int16 = MMsg.IndexOf("{") + Dim intEnd As Int16 = MMsg.IndexOf("}") + methodName = MMsg.Substring(intStart + 1, intEnd - intStart - 1) + MMsg = MMsg.Substring(intEnd + 1, MMsg.Length - intEnd - 1) + End If + + Select Case methodName + Case MethodNames.funCheckMTLQuantity + If ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-100601", MMsg), MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.No Then + Return False + End If + + Case Else + ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg(MCode, MMsg), MsgBoxStyle.Exclamation, Me.Text) + Return False + End Select + + Return True + + End Function +#End Region + + '取eSOP 工位及作業站 資料 + Private Function funLoadPRDeSOP() As Integer + + funLoadPRDeSOP = -1 + If Not IsNothing(dsDefine.Tables(tblPRDeSOPBasis)) Then dsDefine.Tables.Remove(tblPRDeSOPBasis) + + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = "" + strParameter += CombineXMLParameter("productno", "ProductNo", "String", CInput(txtProductNo.Text), "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(txtOPNo.Text), "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + Dim XmlDoc As New XmlDocument + Try + ' 2016 YF, OutXml = wsPRD.LoadPRDeSOPBasis(InXml) + OutXml = InvokeSrv("wsPRD.LoadPRDeSOPBasis", InXml) + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + tblPRDeSOPBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadprdesopbasis").Item(0).SelectNodes("name").Item(0).InnerXml + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadprdesopbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsDefine.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + '取出Data() + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadprdesopbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsDefine.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + Finally + XmlDoc = Nothing + + End Try + funLoadPRDeSOP = 0 + + End Function + '顯示作業指導書(eSOP) 2016-12-19 + Private Function funDisplayProcess() As Integer + Dim XmlDoc As New XmlDocument() + Dim InXml, OutXml As String + Dim strTempRecord As String = String.Empty + Dim arriveTime As DateTime = DateTime.Now + Dim strERP_URL_eSOP As String + Dim responseValue, code As String + + Dim strSplitFile() As String + + Try + '---- InXml ----- + Dim InXmlDoc As XmlDocument = New XmlDocument() + + ' + Dim nodeParam As XmlElement = InXmlDoc.CreateElement("param") + nodeParam.SetAttribute("key", "std_data") + nodeParam.SetAttribute("type", "xml") + InXmlDoc.AppendChild(nodeParam) + + ' + Dim nodeDataRequest As XmlElement = InXmlDoc.CreateElement("data_request") + nodeParam.AppendChild(nodeDataRequest) + + ' + Dim nodeDataInfo As XmlElement = InXmlDoc.CreateElement("datainfo") + nodeDataRequest.AppendChild(nodeDataInfo) + + ' + Dim nodeParameter As XmlElement = InXmlDoc.CreateElement("parameter") + nodeParameter.SetAttribute("key", "sop_display") + nodeParameter.SetAttribute("type", "data") + nodeDataInfo.AppendChild(nodeParameter) + + ' + Dim nodeData As XmlElement = InXmlDoc.CreateElement("data") + nodeData.SetAttribute("name", "sop_display") + nodeParameter.AppendChild(nodeData) + + For Each drData As DataRow In dsDefine.Tables(tblPRDeSOPBasis).Rows + If drData("POSITIONNO") = "N/A" Then Continue For + 'sop no + strSplitFile = Split(drData("SOPFILE"), ".") + '顯示作業說明書必傳實體檔案,工位,執行時間 + ' + Dim nodeRow As XmlElement = InXmlDoc.CreateElement("row") + nodeRow.SetAttribute("seq", intRow) + nodeData.AppendChild(nodeRow) + + Dim nodeDField As XmlElement + ''sop編號 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_no") + nodeDField.SetAttribute("type", "string") + 'nodeDField.InnerText = strSplitFile(0) + nodeDField.InnerText = "" + nodeRow.AppendChild(nodeDField) + '指定版號: Y:指定 N:不指定 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_ver_assign") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = "" + nodeRow.AppendChild(nodeDField) + '版本 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_ver") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = "" + nodeRow.AppendChild(nodeDField) + '頁數 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_page") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = drData("PAGENO") + nodeRow.AppendChild(nodeDField) + '工位編號 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "station_no") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = drData("POSITIONNO") + nodeRow.AppendChild(nodeDField) + '實體檔名 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "sop_file") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = drData("SOPFILE") + nodeRow.AppendChild(nodeDField) + '傳送時間 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "report_datetime") + nodeDField.SetAttribute("type", "date") + nodeDField.SetAttribute("format", "yyyyMMddHHmmss") + nodeDField.InnerText = Now.ToString("yyyyMMddHHmmss") + nodeRow.AppendChild(nodeDField) + '備註 + nodeDField = InXmlDoc.CreateElement("field") + nodeDField.SetAttribute("name", "remark") + nodeDField.SetAttribute("type", "string") + nodeDField.InnerText = "" + nodeRow.AppendChild(nodeDField) + intRow = intRow + 1 + Next + Using obj As New COM_ERP.clsEAI + InXml = obj.funGenerateRequestXML(COM_ERP.clsEAI.ERPName.eSOP, InXmlDoc.InnerXml, "sop.display.process", False) + strERP_URL_eSOP = obj.getERP_WSURL(COM_ERP.clsEAI.ERPName.eSOP) + End Using + + '----- Call Web Service ----- + Using ws As New COM_ERP.wsESOP.eSOPService + + ws.Url = strERP_URL_eSOP + OutXml = ws.sop_display_process(InXml) + End Using + + code = "success" + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + code = "fail" + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + code = "fail" + Finally + + '紀錄TransactionLog + COM_ERP.clsCommon.addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "station.get", My.Computer.Name, + gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "station.get", LogClass:="WIP") + End Try + End Function + +#Region "作業人員" + + ''' + ''' 2016/12/26 YF, 顯示作業人員現況資訊 + ''' + ''' + ''' + Private Sub btnOperator_Click(sender As Object, e As EventArgs) Handles btnOperator.Click + + Dim parameters As Dictionary(Of String, Object) + Dim EquipmentNo As String = "" + + Try + + parameters = New Dictionary(Of String, Object) + + With dsWIP.Tables(tblLotState).Rows(0) + + Select Case .Item("MultiOperatorMode").ToString + Case "0" + ' 作業站 + parameters.Add("OPNo", .Item("OPNo").ToString) + Case "1" + ' 區域 + parameters.Add("AreaNo", .Item("AreaNo").ToString) + Case "2" + ' 設備 + For Each row As DataRow In dsWIP.Tables(tblAreaEquipment).Select("CheckFlag = True") + EquipmentNo += row("EquipmentNo") & "," + Next + + If (EquipmentNo = "") Then + Throw New iMESException.MESException("0000-103010", "[%PLEASE SELECT%] [%EQUIPMENT%]!") + End If + + EquipmentNo = EquipmentNo.TrimEnd(",") + parameters.Add("EquipmentNo", EquipmentNo) + Case "5" 'Mantis 63873: 增加判斷多人加工模式為生產批, 並傳入資料 + ' 生產批 + parameters.Add("LotNo", .Item("LotNo").ToString) + Case Else + Throw New iMESException.MESException("0000-003000", "[%MultiOperatorMode%]:" & .Item("MultiOperatorMode").ToString & " [%NOT DEFINE%]!") + End Select + + End With + + parameters.Add("EnableSignOut", False) + Me.ObjectFileHandler.Execute(pObjectID:="WP_OperatorOnline", pParameters:=parameters) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + +#End Region + + '2019/01/18 Eric 特殊生產需求顯示 + Private Sub btnSWR_Click(sender As System.Object, e As System.EventArgs) Handles btnSWR.Click + '2019/02/12 Eric 加入判斷有無資料 + If blnShowSWR = True Then + + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("MONo", txtMONo.Text) + Parameters.Add("CustomerLotNo", txtCustomerLotNo.Text) + Parameters.Add("OPNo", txtOPNo.Text) + Parameters.Add("LotNo", txtLotNo.Text) + Parameters.Add("DeviceNo", dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString) + Parameters.Add("CustomerNo", dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString) + Parameters.Add("LogGroupSerial", dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString) + Parameters.Add("blnCICo", False) + Me.ObjectFileHandler.Execute("WP_SWRBasisRead", Parameters) + + btnSWR.Visible = True + + End If + + End Sub + + '2019/02/12 Eric + Private Sub funLoadSWRJoinLog() + + Cursor.Current = Cursors.WaitCursor + + + If Not IsNothing(dsWIP.Tables(tblSWRJoinLog)) Then + dsWIP.Tables.Remove(tblSWRJoinLog) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("loggroupserial", "LogGroupSerial", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString), "") + strParameter += CombineXMLParameter("customerno", "CustomerNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(txtLotNo.Text), "") + strParameter += CombineXMLParameter("deviceno", "DeviceNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString), "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(txtOPNo.Text), "") + strParameter += CombineXMLParameter("customerlotno", "CustomerLotNo", "String", CInput(txtCustomerLotNo.Text), "") + strParameter += CombineXMLParameter("mono", "MONo", "String", CInput(txtMONo.Text), "") + strParameter += CombineXMLParameter("status", "Status", "Integer", 2, "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + + OutXml = InvokeSrv("wsWIP.LoadSWRBasisJoinLog", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSWRJoinLog = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadswrbasisjoinlog").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadswrbasisjoinlog").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadswrbasisjoinlog").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub funLoadAllMaterialLot() + + Dim drAdd As DataRow + Dim drSel As DataRow() + Dim defNullDate As Date = CDate("9999/12/31") '製造日期或保存期限為Null時, 填入9999/12/31, 以防步Null錯誤, 因Null表示不受管控, 可以較後使用, 故填入較大的值 + + dtAllMTLLot = New DataTable("AllMTLLot") + dtAllMTLLot.Columns.Add("MaterialNo", System.Type.GetType("System.String")) '主料號 + dtAllMTLLot.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtAllMTLLot.Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dtAllMTLLot.Columns.Add("MFGDate", System.Type.GetType("System.DateTime")) + dtAllMTLLot.Columns.Add("ExpireDate", System.Type.GetType("System.DateTime")) + dtAllMTLLot.Columns.Add("InputDate", System.Type.GetType("System.DateTime")) + + dtAllMTLLot.Columns.Add("SubstituteMaterialNo", System.Type.GetType("System.String")) '新增一替代料欄位,2010/03/26,by yumei, 實際用料的料號 + dtAllMTLLot.Columns.Add("SubstituteMaterialLevel", System.Type.GetType("System.Int16")) '新增一替代料位階欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("SubstituteMaterialType", System.Type.GetType("System.String")) '新增一替代料類型欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("SubstituteStdQty", System.Type.GetType("System.Decimal")) '新增一替代料標準用量欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) '新增一替代料是否檢查批號欄位,2013/01/08,by Kevin + + dtAllMTLLot.Columns.Add("SeqNo", System.Type.GetType("System.Int16")) '記錄同料號間各料批應被使用的次序 + dtAllMTLLot.Columns.Add("blnExpireDate", System.Type.GetType("System.Boolean")) '紀錄是否有超過有效期限 有:True 沒有:False + + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + + Case "0" ' 發料點(線邊倉或工單) + '將Temp_Material中各主料所有可用料批全數取出, 存入dtAllMTLLot中 + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + If drMTL("LOTNO").ToString <> "" Then + Call funLoadSubstituteMaterial_Main(LotNo, drMTL("MaterialNo"), drMTL("UnitNo")) + For Each drMTLLot As DataRow In dsWIP.Tables(tblSubstituteMaterial).Rows + drAdd = dtAllMTLLot.NewRow + drAdd("MaterialNo") = drMTL("MaterialNo") 'BOM的主料號 + drAdd("MaterialLotNo") = drMTLLot("MaterialLotNo") + drAdd("Qty") = drMTLLot("Qty") + 'drAdd("MFGDate") = drMTLLot("ManufactureDate") + 'drAdd("ExpireDate") = drMTLLot("ExpireDate") + If drMTLLot("ManufactureDate").ToString = "" Then + drAdd("MFGDate") = defNullDate + Else + drAdd("MFGDate") = drMTLLot("ManufactureDate") + End If + If drMTLLot("ExpireDate").ToString = "" Then + drAdd("ExpireDate") = defNullDate + Else + drAdd("ExpireDate") = drMTLLot("ExpireDate") + End If + If drMTLLot("InputDate").ToString = "" Then + drAdd("InputDate") = defNullDate + Else + drAdd("InputDate") = drMTLLot("InputDate") + End If + + drAdd("SubstituteMaterialNo") = drMTLLot("MaterialNo") '實際料號, 有可能與主料號同也有可能是替代料號 + drAdd("SubstituteMaterialLevel") = drMTLLot("SubstituteMaterialLevel") + drAdd("SubstituteMaterialType") = drMTLLot("SubstituteMaterialType") + drAdd("SubstituteStdQty") = drMTLLot("SubstituteStdQty") + drAdd("CheckLotNo") = drMTLLot("CheckLotNo") + dtAllMTLLot.Rows.Add(drAdd) + Next + End If + Next + + '計算同一料號各料批的使用次序 + Dim dvAllMTLLot, dvTemp As DataView + Dim dtTemp As DataTable + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + If drMTL("LOTNO").ToString <> "" Then + 'drSel = dtAllMTLLot.Select("MaterialNo = '" & drMTL("MaterialNo") & "'", "MFGDate, ExpireDate, InputDate") + 'For idx As Integer = 0 To drSel.Length - 1 + ' drSel(idx)("SeqNo") = idx + 1 + 'Next + dvAllMTLLot = New DataView(dtAllMTLLot) + dvAllMTLLot.RowFilter = "MaterialNo = '" & drMTL("MaterialNo") & "'" + dtTemp = dvAllMTLLot.ToTable(True, {"MFGDate", "ExpireDate", "InputDate"}) '對製造日期,有效日期,入庫日做Distinct篩選 + dvTemp = dtTemp.DefaultView + dvTemp.Sort = "MFGDate, ExpireDate, InputDate" + '當MFGDate, ExpireDate, InputDate皆相同時, 需給予相同的SeqNo, 故以Distinct的三個日期下去跑Loop + For idx As Integer = 0 To dvTemp.Count - 1 + drSel = dtAllMTLLot.Select("MaterialNo = '" & drMTL("MaterialNo") & "'" & + "And MFGDate = #" & Format(dvTemp(idx)("MFGDate"), "yyyy/MM/dd HH:mm:ss") & "#" & + " And ExpireDate = #" & Format(dvTemp(idx)("ExpireDate"), "yyyy/MM/dd HH:mm:ss") & "#" & + " And InputDate = #" & Format(dvTemp(idx)("InputDate"), "yyyy/MM/dd HH:mm:ss") & "#") + For j As Integer = 0 To drSel.Length - 1 + drSel(j)("SeqNo") = idx + 1 + If Now > CDate(drSel(j)("EXPIREDATE")) Then '判定是否超過有效期限 + drSel(j)("blnExpireDate") = True + Else + drSel(j)("blnExpireDate") = False + End If + Next + Next + End If + Next + + End Select + + End Sub + +#Region "CheckEQPQCList" + + Private Function funCheckEQPQCList(ByVal EquipmentNo As String, ByRef CheckResult As String) As Integer + + funCheckEQPQCList = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.CheckEQPQCList", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出CheckResult + If XmlDoc.GetElementsByTagName("checkresult").Item(0).SelectNodes("value").Count > 0 Then + CheckResult = XmlDoc.DocumentElement.GetElementsByTagName("checkresult").Item(0).SelectNodes("value").Item(0).InnerText + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funCheckEQPQCList = 0 + + End Function + + Private Function funCheckEQPQCTask(ByVal EquipmentNo As String, Optional ByVal CancelUpdate As Boolean = False) As Integer + + funCheckEQPQCTask = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("cancelupdate", "CancelUpdate", "Boolean", CancelUpdate, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.CheckEQPQCTask", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funCheckEQPQCTask = 0 + + End Function + +#End Region + + +#Region "ChkCIEQPDispatch" + ''2023/05/29 ,0135702: [6.0.7] SDD220425_01-03_進站設備派工查核調整,19245 + Private Sub ChkCIEQPDispatch(ByVal EquipmentNo As String, ByVal LotNo As String, Optional OpNo As String = defString) + + If Not IsNothing(dsEQP) Then + dsEQP.Clear() + dsEQP.Dispose() + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Dim XmlDoc As New XmlDocument + Try + OutXml = InvokeSrv("wsWIP.ChkCIEQPDispatch", InXml) + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + ckhEQPDispatchRule = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("chkcieqpdispatch").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("chkcieqpdispatch").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsEQP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("chkcieqpdispatch").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsEQP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + End Sub + +#End Region + Private Sub DeleteTmpMTLLotNo(ByVal EquipmentNo As String) + + Dim drSelTmpMTL As DataRow() = dsWIP.Tables(tblTmpMTLLotNo).Select("EquipmentNo = '" & EquipmentNo & "'") + For i As Integer = drSelTmpMTL.Count - 1 To 0 Step -1 + drSelTmpMTL(i).Delete() + Next + dsWIP.Tables(tblTmpMTLLotNo).AcceptChanges() + + End Sub + Private Sub LoadMaterialByEquipment(ByVal EquipmentNo As String) + + Try + DeleteTmpMTLLotNo(EquipmentNo) + + Dim MONo As String = dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString + Dim OrgMaterialNo As String + ' 依設備及工單取出設備上料現況 + Dim dtMaterialState As DataTable + If (Not LoadEQPMaterialState(dtMaterialState, EquipmentNo, MONo)) Then + Exit Sub + End If + + ' 寫入暫存表 + For Each r As DataRowView In dtMaterialState.DefaultView + 'Dim drSel() As DataRow = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & r("MaterialNo") & "' ") + '物料表中的materialno是* 改成InputMaterialNo 14278 + Dim drSel() As DataRow = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & r("InputMaterialNo") & "' ") + If drSel.Length > 0 Then + '根据实际用料 投料点 和检查料批 找到用料清单的数据 原物料-------- + Dim drSel1() As DataRow = dsOE.Tables(strMOList).Select("SubstituteMaterialNo='" & r("InputMaterialNo").ToString & "' and PutInPlaceType='" & drSel(0)("PutInPlaceType") & "' AND CheckLotNo='" & drSel(0)("CHECKLOTNO") & "'") + If drSel1.Length > 0 Then + OrgMaterialNo = drSel1(0)("MATERIALNO").ToString() + End If + ''---------------------- + If drSel(0)("PutInPlaceType") = 3 Then + If r("MONO").ToString.ToUpper = MONo.ToUpper Then + Dim drAdd As DataRow = dsWIP.Tables(tblTmpMTLLotNo).NewRow + drAdd("EquipmentNo") = r("EquipmentNo") + 'drAdd("OrgMaterialNo") = r("MaterialNo").ToString 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("OrgMaterialNo") = OrgMaterialNo 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("SUBSTITUTEMATERIALNO") = r("InputMaterialNo").ToString + drAdd("MaterialNo") = r("InputMaterialNo").ToString 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("MaterialLotNo") = r("MaterialLotNo").ToString 'pMaterialLotNo + drAdd("Qty") = r("Qty") + dsWIP.Tables(tblTmpMTLLotNo).Rows.Add(drAdd) + End If + ElseIf drSel(0)("PutInPlaceType") = 2 OrElse drSel(0)("PutInPlaceType") = 4 Then + If r("MONO").ToString.ToUpper = "N/A" Then + Dim drAdd As DataRow = dsWIP.Tables(tblTmpMTLLotNo).NewRow + drAdd("EquipmentNo") = r("EquipmentNo") + 'drAdd("OrgMaterialNo") = r("MaterialNo").ToString 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("OrgMaterialNo") = OrgMaterialNo 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("SUBSTITUTEMATERIALNO") = r("InputMaterialNo").ToString + drAdd("MaterialNo") = r("InputMaterialNo").ToString 'Me.iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + drAdd("MaterialLotNo") = r("MaterialLotNo").ToString 'pMaterialLotNo + drAdd("Qty") = r("Qty") + dsWIP.Tables(tblTmpMTLLotNo).Rows.Add(drAdd) + End If + End If + End If + Next + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + Private Sub uegMaterial_KeyIn2_ExpandedStateChanged(sender As Object, e As EventArgs) Handles uegMaterial_KeyIn2.ExpandedStateChanged, uegAttrib_Equipment.ExpandedStateChanged + + If uegMaterial_KeyIn2.Expanded Then + + If uegAttrib_Equipment.Expanded Then + uegMaterial_KeyIn2.Size = New System.Drawing.Size(uegMaterial_KeyIn2.Width, (uplAll.Height - uegLotInfo.Height) / 2 - 10) + uegAttrib_Equipment.Size = New System.Drawing.Size(uegAttrib_Equipment.Width, (uplAll.Height - uegLotInfo.Height) / 2 - 10) + End If + + Else + + If uegAttrib_Equipment.Expanded Then + uegAttrib_Equipment.Size = New System.Drawing.Size(uegAttrib_Equipment.Width, uplAll.Height - uegLotInfo.Height - 20) + End If + + End If + + End Sub +#Region "'//^_^ADD BY H-14278 2023-12-29 新设备上料" + ''' + ''' 获取工单用料清单 + ''' + ''' + ''' + Private Sub funLoadMOMaterialList(ByVal MONo As String, ByVal OPNo As String) '//取出MO MaterialList資料 + + + Dim i, j As Integer + + If Not IsNothing(dsOE.Tables(strMOList)) Then '修正用料清單多次查詢重複計算問題 + dsOE.Tables.Remove(strMOList) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("mono", "MONo", "String", MONo.ToUpper, "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", OPNo.ToUpper, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsOE.LoadMOMaterialListJoinMOBasis(InXml) + OutXml = InvokeSrv("wsOE.LoadMOMaterialListJoinMOBasis", InXml) + + '利用XmlDoc物件處理ReturnValue + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + + strMOList = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmomateriallistjoinmobasis").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmomateriallistjoinmobasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsOE.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmomateriallistjoinmobasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsOE.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + XmlDoc = Nothing + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load MO Material List Failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + + Finally + tmpStringReader = Nothing + End Try + + End Sub + +#End Region + +End Class diff --git a/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/iMES.snk b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/iMES.snk new file mode 100644 index 0000000..4206cdc Binary files /dev/null and b/SRC/MESWin/SXS5/BR_L_CI_GEN_21681/iMES.snk differ diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.sln b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.sln new file mode 100644 index 0000000..6cd5641 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.sln @@ -0,0 +1,42 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BR_L_CO_GEN", "BR_L_CO_GEN.vbproj", "{380C6B38-FB64-49BE-A9A8-5E49015ADFD2}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Test", "..\..\Test\Test.vbproj", "{C4A48E3F-38E4-4E88-A47D-FA5510686E57}" + ProjectSection(ProjectDependencies) = postProject + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2} = {380C6B38-FB64-49BE-A9A8-5E49015ADFD2} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2}.Debug|x86.ActiveCfg = Debug|x86 + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2}.Debug|x86.Build.0 = Debug|x86 + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2}.Release|x86.ActiveCfg = Release|x86 + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2}.Release|x86.Build.0 = Release|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Debug|x86.ActiveCfg = Debug|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Debug|x86.Build.0 = Debug|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Release|x86.ActiveCfg = Release|x86 + {C4A48E3F-38E4-4E88-A47D-FA5510686E57}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(TeamFoundationVersionControl) = preSolution + SccNumberOfProjects = 3 + SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} + SccTeamFoundationServer = http://tfs.imestech.com:8080/tfs/messeries6 + SccLocalPath0 = . + SccProjectUniqueName1 = ..\\..\\Test\\Test.vbproj + SccProjectName1 = ../../Test + SccLocalPath1 = ..\\..\\Test + SccProjectUniqueName2 = BR_L_CO_GEN.vbproj + SccLocalPath2 = . + EndGlobalSection +EndGlobal diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj new file mode 100644 index 0000000..c4c85fc --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj @@ -0,0 +1,247 @@ + + + + + Debug + x86 + {380C6B38-FB64-49BE-A9A8-5E49015ADFD2} + Library + BR_L_CO_GEN + BR_L_CO_GEN + 512 + Windows + v4.6.2 + + SAK + SAK + SAK + SAK + + + true + full + true + true + ..\..\..\MESClient\ + BR_L_CO_GEN.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 0 + false + + + pdbonly + false + true + true + bin\Release\ + BR_L_CO_GEN.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + 0 + false + + + On + + + Binary + + + Off + + + On + + + true + true + true + ..\..\..\MESClient\ + BR_L_CO_GEN.xml + 0 + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + full + x86 + MinimumRecommendedRules.ruleset + false + + + true + ..\..\..\MESClient\ + BR_L_CO_GEN.xml + true + 0 + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + pdbonly + x86 + MinimumRecommendedRules.ruleset + false + + + true + + + iMES.snk + + + + False + ..\..\..\MES_C_DLL\iMESWizards.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinGrid.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.UltraWinEditors.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Win.Misc.v19.1.dll + False + + + False + C:\Program Files (x86)\Infragistics\2019.1\Windows Forms\CLR4.0\Bin\Infragistics4.Shared.v19.1.dll + False + + + False + ..\..\..\MESClient\COM_ERP.dll + False + + + ..\..\..\MESClient\COM_Kit.dll + False + + + False + ..\..\..\MESClient\COM_Search.dll + False + + + False + ..\..\..\MESClient\COM_Utility.dll + False + + + ..\..\..\MES_C_DLL\iMESException.dll + False + + + ..\..\..\MES_C_DLL\iMESExceptionManager.dll + False + + + ..\..\..\MES_C_DLL\iMESUltraGrid.dll + False + + + + + + + + + + + + + + False + ..\..\..\MESClient\WP_Kit.dll + False + + + + + + + + + + + + + + + + + + + + + + + modConstant.vb + + + Form + + + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + frmBinStateAdjust .vb + + + frmBR_L_CO_GEN.vb + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj.user b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj.user new file mode 100644 index 0000000..9b86104 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj.user @@ -0,0 +1,6 @@ + + + + ShowAllFiles + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj.vspscc b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj.vspscc new file mode 100644 index 0000000..b6d3289 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/BR_L_CO_GEN.vbproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Application.Designer.vb b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Application.Designer.vb new file mode 100644 index 0000000..4f9342a --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Application.myapp b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Application.myapp new file mode 100644 index 0000000..758895d --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 1 + true + diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/AssemblyInfo.vb b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..0e7d318 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' 組件的一般資訊是由下列的屬性集控制。 +' 變更這些屬性的值即可修改組件的相關 +' 資訊。 + +' 檢閱組件屬性的值 + + + + + + + + + + +'下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID + + +' 組件的版本資訊由下列四個值所組成: +' +' 主要版本 +' 次要版本 +' 組建編號 +' 修訂編號 +' +' 您可以指定所有的值,也可以依照以下的方式,使用 '*' 將組建和修訂編號 +' 指定為預設值: +' + + + diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/BuildIncrementVersionInfo.vb b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/BuildIncrementVersionInfo.vb new file mode 100644 index 0000000..5b9b9b2 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/BuildIncrementVersionInfo.vb @@ -0,0 +1 @@ + diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Resources.Designer.vb b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Resources.Designer.vb new file mode 100644 index 0000000..c23eff7 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + '這個類別是自動產生的,是利用 StronglyTypedResourceBuilder + '類別透過 ResGen 或 Visual Studio 這類工具。 + '若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen + '(利用 /str 選項),或重建您的 VS 專案。 + ''' + ''' 用於查詢當地語系化字串等的強類型資源類別。 + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' 傳回這個類別使用的快取的 ResourceManager 執行個體。 + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BR_L_CO_GEN.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有 + ''' 使用這個強類型資源類別的資源查閱。 + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Resources.resx b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Settings.Designer.vb b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Settings.Designer.vb new file mode 100644 index 0000000..df0daf8 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' 這段程式碼是由工具產生的。 +' 執行階段版本:4.0.30319.42000 +' +' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, +' 變更將會遺失。 +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings 自動儲存功能" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.BR_L_CO_GEN.My.MySettings + Get + Return Global.BR_L_CO_GEN.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Settings.settings b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Settings.settings new file mode 100644 index 0000000..f7f176a --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/Settings.settings @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/licenses.licx b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/licenses.licx new file mode 100644 index 0000000..d8bdaee --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/My Project/licenses.licx @@ -0,0 +1,5 @@ +Infragistics.Win.UltraWinEditors.UltraTextEditor, Infragistics4.Win.UltraWinEditors.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraPanel, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraSplitter, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraButton, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb +Infragistics.Win.Misc.UltraExpandableGroupBox, Infragistics4.Win.Misc.v19.1, Version=19.1.20191.294, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBR_L_CO_GEN.resx b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBR_L_CO_GEN.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBR_L_CO_GEN.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBR_L_CO_GEN.vb b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBR_L_CO_GEN.vb new file mode 100644 index 0000000..ac8a6b0 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBR_L_CO_GEN.vb @@ -0,0 +1,6640 @@ +Imports iMESExceptionManager + +Imports Infragistics.Win.UltraWinGrid +Imports COM_ERP.clsTipTop +Imports COM_ERP.clsTipTop_ICD +Imports COM_ERP.clsCommon +Imports Infragistics.Win + +''' +''' 2016/12/26 YF, 增加新制多人加工(btnOperator), 先將舊有的多人加工隱藏(btnMultiUser) +''' +Public Class frmBR_L_CO_GEN + Inherits System.Windows.Forms.Form + + '//Public Variables + Public LotNo As String = defString + Public UserId As String = defString + Public PrivFunNo As String = defString + + '//Web Service相關變數 + Dim tmpStringReader As System.IO.StringReader + Dim InXml, OutXml, strIdentity, strParameter, XmlData, XmlSchema As String + + '//資料表相關變數 + Dim dsWIP, dsTemp, dsDefine As New DataSet + Dim dtKeyIn, dtMLot As DataTable + Dim drAdd As DataRow + Dim tbllotbasis, tblLotState, tblTAttrib, tblTMaterial, tblTEquipment, tblOPError, tblSYSParameter, tblProductBasis, tblOEMOBasis, tblParameter, tblSWRJoinLog, strBinState, strSysBin As String + Dim tblSubstituteMaterial, tblOPBasis As String + + '//其他共用變數 + Dim PhaseNo As Integer + Dim ugrRow As Infragistics.Win.UltraWinGrid.UltraGridRow + Dim calCustomer As New clsCalculator + Dim dvSysBin As DataView + Dim dtBinNew As DataTable + Dim iGoodBinStateQty As Integer = 0 + 'Reverse + Dim RevLotSerial As String = defString + Dim RevLotStamp As Long = defInteger + Dim strDefaultValue As String + Dim editor As Infragistics.Win.DateTimeEditor + + ' 2016/08/30 YF, ObjectFile物件 + Dim ObjectFileHandler As COM_Utility.ObjectFileHandler + '2019/01/19 Eric 系統參數EnableSWR_CICO + Dim strEnableSWR_CICO As String = defString + '2019/02/12 Eric 特殊生產需求是否有資料 + Dim blnShowSWR As Boolean = False + + '2019/9/5, ning, 料批先進先出與回溫卡控 + Dim dtAllMTLLot As DataTable '所有可用料批資料 + Dim tblTMaterialLot, tblMTLProperty As String + + Dim blnByEQP As Boolean = False + Dim HaveComponent, HaveLevel As Boolean + + Dim strTableName As String + Dim vlMaterialLevel As New ValueList + + Dim dsINV As New DataSet + Dim strRaw As String + '2021/06/10 子設備 + Dim strPara As String + Dim blnChamber As Boolean + + '240119 By 21681 客制信息 + Dim dsKz As New DataSet + Dim dtKzTable As New DataTable + Dim tblKzTable As String + Dim vlKzValueList As New ValueList + + '新设备上料14278 + Dim dsOE As New DataSet '資料集:儲存取回之資料? + Dim strMOList As String '儲存取回資料表的名稱? + + Friend WithEvents chkUpdCheckOutTime As CheckBox + Friend WithEvents txtUnionProductNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtUnionProductVersion As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents btnGetProduct As Infragistics.Win.Misc.UltraButton + Friend WithEvents txtUnionProductUnit As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents btnSWR As Infragistics.Win.Misc.UltraButton + Friend WithEvents chkUnionProductNo As CheckBox + Friend WithEvents btnBinStateAdjust As Infragistics.Win.Misc.UltraButton + Friend WithEvents uplAll As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uegMaterial_KeyIn2 As Infragistics.Win.Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel4 As Infragistics.Win.Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel4 As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uplMaterial_KeyIn As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uplKeyIn As Infragistics.Win.Misc.UltraPanel + Friend WithEvents UltraSplitter2 As Infragistics.Win.Misc.UltraSplitter + Friend WithEvents uplMaterial As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uegAttrib_Equipment As Infragistics.Win.Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel2 As Infragistics.Win.Misc.UltraExpandableGroupBoxPanel + Friend WithEvents UltraPanel2 As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uplAttrib_Equipment As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uplEquipment As Infragistics.Win.Misc.UltraPanel + Friend WithEvents UltraSplitter1 As Infragistics.Win.Misc.UltraSplitter + Friend WithEvents uplAttrib As Infragistics.Win.Misc.UltraPanel + Friend WithEvents uegLotInfo As Infragistics.Win.Misc.UltraExpandableGroupBox + Friend WithEvents UltraExpandableGroupBoxPanel1 As Infragistics.Win.Misc.UltraExpandableGroupBoxPanel + Friend WithEvents iugKzxx As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents UltraPanel1 As Infragistics.Win.Misc.UltraPanel + +#Region " Windows Form 設計工具產生的程式碼 " + + Public Sub New() + MyBase.New() + + '此呼叫為 Windows Form 設計工具的必要項。 + + InitializeComponent() + + '在 InitializeComponent() 呼叫之後加入所有的初始設定 + ' 2016/08/30 YF, 開另一條執行緒建立會使用到的物件 + Threading.ThreadPool.QueueUserWorkItem(New Threading.WaitCallback( + Sub(pState As Object) + ' 呼叫COM_Utility.ObjectFileHandler建構子, 傳入要載入的ObjectID + Me.ObjectFileHandler = New COM_Utility.ObjectFileHandler("WP_OperatorLogIn_Lot", "WP_MaterialQtyInput_Main", "WP_SWRBasisRead") + End Sub)) + + End Sub + + 'Form 覆寫 Dispose 以清除元件清單。 + + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing Then + If Not (components Is Nothing) Then + components.Dispose() + End If + End If + MyBase.Dispose(disposing) + End Sub + + '為 Windows Form 設計工具的必要項 + Private components As System.ComponentModel.IContainer + + '注意: 以下為 Windows Form 設計工具所需的程序 + + '您可以使用 Windows Form 設計工具進行修改。 + + '請勿使用程式碼編輯器來修改這些程序。 + + Friend WithEvents txtMaterialLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblMaterialLotNo As System.Windows.Forms.Label + Friend WithEvents btnOperator As Infragistics.Win.Misc.UltraButton + Friend WithEvents SBar1 As System.Windows.Forms.StatusBar + Friend WithEvents SBarPanel1 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel4 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel2 As System.Windows.Forms.StatusBarPanel + Friend WithEvents SBarPanel3 As System.Windows.Forms.StatusBarPanel + Friend WithEvents txtOPNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblOPDescription As System.Windows.Forms.Label + Friend WithEvents txtProductNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblProductNo As System.Windows.Forms.Label + Friend WithEvents txtCustomerLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtMONo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtShiftNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtEmployeeNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtAreaNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtPriority As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtSysUnitNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtSysQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCurUnitNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtCurQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtOPDescription As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents txtLotNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblPriority As System.Windows.Forms.Label + Friend WithEvents lblMONo As System.Windows.Forms.Label + Friend WithEvents lblCustomerLotNo As System.Windows.Forms.Label + Friend WithEvents lblShiftNo As System.Windows.Forms.Label + Friend WithEvents lblOPNo As System.Windows.Forms.Label + Friend WithEvents lblEmployeeNo As System.Windows.Forms.Label + Friend WithEvents lblAreaNo As System.Windows.Forms.Label + Friend WithEvents lblSysQty As System.Windows.Forms.Label + Friend WithEvents lblCurQty As System.Windows.Forms.Label + Friend WithEvents lblLotNo As System.Windows.Forms.Label + Friend WithEvents txtLotRecord As System.Windows.Forms.RichTextBox + Friend WithEvents iugKeyIn As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents lblLotRecord As System.Windows.Forms.Label + Friend WithEvents btnClose As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnConfirm As Infragistics.Win.Misc.UltraButton + Friend WithEvents iugMaterial As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugEquipment As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents iugAttrib As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents gbxLotInfo As System.Windows.Forms.GroupBox + Friend WithEvents txtMaterialNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblMaterialNo As System.Windows.Forms.Label + Friend WithEvents gbxMaterial As System.Windows.Forms.GroupBox + Friend WithEvents btnKeyIn As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnDel As Infragistics.Win.Misc.UltraButton + Friend WithEvents iugError As iMESUltraGrid.iMESUltraGridControl + Friend WithEvents gbxError As System.Windows.Forms.GroupBox + Friend WithEvents txtErrorNo As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblErrorNo As System.Windows.Forms.Label + Friend WithEvents txtErrorQty As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents lblErrorQty As System.Windows.Forms.Label + Friend WithEvents lblupdcheckouttime As System.Windows.Forms.Label + Friend WithEvents dtpcheckouttime As System.Windows.Forms.DateTimePicker + Friend WithEvents txtOPName As Infragistics.Win.UltraWinEditors.UltraTextEditor + Friend WithEvents btnMultiUser As Infragistics.Win.Misc.UltraButton + Private Sub InitializeComponent() + Me.SBar1 = New System.Windows.Forms.StatusBar() + Me.SBarPanel1 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel2 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel3 = New System.Windows.Forms.StatusBarPanel() + Me.SBarPanel4 = New System.Windows.Forms.StatusBarPanel() + Me.gbxLotInfo = New System.Windows.Forms.GroupBox() + Me.txtOPName = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtOPNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblOPDescription = New System.Windows.Forms.Label() + Me.txtProductNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCustomerLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtMONo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtShiftNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtEmployeeNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtAreaNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtPriority = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtSysUnitNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtSysQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCurUnitNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtCurQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtOPDescription = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblPriority = New System.Windows.Forms.Label() + Me.lblMONo = New System.Windows.Forms.Label() + Me.lblCustomerLotNo = New System.Windows.Forms.Label() + Me.lblShiftNo = New System.Windows.Forms.Label() + Me.lblOPNo = New System.Windows.Forms.Label() + Me.lblEmployeeNo = New System.Windows.Forms.Label() + Me.lblAreaNo = New System.Windows.Forms.Label() + Me.lblSysQty = New System.Windows.Forms.Label() + Me.lblCurQty = New System.Windows.Forms.Label() + Me.lblLotNo = New System.Windows.Forms.Label() + Me.lblProductNo = New System.Windows.Forms.Label() + Me.txtLotRecord = New System.Windows.Forms.RichTextBox() + Me.iugKeyIn = New iMESUltraGrid.iMESUltraGridControl() + Me.lblLotRecord = New System.Windows.Forms.Label() + Me.btnClose = New Infragistics.Win.Misc.UltraButton() + Me.btnConfirm = New Infragistics.Win.Misc.UltraButton() + Me.iugMaterial = New iMESUltraGrid.iMESUltraGridControl() + Me.iugEquipment = New iMESUltraGrid.iMESUltraGridControl() + Me.iugAttrib = New iMESUltraGrid.iMESUltraGridControl() + Me.txtMaterialNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblMaterialNo = New System.Windows.Forms.Label() + Me.gbxMaterial = New System.Windows.Forms.GroupBox() + Me.btnKeyIn = New Infragistics.Win.Misc.UltraButton() + Me.txtMaterialLotNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblMaterialLotNo = New System.Windows.Forms.Label() + Me.btnDel = New Infragistics.Win.Misc.UltraButton() + Me.iugError = New iMESUltraGrid.iMESUltraGridControl() + Me.gbxError = New System.Windows.Forms.GroupBox() + Me.txtErrorQty = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblErrorQty = New System.Windows.Forms.Label() + Me.txtErrorNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.lblErrorNo = New System.Windows.Forms.Label() + Me.dtpcheckouttime = New System.Windows.Forms.DateTimePicker() + Me.lblupdcheckouttime = New System.Windows.Forms.Label() + Me.btnMultiUser = New Infragistics.Win.Misc.UltraButton() + Me.btnOperator = New Infragistics.Win.Misc.UltraButton() + Me.chkUpdCheckOutTime = New System.Windows.Forms.CheckBox() + Me.txtUnionProductNo = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.txtUnionProductVersion = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.btnGetProduct = New Infragistics.Win.Misc.UltraButton() + Me.txtUnionProductUnit = New Infragistics.Win.UltraWinEditors.UltraTextEditor() + Me.btnSWR = New Infragistics.Win.Misc.UltraButton() + Me.chkUnionProductNo = New System.Windows.Forms.CheckBox() + Me.btnBinStateAdjust = New Infragistics.Win.Misc.UltraButton() + Me.uplAll = New Infragistics.Win.Misc.UltraPanel() + Me.uegMaterial_KeyIn2 = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel4 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel4 = New Infragistics.Win.Misc.UltraPanel() + Me.uplMaterial_KeyIn = New Infragistics.Win.Misc.UltraPanel() + Me.uplKeyIn = New Infragistics.Win.Misc.UltraPanel() + Me.UltraSplitter2 = New Infragistics.Win.Misc.UltraSplitter() + Me.uplMaterial = New Infragistics.Win.Misc.UltraPanel() + Me.uegAttrib_Equipment = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel2 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel2 = New Infragistics.Win.Misc.UltraPanel() + Me.uplAttrib_Equipment = New Infragistics.Win.Misc.UltraPanel() + Me.uplEquipment = New Infragistics.Win.Misc.UltraPanel() + Me.UltraSplitter1 = New Infragistics.Win.Misc.UltraSplitter() + Me.uplAttrib = New Infragistics.Win.Misc.UltraPanel() + Me.uegLotInfo = New Infragistics.Win.Misc.UltraExpandableGroupBox() + Me.UltraExpandableGroupBoxPanel1 = New Infragistics.Win.Misc.UltraExpandableGroupBoxPanel() + Me.UltraPanel1 = New Infragistics.Win.Misc.UltraPanel() + Me.iugKzxx = New iMESUltraGrid.iMESUltraGridControl() + CType(Me.SBarPanel1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel3, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SBarPanel4, System.ComponentModel.ISupportInitialize).BeginInit() + Me.gbxLotInfo.SuspendLayout() + CType(Me.txtOPName, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtOPNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtProductNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCustomerLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtMONo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtShiftNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtEmployeeNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtAreaNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtPriority, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSysUnitNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtSysQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCurUnitNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtCurQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtOPDescription, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtMaterialNo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.gbxMaterial.SuspendLayout() + CType(Me.txtMaterialLotNo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.gbxError.SuspendLayout() + CType(Me.txtErrorQty, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtErrorNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtUnionProductNo, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtUnionProductVersion, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtUnionProductUnit, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uplAll.ClientArea.SuspendLayout() + Me.uplAll.SuspendLayout() + CType(Me.uegMaterial_KeyIn2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegMaterial_KeyIn2.SuspendLayout() + Me.UltraExpandableGroupBoxPanel4.SuspendLayout() + Me.UltraPanel4.ClientArea.SuspendLayout() + Me.UltraPanel4.SuspendLayout() + Me.uplMaterial_KeyIn.ClientArea.SuspendLayout() + Me.uplMaterial_KeyIn.SuspendLayout() + Me.uplKeyIn.ClientArea.SuspendLayout() + Me.uplKeyIn.SuspendLayout() + Me.uplMaterial.ClientArea.SuspendLayout() + Me.uplMaterial.SuspendLayout() + CType(Me.uegAttrib_Equipment, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegAttrib_Equipment.SuspendLayout() + Me.UltraExpandableGroupBoxPanel2.SuspendLayout() + Me.UltraPanel2.ClientArea.SuspendLayout() + Me.UltraPanel2.SuspendLayout() + Me.uplAttrib_Equipment.ClientArea.SuspendLayout() + Me.uplAttrib_Equipment.SuspendLayout() + Me.uplEquipment.ClientArea.SuspendLayout() + Me.uplEquipment.SuspendLayout() + Me.uplAttrib.ClientArea.SuspendLayout() + Me.uplAttrib.SuspendLayout() + CType(Me.uegLotInfo, System.ComponentModel.ISupportInitialize).BeginInit() + Me.uegLotInfo.SuspendLayout() + Me.UltraExpandableGroupBoxPanel1.SuspendLayout() + Me.UltraPanel1.ClientArea.SuspendLayout() + Me.UltraPanel1.SuspendLayout() + Me.SuspendLayout() + ' + 'SBar1 + ' + Me.SBar1.Font = New System.Drawing.Font("Times New Roman", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.SBar1.Location = New System.Drawing.Point(0, 710) + Me.SBar1.Name = "SBar1" + Me.SBar1.Panels.AddRange(New System.Windows.Forms.StatusBarPanel() {Me.SBarPanel1, Me.SBarPanel2, Me.SBarPanel3, Me.SBarPanel4}) + Me.SBar1.ShowPanels = True + Me.SBar1.Size = New System.Drawing.Size(1008, 22) + Me.SBar1.TabIndex = 13 + ' + 'SBarPanel1 + ' + Me.SBarPanel1.Name = "SBarPanel1" + ' + 'SBarPanel2 + ' + Me.SBarPanel2.Name = "SBarPanel2" + ' + 'SBarPanel3 + ' + Me.SBarPanel3.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring + Me.SBarPanel3.Name = "SBarPanel3" + Me.SBarPanel3.Width = 641 + ' + 'SBarPanel4 + ' + Me.SBarPanel4.Alignment = System.Windows.Forms.HorizontalAlignment.Right + Me.SBarPanel4.Name = "SBarPanel4" + Me.SBarPanel4.Width = 150 + ' + 'gbxLotInfo + ' + Me.gbxLotInfo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.gbxLotInfo.Controls.Add(Me.txtOPName) + Me.gbxLotInfo.Controls.Add(Me.txtOPNo) + Me.gbxLotInfo.Controls.Add(Me.lblOPDescription) + Me.gbxLotInfo.Controls.Add(Me.txtProductNo) + Me.gbxLotInfo.Controls.Add(Me.txtCustomerLotNo) + Me.gbxLotInfo.Controls.Add(Me.txtMONo) + Me.gbxLotInfo.Controls.Add(Me.txtShiftNo) + Me.gbxLotInfo.Controls.Add(Me.txtEmployeeNo) + Me.gbxLotInfo.Controls.Add(Me.txtAreaNo) + Me.gbxLotInfo.Controls.Add(Me.txtPriority) + Me.gbxLotInfo.Controls.Add(Me.txtSysUnitNo) + Me.gbxLotInfo.Controls.Add(Me.txtSysQty) + Me.gbxLotInfo.Controls.Add(Me.txtCurUnitNo) + Me.gbxLotInfo.Controls.Add(Me.txtCurQty) + Me.gbxLotInfo.Controls.Add(Me.txtOPDescription) + Me.gbxLotInfo.Controls.Add(Me.txtLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblPriority) + Me.gbxLotInfo.Controls.Add(Me.lblMONo) + Me.gbxLotInfo.Controls.Add(Me.lblCustomerLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblShiftNo) + Me.gbxLotInfo.Controls.Add(Me.lblOPNo) + Me.gbxLotInfo.Controls.Add(Me.lblEmployeeNo) + Me.gbxLotInfo.Controls.Add(Me.lblAreaNo) + Me.gbxLotInfo.Controls.Add(Me.lblSysQty) + Me.gbxLotInfo.Controls.Add(Me.lblCurQty) + Me.gbxLotInfo.Controls.Add(Me.lblLotNo) + Me.gbxLotInfo.Controls.Add(Me.lblProductNo) + Me.gbxLotInfo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.gbxLotInfo.Location = New System.Drawing.Point(0, 0) + Me.gbxLotInfo.Name = "gbxLotInfo" + Me.gbxLotInfo.Size = New System.Drawing.Size(1004, 126) + Me.gbxLotInfo.TabIndex = 0 + Me.gbxLotInfo.TabStop = False + Me.gbxLotInfo.Text = "Lot Information" + ' + 'txtOPName + ' + Me.txtOPName.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOPName.Location = New System.Drawing.Point(742, 69) + Me.txtOPName.Name = "txtOPName" + Me.txtOPName.ReadOnly = True + Me.txtOPName.Size = New System.Drawing.Size(258, 22) + Me.txtOPName.TabIndex = 24 + ' + 'txtOPNo + ' + Me.txtOPNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOPNo.Location = New System.Drawing.Point(607, 69) + Me.txtOPNo.Name = "txtOPNo" + Me.txtOPNo.ReadOnly = True + Me.txtOPNo.Size = New System.Drawing.Size(137, 22) + Me.txtOPNo.TabIndex = 23 + ' + 'lblOPDescription + ' + Me.lblOPDescription.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOPDescription.Location = New System.Drawing.Point(3, 97) + Me.lblOPDescription.Name = "lblOPDescription" + Me.lblOPDescription.Size = New System.Drawing.Size(80, 15) + Me.lblOPDescription.TabIndex = 25 + Me.lblOPDescription.Text = "OP Description" + Me.lblOPDescription.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'txtProductNo + ' + Me.txtProductNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtProductNo.Location = New System.Drawing.Point(607, 42) + Me.txtProductNo.Name = "txtProductNo" + Me.txtProductNo.ReadOnly = True + Me.txtProductNo.Size = New System.Drawing.Size(188, 22) + Me.txtProductNo.TabIndex = 14 + ' + 'txtCustomerLotNo + ' + Me.txtCustomerLotNo.Location = New System.Drawing.Point(87, 42) + Me.txtCustomerLotNo.Name = "txtCustomerLotNo" + Me.txtCustomerLotNo.ReadOnly = True + Me.txtCustomerLotNo.Size = New System.Drawing.Size(179, 22) + Me.txtCustomerLotNo.TabIndex = 10 + ' + 'txtMONo + ' + Me.txtMONo.Location = New System.Drawing.Point(341, 42) + Me.txtMONo.Name = "txtMONo" + Me.txtMONo.ReadOnly = True + Me.txtMONo.Size = New System.Drawing.Size(179, 22) + Me.txtMONo.TabIndex = 12 + ' + 'txtShiftNo + ' + Me.txtShiftNo.Location = New System.Drawing.Point(341, 69) + Me.txtShiftNo.Name = "txtShiftNo" + Me.txtShiftNo.ReadOnly = True + Me.txtShiftNo.Size = New System.Drawing.Size(179, 22) + Me.txtShiftNo.TabIndex = 21 + ' + 'txtEmployeeNo + ' + Me.txtEmployeeNo.Location = New System.Drawing.Point(87, 69) + Me.txtEmployeeNo.Name = "txtEmployeeNo" + Me.txtEmployeeNo.ReadOnly = True + Me.txtEmployeeNo.Size = New System.Drawing.Size(179, 22) + Me.txtEmployeeNo.TabIndex = 19 + ' + 'txtAreaNo + ' + Me.txtAreaNo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtAreaNo.Location = New System.Drawing.Point(607, 15) + Me.txtAreaNo.Name = "txtAreaNo" + Me.txtAreaNo.ReadOnly = True + Me.txtAreaNo.Size = New System.Drawing.Size(188, 22) + Me.txtAreaNo.TabIndex = 5 + ' + 'txtPriority + ' + Me.txtPriority.Location = New System.Drawing.Point(341, 15) + Me.txtPriority.Name = "txtPriority" + Me.txtPriority.ReadOnly = True + Me.txtPriority.Size = New System.Drawing.Size(179, 22) + Me.txtPriority.TabIndex = 3 + ' + 'txtSysUnitNo + ' + Me.txtSysUnitNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtSysUnitNo.Location = New System.Drawing.Point(960, 42) + Me.txtSysUnitNo.Name = "txtSysUnitNo" + Me.txtSysUnitNo.ReadOnly = True + Me.txtSysUnitNo.Size = New System.Drawing.Size(40, 22) + Me.txtSysUnitNo.TabIndex = 17 + ' + 'txtSysQty + ' + Me.txtSysQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtSysQty.Location = New System.Drawing.Point(858, 42) + Me.txtSysQty.Name = "txtSysQty" + Me.txtSysQty.ReadOnly = True + Me.txtSysQty.Size = New System.Drawing.Size(102, 22) + Me.txtSysQty.TabIndex = 16 + ' + 'txtCurUnitNo + ' + Me.txtCurUnitNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCurUnitNo.Location = New System.Drawing.Point(960, 15) + Me.txtCurUnitNo.Name = "txtCurUnitNo" + Me.txtCurUnitNo.ReadOnly = True + Me.txtCurUnitNo.Size = New System.Drawing.Size(40, 22) + Me.txtCurUnitNo.TabIndex = 8 + ' + 'txtCurQty + ' + Me.txtCurQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtCurQty.Location = New System.Drawing.Point(858, 15) + Me.txtCurQty.Name = "txtCurQty" + Me.txtCurQty.ReadOnly = True + Me.txtCurQty.Size = New System.Drawing.Size(102, 22) + Me.txtCurQty.TabIndex = 7 + ' + 'txtOPDescription + ' + Me.txtOPDescription.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtOPDescription.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtOPDescription.Location = New System.Drawing.Point(87, 96) + Me.txtOPDescription.Name = "txtOPDescription" + Me.txtOPDescription.ReadOnly = True + Me.txtOPDescription.Size = New System.Drawing.Size(913, 22) + Me.txtOPDescription.TabIndex = 26 + ' + 'txtLotNo + ' + Me.txtLotNo.Location = New System.Drawing.Point(87, 15) + Me.txtLotNo.Name = "txtLotNo" + Me.txtLotNo.ReadOnly = True + Me.txtLotNo.Size = New System.Drawing.Size(179, 22) + Me.txtLotNo.TabIndex = 1 + ' + 'lblPriority + ' + Me.lblPriority.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblPriority.Location = New System.Drawing.Point(271, 18) + Me.lblPriority.Name = "lblPriority" + Me.lblPriority.Size = New System.Drawing.Size(64, 15) + Me.lblPriority.TabIndex = 2 + Me.lblPriority.Text = "Priority" + Me.lblPriority.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblMONo + ' + Me.lblMONo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMONo.Location = New System.Drawing.Point(271, 45) + Me.lblMONo.Name = "lblMONo" + Me.lblMONo.Size = New System.Drawing.Size(64, 15) + Me.lblMONo.TabIndex = 11 + Me.lblMONo.Text = "MONo" + Me.lblMONo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblCustomerLotNo + ' + Me.lblCustomerLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCustomerLotNo.Location = New System.Drawing.Point(3, 45) + Me.lblCustomerLotNo.Name = "lblCustomerLotNo" + Me.lblCustomerLotNo.Size = New System.Drawing.Size(80, 15) + Me.lblCustomerLotNo.TabIndex = 9 + Me.lblCustomerLotNo.Text = "Customer Lot No" + Me.lblCustomerLotNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblShiftNo + ' + Me.lblShiftNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblShiftNo.Location = New System.Drawing.Point(271, 72) + Me.lblShiftNo.Name = "lblShiftNo" + Me.lblShiftNo.Size = New System.Drawing.Size(64, 15) + Me.lblShiftNo.TabIndex = 20 + Me.lblShiftNo.Text = "Shift No" + Me.lblShiftNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblOPNo + ' + Me.lblOPNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOPNo.Location = New System.Drawing.Point(527, 72) + Me.lblOPNo.Name = "lblOPNo" + Me.lblOPNo.Size = New System.Drawing.Size(75, 15) + Me.lblOPNo.TabIndex = 22 + Me.lblOPNo.Text = "OP No" + Me.lblOPNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblEmployeeNo + ' + Me.lblEmployeeNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblEmployeeNo.Location = New System.Drawing.Point(3, 72) + Me.lblEmployeeNo.Name = "lblEmployeeNo" + Me.lblEmployeeNo.Size = New System.Drawing.Size(80, 15) + Me.lblEmployeeNo.TabIndex = 18 + Me.lblEmployeeNo.Text = "Employee No" + Me.lblEmployeeNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblAreaNo + ' + Me.lblAreaNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblAreaNo.Location = New System.Drawing.Point(527, 18) + Me.lblAreaNo.Name = "lblAreaNo" + Me.lblAreaNo.Size = New System.Drawing.Size(75, 15) + Me.lblAreaNo.TabIndex = 4 + Me.lblAreaNo.Text = "Area No" + Me.lblAreaNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblSysQty + ' + Me.lblSysQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblSysQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblSysQty.Location = New System.Drawing.Point(791, 45) + Me.lblSysQty.Name = "lblSysQty" + Me.lblSysQty.Size = New System.Drawing.Size(64, 15) + Me.lblSysQty.TabIndex = 15 + Me.lblSysQty.Text = "Sys Qty" + Me.lblSysQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblCurQty + ' + Me.lblCurQty.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblCurQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblCurQty.Location = New System.Drawing.Point(791, 18) + Me.lblCurQty.Name = "lblCurQty" + Me.lblCurQty.Size = New System.Drawing.Size(64, 15) + Me.lblCurQty.TabIndex = 6 + Me.lblCurQty.Text = "Cur Qty" + Me.lblCurQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblLotNo + ' + Me.lblLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblLotNo.Location = New System.Drawing.Point(3, 18) + Me.lblLotNo.Name = "lblLotNo" + Me.lblLotNo.Size = New System.Drawing.Size(80, 15) + Me.lblLotNo.TabIndex = 0 + Me.lblLotNo.Text = "Lot No" + Me.lblLotNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'lblProductNo + ' + Me.lblProductNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblProductNo.Location = New System.Drawing.Point(527, 45) + Me.lblProductNo.Name = "lblProductNo" + Me.lblProductNo.Size = New System.Drawing.Size(75, 15) + Me.lblProductNo.TabIndex = 13 + Me.lblProductNo.Text = "Product No" + Me.lblProductNo.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'txtLotRecord + ' + Me.txtLotRecord.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtLotRecord.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtLotRecord.Location = New System.Drawing.Point(96, 229) + Me.txtLotRecord.Name = "txtLotRecord" + Me.txtLotRecord.Size = New System.Drawing.Size(233, 64) + Me.txtLotRecord.TabIndex = 6 + Me.txtLotRecord.Text = "" + ' + 'iugKeyIn + ' + Me.iugKeyIn.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugKeyIn.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugKeyIn.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugKeyIn.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugKeyIn.Identity = "IMes" + Me.iugKeyIn.IdentityForm = "" + Me.iugKeyIn.LayOutFilePath = "" + Me.iugKeyIn.Location = New System.Drawing.Point(8, 187) + Me.iugKeyIn.Name = "iugKeyIn" + Me.iugKeyIn.PrintFitWidthToPages = 0 + Me.iugKeyIn.PrintLandscape = True + Me.iugKeyIn.PrintPageFooter = "" + Me.iugKeyIn.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKeyIn.PrintPageFooterHeight = 20 + Me.iugKeyIn.PrintPageHeader = "" + Me.iugKeyIn.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKeyIn.PrintPageHeaderHeight = 20 + Me.iugKeyIn.PrintZoom = 1.0R + Me.iugKeyIn.Size = New System.Drawing.Size(643, 143) + Me.iugKeyIn.TabIndex = 7 + Me.iugKeyIn.UserNo = "IMes" + ' + 'lblLotRecord + ' + Me.lblLotRecord.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblLotRecord.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblLotRecord.Location = New System.Drawing.Point(27, 232) + Me.lblLotRecord.Name = "lblLotRecord" + Me.lblLotRecord.Size = New System.Drawing.Size(66, 16) + Me.lblLotRecord.TabIndex = 5 + Me.lblLotRecord.Text = "Lot Record" + Me.lblLotRecord.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' + 'btnClose + ' + Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnClose.Location = New System.Drawing.Point(925, 673) + Me.btnClose.Name = "btnClose" + Me.btnClose.Size = New System.Drawing.Size(80, 32) + Me.btnClose.TabIndex = 12 + Me.btnClose.Text = "Close" + ' + 'btnConfirm + ' + Me.btnConfirm.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnConfirm.Location = New System.Drawing.Point(839, 673) + Me.btnConfirm.Name = "btnConfirm" + Me.btnConfirm.Size = New System.Drawing.Size(80, 32) + Me.btnConfirm.TabIndex = 11 + Me.btnConfirm.Text = "Confirm" + ' + 'iugMaterial + ' + Me.iugMaterial.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugMaterial.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugMaterial.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugMaterial.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugMaterial.Identity = "IMes" + Me.iugMaterial.IdentityForm = "" + Me.iugMaterial.LayOutFilePath = "" + Me.iugMaterial.Location = New System.Drawing.Point(5, 41) + Me.iugMaterial.Name = "iugMaterial" + Me.iugMaterial.PrintFitWidthToPages = 0 + Me.iugMaterial.PrintLandscape = True + Me.iugMaterial.PrintPageFooter = "" + Me.iugMaterial.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugMaterial.PrintPageFooterHeight = 20 + Me.iugMaterial.PrintPageHeader = "" + Me.iugMaterial.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugMaterial.PrintPageHeaderHeight = 20 + Me.iugMaterial.PrintZoom = 1.0R + Me.iugMaterial.Size = New System.Drawing.Size(643, 128) + Me.iugMaterial.TabIndex = 6 + Me.iugMaterial.UserNo = "IMes" + ' + 'iugEquipment + ' + Me.iugEquipment.Anchor = System.Windows.Forms.AnchorStyles.None + Me.iugEquipment.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugEquipment.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugEquipment.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugEquipment.Identity = "IMes" + Me.iugEquipment.IdentityForm = "" + Me.iugEquipment.LayOutFilePath = "" + Me.iugEquipment.Location = New System.Drawing.Point(0, 0) + Me.iugEquipment.Name = "iugEquipment" + Me.iugEquipment.PrintFitWidthToPages = 0 + Me.iugEquipment.PrintLandscape = True + Me.iugEquipment.PrintPageFooter = "" + Me.iugEquipment.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugEquipment.PrintPageFooterHeight = 20 + Me.iugEquipment.PrintPageHeader = "" + Me.iugEquipment.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugEquipment.PrintPageHeaderHeight = 20 + Me.iugEquipment.PrintZoom = 1.0R + Me.iugEquipment.Size = New System.Drawing.Size(300, 137) + Me.iugEquipment.TabIndex = 2 + Me.iugEquipment.UserNo = "IMes" + ' + 'iugAttrib + ' + Me.iugAttrib.Dock = System.Windows.Forms.DockStyle.Fill + Me.iugAttrib.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugAttrib.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugAttrib.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugAttrib.Identity = "IMes" + Me.iugAttrib.IdentityForm = "" + Me.iugAttrib.LayOutFilePath = "" + Me.iugAttrib.Location = New System.Drawing.Point(0, 0) + Me.iugAttrib.Name = "iugAttrib" + Me.iugAttrib.PrintFitWidthToPages = 0 + Me.iugAttrib.PrintLandscape = True + Me.iugAttrib.PrintPageFooter = "" + Me.iugAttrib.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugAttrib.PrintPageFooterHeight = 20 + Me.iugAttrib.PrintPageHeader = "" + Me.iugAttrib.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugAttrib.PrintPageHeaderHeight = 20 + Me.iugAttrib.PrintZoom = 1.0R + Me.iugAttrib.Size = New System.Drawing.Size(340, 137) + Me.iugAttrib.TabIndex = 1 + Me.iugAttrib.UserNo = "IMes" + ' + 'txtMaterialNo + ' + Me.txtMaterialNo.Location = New System.Drawing.Point(77, 13) + Me.txtMaterialNo.Name = "txtMaterialNo" + Me.txtMaterialNo.Size = New System.Drawing.Size(145, 22) + Me.txtMaterialNo.TabIndex = 1 + ' + 'lblMaterialNo + ' + Me.lblMaterialNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMaterialNo.Location = New System.Drawing.Point(7, 16) + Me.lblMaterialNo.Name = "lblMaterialNo" + Me.lblMaterialNo.Size = New System.Drawing.Size(65, 15) + Me.lblMaterialNo.TabIndex = 0 + Me.lblMaterialNo.Text = "Material No" + Me.lblMaterialNo.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'gbxMaterial + ' + Me.gbxMaterial.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.gbxMaterial.Controls.Add(Me.btnKeyIn) + Me.gbxMaterial.Controls.Add(Me.txtMaterialLotNo) + Me.gbxMaterial.Controls.Add(Me.lblMaterialLotNo) + Me.gbxMaterial.Controls.Add(Me.btnDel) + Me.gbxMaterial.Controls.Add(Me.iugMaterial) + Me.gbxMaterial.Controls.Add(Me.txtMaterialNo) + Me.gbxMaterial.Controls.Add(Me.lblMaterialNo) + Me.gbxMaterial.Location = New System.Drawing.Point(3, 4) + Me.gbxMaterial.Name = "gbxMaterial" + Me.gbxMaterial.Size = New System.Drawing.Size(653, 177) + Me.gbxMaterial.TabIndex = 4 + Me.gbxMaterial.TabStop = False + ' + 'btnKeyIn + ' + Me.btnKeyIn.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnKeyIn.Location = New System.Drawing.Point(580, 12) + Me.btnKeyIn.Name = "btnKeyIn" + Me.btnKeyIn.Size = New System.Drawing.Size(64, 24) + Me.btnKeyIn.TabIndex = 4 + Me.btnKeyIn.Text = "Key In" + ' + 'txtMaterialLotNo + ' + Me.txtMaterialLotNo.Location = New System.Drawing.Point(321, 13) + Me.txtMaterialLotNo.Name = "txtMaterialLotNo" + Me.txtMaterialLotNo.Size = New System.Drawing.Size(117, 22) + Me.txtMaterialLotNo.TabIndex = 3 + ' + 'lblMaterialLotNo + ' + Me.lblMaterialLotNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblMaterialLotNo.Location = New System.Drawing.Point(230, 16) + Me.lblMaterialLotNo.Name = "lblMaterialLotNo" + Me.lblMaterialLotNo.Size = New System.Drawing.Size(86, 15) + Me.lblMaterialLotNo.TabIndex = 2 + Me.lblMaterialLotNo.Text = "Material Lot No" + Me.lblMaterialLotNo.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'btnDel + ' + Me.btnDel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnDel.Location = New System.Drawing.Point(579, 11) + Me.btnDel.Name = "btnDel" + Me.btnDel.Size = New System.Drawing.Size(64, 24) + Me.btnDel.TabIndex = 5 + Me.btnDel.Text = "Del" + Me.btnDel.Visible = False + ' + 'iugError + ' + Me.iugError.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.iugError.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugError.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugError.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugError.Identity = "IMes" + Me.iugError.IdentityForm = "" + Me.iugError.LayOutFilePath = "" + Me.iugError.Location = New System.Drawing.Point(6, 45) + Me.iugError.Name = "iugError" + Me.iugError.PrintFitWidthToPages = 0 + Me.iugError.PrintLandscape = True + Me.iugError.PrintPageFooter = "" + Me.iugError.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugError.PrintPageFooterHeight = 20 + Me.iugError.PrintPageHeader = "" + Me.iugError.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugError.PrintPageHeaderHeight = 20 + Me.iugError.PrintZoom = 1.0R + Me.iugError.Size = New System.Drawing.Size(323, 170) + Me.iugError.TabIndex = 4 + Me.iugError.UserNo = "IMes" + ' + 'gbxError + ' + Me.gbxError.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.gbxError.Controls.Add(Me.txtErrorQty) + Me.gbxError.Controls.Add(Me.lblErrorQty) + Me.gbxError.Controls.Add(Me.txtErrorNo) + Me.gbxError.Controls.Add(Me.lblErrorNo) + Me.gbxError.Controls.Add(Me.iugError) + Me.gbxError.Location = New System.Drawing.Point(0, 0) + Me.gbxError.Name = "gbxError" + Me.gbxError.Size = New System.Drawing.Size(335, 223) + Me.gbxError.TabIndex = 3 + Me.gbxError.TabStop = False + ' + 'txtErrorQty + ' + Me.txtErrorQty.Location = New System.Drawing.Point(253, 12) + Me.txtErrorQty.Name = "txtErrorQty" + Me.txtErrorQty.Size = New System.Drawing.Size(76, 22) + Me.txtErrorQty.TabIndex = 3 + ' + 'lblErrorQty + ' + Me.lblErrorQty.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblErrorQty.Location = New System.Drawing.Point(183, 16) + Me.lblErrorQty.Name = "lblErrorQty" + Me.lblErrorQty.Size = New System.Drawing.Size(64, 15) + Me.lblErrorQty.TabIndex = 2 + Me.lblErrorQty.Text = "Error Qty" + Me.lblErrorQty.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'txtErrorNo + ' + Me.txtErrorNo.Location = New System.Drawing.Point(72, 13) + Me.txtErrorNo.Name = "txtErrorNo" + Me.txtErrorNo.Size = New System.Drawing.Size(105, 22) + Me.txtErrorNo.TabIndex = 1 + ' + 'lblErrorNo + ' + Me.lblErrorNo.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblErrorNo.Location = New System.Drawing.Point(7, 16) + Me.lblErrorNo.Name = "lblErrorNo" + Me.lblErrorNo.Size = New System.Drawing.Size(60, 15) + Me.lblErrorNo.TabIndex = 0 + Me.lblErrorNo.Text = "Error No" + Me.lblErrorNo.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'dtpcheckouttime + ' + Me.dtpcheckouttime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.dtpcheckouttime.CustomFormat = "yyyy/MM/dd HH:mm:ss" + Me.dtpcheckouttime.Format = System.Windows.Forms.DateTimePickerFormat.Custom + Me.dtpcheckouttime.Location = New System.Drawing.Point(155, 680) + Me.dtpcheckouttime.Name = "dtpcheckouttime" + Me.dtpcheckouttime.Size = New System.Drawing.Size(128, 21) + Me.dtpcheckouttime.TabIndex = 9 + ' + 'lblupdcheckouttime + ' + Me.lblupdcheckouttime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblupdcheckouttime.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblupdcheckouttime.Location = New System.Drawing.Point(1, 683) + Me.lblupdcheckouttime.Name = "lblupdcheckouttime" + Me.lblupdcheckouttime.Size = New System.Drawing.Size(126, 18) + Me.lblupdcheckouttime.TabIndex = 8 + Me.lblupdcheckouttime.Text = "Update CheckOut Time" + ' + 'btnMultiUser + ' + Me.btnMultiUser.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnMultiUser.Location = New System.Drawing.Point(385, 675) + Me.btnMultiUser.Name = "btnMultiUser" + Me.btnMultiUser.Size = New System.Drawing.Size(80, 32) + Me.btnMultiUser.TabIndex = 10 + Me.btnMultiUser.Text = "Multi User" + Me.btnMultiUser.Visible = False + ' + 'btnOperator + ' + Me.btnOperator.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnOperator.Location = New System.Drawing.Point(299, 675) + Me.btnOperator.Name = "btnOperator" + Me.btnOperator.Size = New System.Drawing.Size(80, 32) + Me.btnOperator.TabIndex = 157 + Me.btnOperator.Text = "Operator" + Me.btnOperator.Visible = False + ' + 'chkUpdCheckOutTime + ' + Me.chkUpdCheckOutTime.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.chkUpdCheckOutTime.AutoSize = True + Me.chkUpdCheckOutTime.Location = New System.Drawing.Point(133, 683) + Me.chkUpdCheckOutTime.Name = "chkUpdCheckOutTime" + Me.chkUpdCheckOutTime.Size = New System.Drawing.Size(15, 14) + Me.chkUpdCheckOutTime.TabIndex = 158 + Me.chkUpdCheckOutTime.UseVisualStyleBackColor = True + ' + 'txtUnionProductNo + ' + Me.txtUnionProductNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.txtUnionProductNo.Location = New System.Drawing.Point(96, 308) + Me.txtUnionProductNo.Name = "txtUnionProductNo" + Me.txtUnionProductNo.ReadOnly = True + Me.txtUnionProductNo.Size = New System.Drawing.Size(151, 22) + Me.txtUnionProductNo.TabIndex = 160 + ' + 'txtUnionProductVersion + ' + Me.txtUnionProductVersion.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.txtUnionProductVersion.Location = New System.Drawing.Point(258, 308) + Me.txtUnionProductVersion.Name = "txtUnionProductVersion" + Me.txtUnionProductVersion.ReadOnly = True + Me.txtUnionProductVersion.Size = New System.Drawing.Size(41, 22) + Me.txtUnionProductVersion.TabIndex = 3 + ' + 'btnGetProduct + ' + Me.btnGetProduct.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnGetProduct.Location = New System.Drawing.Point(303, 308) + Me.btnGetProduct.Name = "btnGetProduct" + Me.btnGetProduct.Size = New System.Drawing.Size(24, 24) + Me.btnGetProduct.TabIndex = 161 + Me.btnGetProduct.Text = "..." + ' + 'txtUnionProductUnit + ' + Me.txtUnionProductUnit.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.txtUnionProductUnit.Location = New System.Drawing.Point(348, 308) + Me.txtUnionProductUnit.Name = "txtUnionProductUnit" + Me.txtUnionProductUnit.ReadOnly = True + Me.txtUnionProductUnit.Size = New System.Drawing.Size(41, 22) + Me.txtUnionProductUnit.TabIndex = 162 + ' + 'btnSWR + ' + Me.btnSWR.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnSWR.Location = New System.Drawing.Point(658, 673) + Me.btnSWR.Name = "btnSWR" + Me.btnSWR.Size = New System.Drawing.Size(80, 32) + Me.btnSWR.TabIndex = 163 + Me.btnSWR.Text = "SWR" + ' + 'chkUnionProductNo + ' + Me.chkUnionProductNo.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.chkUnionProductNo.Location = New System.Drawing.Point(5, 311) + Me.chkUnionProductNo.Name = "chkUnionProductNo" + Me.chkUnionProductNo.Size = New System.Drawing.Size(99, 19) + Me.chkUnionProductNo.TabIndex = 5 + Me.chkUnionProductNo.Text = "UnionProductNo" + Me.chkUnionProductNo.UseVisualStyleBackColor = True + ' + 'btnBinStateAdjust + ' + Me.btnBinStateAdjust.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnBinStateAdjust.Location = New System.Drawing.Point(744, 673) + Me.btnBinStateAdjust.Name = "btnBinStateAdjust" + Me.btnBinStateAdjust.Size = New System.Drawing.Size(89, 32) + Me.btnBinStateAdjust.TabIndex = 165 + Me.btnBinStateAdjust.Text = "BinStateAdj" + Me.btnBinStateAdjust.Visible = False + ' + 'uplAll + ' + Me.uplAll.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + ' + 'uplAll.ClientArea + ' + Me.uplAll.ClientArea.Controls.Add(Me.uegMaterial_KeyIn2) + Me.uplAll.ClientArea.Controls.Add(Me.uegAttrib_Equipment) + Me.uplAll.ClientArea.Controls.Add(Me.uegLotInfo) + Me.uplAll.Location = New System.Drawing.Point(0, 0) + Me.uplAll.Name = "uplAll" + Me.uplAll.Size = New System.Drawing.Size(1013, 667) + Me.uplAll.TabIndex = 172 + ' + 'uegMaterial_KeyIn2 + ' + Me.uegMaterial_KeyIn2.Controls.Add(Me.UltraExpandableGroupBoxPanel4) + Me.uegMaterial_KeyIn2.Dock = System.Windows.Forms.DockStyle.Fill + Me.uegMaterial_KeyIn2.ExpandedSize = New System.Drawing.Size(1013, 357) + Me.uegMaterial_KeyIn2.Location = New System.Drawing.Point(0, 310) + Me.uegMaterial_KeyIn2.Name = "uegMaterial_KeyIn2" + Me.uegMaterial_KeyIn2.Size = New System.Drawing.Size(1013, 357) + Me.uegMaterial_KeyIn2.TabIndex = 163 + Me.uegMaterial_KeyIn2.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel4 + ' + Me.UltraExpandableGroupBoxPanel4.Controls.Add(Me.UltraPanel4) + Me.UltraExpandableGroupBoxPanel4.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel4.Location = New System.Drawing.Point(2, 18) + Me.UltraExpandableGroupBoxPanel4.Name = "UltraExpandableGroupBoxPanel4" + Me.UltraExpandableGroupBoxPanel4.Size = New System.Drawing.Size(1009, 337) + Me.UltraExpandableGroupBoxPanel4.TabIndex = 0 + ' + 'UltraPanel4 + ' + ' + 'UltraPanel4.ClientArea + ' + Me.UltraPanel4.ClientArea.Controls.Add(Me.uplMaterial_KeyIn) + Me.UltraPanel4.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel4.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel4.Name = "UltraPanel4" + Me.UltraPanel4.Size = New System.Drawing.Size(1009, 337) + Me.UltraPanel4.TabIndex = 0 + ' + 'uplMaterial_KeyIn + ' + ' + 'uplMaterial_KeyIn.ClientArea + ' + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.uplKeyIn) + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.UltraSplitter2) + Me.uplMaterial_KeyIn.ClientArea.Controls.Add(Me.uplMaterial) + Me.uplMaterial_KeyIn.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplMaterial_KeyIn.Location = New System.Drawing.Point(0, 0) + Me.uplMaterial_KeyIn.Name = "uplMaterial_KeyIn" + Me.uplMaterial_KeyIn.Size = New System.Drawing.Size(1009, 337) + Me.uplMaterial_KeyIn.TabIndex = 0 + ' + 'uplKeyIn + ' + ' + 'uplKeyIn.ClientArea + ' + Me.uplKeyIn.ClientArea.Controls.Add(Me.gbxMaterial) + Me.uplKeyIn.ClientArea.Controls.Add(Me.iugKeyIn) + Me.uplKeyIn.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplKeyIn.Location = New System.Drawing.Point(347, 0) + Me.uplKeyIn.Name = "uplKeyIn" + Me.uplKeyIn.Size = New System.Drawing.Size(662, 337) + Me.uplKeyIn.TabIndex = 4 + ' + 'UltraSplitter2 + ' + Me.UltraSplitter2.Location = New System.Drawing.Point(340, 0) + Me.UltraSplitter2.Name = "UltraSplitter2" + Me.UltraSplitter2.RestoreExtent = 479 + Me.UltraSplitter2.Size = New System.Drawing.Size(7, 337) + Me.UltraSplitter2.TabIndex = 3 + ' + 'uplMaterial + ' + ' + 'uplMaterial.ClientArea + ' + Me.uplMaterial.ClientArea.Controls.Add(Me.gbxError) + Me.uplMaterial.ClientArea.Controls.Add(Me.lblLotRecord) + Me.uplMaterial.ClientArea.Controls.Add(Me.txtLotRecord) + Me.uplMaterial.ClientArea.Controls.Add(Me.txtUnionProductUnit) + Me.uplMaterial.ClientArea.Controls.Add(Me.txtUnionProductNo) + Me.uplMaterial.ClientArea.Controls.Add(Me.btnGetProduct) + Me.uplMaterial.ClientArea.Controls.Add(Me.chkUnionProductNo) + Me.uplMaterial.ClientArea.Controls.Add(Me.txtUnionProductVersion) + Me.uplMaterial.Dock = System.Windows.Forms.DockStyle.Left + Me.uplMaterial.Location = New System.Drawing.Point(0, 0) + Me.uplMaterial.Name = "uplMaterial" + Me.uplMaterial.Size = New System.Drawing.Size(340, 337) + Me.uplMaterial.TabIndex = 0 + ' + 'uegAttrib_Equipment + ' + Me.uegAttrib_Equipment.Controls.Add(Me.UltraExpandableGroupBoxPanel2) + Me.uegAttrib_Equipment.Dock = System.Windows.Forms.DockStyle.Top + Me.uegAttrib_Equipment.ExpandedSize = New System.Drawing.Size(1013, 157) + Me.uegAttrib_Equipment.Location = New System.Drawing.Point(0, 153) + Me.uegAttrib_Equipment.Name = "uegAttrib_Equipment" + Me.uegAttrib_Equipment.Size = New System.Drawing.Size(1013, 157) + Me.uegAttrib_Equipment.TabIndex = 162 + Me.uegAttrib_Equipment.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel2 + ' + Me.UltraExpandableGroupBoxPanel2.Controls.Add(Me.UltraPanel2) + Me.UltraExpandableGroupBoxPanel2.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel2.Location = New System.Drawing.Point(2, 18) + Me.UltraExpandableGroupBoxPanel2.Name = "UltraExpandableGroupBoxPanel2" + Me.UltraExpandableGroupBoxPanel2.Size = New System.Drawing.Size(1009, 137) + Me.UltraExpandableGroupBoxPanel2.TabIndex = 0 + ' + 'UltraPanel2 + ' + ' + 'UltraPanel2.ClientArea + ' + Me.UltraPanel2.ClientArea.Controls.Add(Me.uplAttrib_Equipment) + Me.UltraPanel2.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel2.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel2.Name = "UltraPanel2" + Me.UltraPanel2.Size = New System.Drawing.Size(1009, 137) + Me.UltraPanel2.TabIndex = 0 + ' + 'uplAttrib_Equipment + ' + ' + 'uplAttrib_Equipment.ClientArea + ' + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.uplEquipment) + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.UltraSplitter1) + Me.uplAttrib_Equipment.ClientArea.Controls.Add(Me.uplAttrib) + Me.uplAttrib_Equipment.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplAttrib_Equipment.Location = New System.Drawing.Point(0, 0) + Me.uplAttrib_Equipment.Name = "uplAttrib_Equipment" + Me.uplAttrib_Equipment.Size = New System.Drawing.Size(1009, 137) + Me.uplAttrib_Equipment.TabIndex = 162 + ' + 'uplEquipment + ' + ' + 'uplEquipment.ClientArea + ' + Me.uplEquipment.ClientArea.Controls.Add(Me.iugKzxx) + Me.uplEquipment.ClientArea.Controls.Add(Me.iugEquipment) + Me.uplEquipment.Dock = System.Windows.Forms.DockStyle.Fill + Me.uplEquipment.Location = New System.Drawing.Point(347, 0) + Me.uplEquipment.Name = "uplEquipment" + Me.uplEquipment.Size = New System.Drawing.Size(662, 137) + Me.uplEquipment.TabIndex = 1 + ' + 'UltraSplitter1 + ' + Me.UltraSplitter1.Location = New System.Drawing.Point(340, 0) + Me.UltraSplitter1.Name = "UltraSplitter1" + Me.UltraSplitter1.RestoreExtent = 479 + Me.UltraSplitter1.Size = New System.Drawing.Size(7, 137) + Me.UltraSplitter1.TabIndex = 1 + ' + 'uplAttrib + ' + ' + 'uplAttrib.ClientArea + ' + Me.uplAttrib.ClientArea.Controls.Add(Me.iugAttrib) + Me.uplAttrib.Dock = System.Windows.Forms.DockStyle.Left + Me.uplAttrib.Location = New System.Drawing.Point(0, 0) + Me.uplAttrib.Name = "uplAttrib" + Me.uplAttrib.Size = New System.Drawing.Size(340, 137) + Me.uplAttrib.TabIndex = 0 + ' + 'uegLotInfo + ' + Me.uegLotInfo.Controls.Add(Me.UltraExpandableGroupBoxPanel1) + Me.uegLotInfo.Dock = System.Windows.Forms.DockStyle.Top + Me.uegLotInfo.ExpandedSize = New System.Drawing.Size(1013, 153) + Me.uegLotInfo.Location = New System.Drawing.Point(0, 0) + Me.uegLotInfo.Name = "uegLotInfo" + Me.uegLotInfo.Size = New System.Drawing.Size(1013, 153) + Me.uegLotInfo.TabIndex = 161 + Me.uegLotInfo.Text = "Lot Information" + Me.uegLotInfo.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003 + ' + 'UltraExpandableGroupBoxPanel1 + ' + Me.UltraExpandableGroupBoxPanel1.Controls.Add(Me.UltraPanel1) + Me.UltraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraExpandableGroupBoxPanel1.Location = New System.Drawing.Point(2, 22) + Me.UltraExpandableGroupBoxPanel1.Name = "UltraExpandableGroupBoxPanel1" + Me.UltraExpandableGroupBoxPanel1.Size = New System.Drawing.Size(1009, 129) + Me.UltraExpandableGroupBoxPanel1.TabIndex = 0 + ' + 'UltraPanel1 + ' + ' + 'UltraPanel1.ClientArea + ' + Me.UltraPanel1.ClientArea.Controls.Add(Me.gbxLotInfo) + Me.UltraPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UltraPanel1.Location = New System.Drawing.Point(0, 0) + Me.UltraPanel1.Name = "UltraPanel1" + Me.UltraPanel1.Size = New System.Drawing.Size(1009, 129) + Me.UltraPanel1.TabIndex = 0 + ' + 'iugKzxx + ' + Me.iugKzxx.Anchor = System.Windows.Forms.AnchorStyles.None + Me.iugKzxx.EnterDirection = iMESUltraGrid.iMESUltraGridControl.EnterDirectionEnum.Down + Me.iugKzxx.GroupBoxPromptText = "Drag a column header here to group by that column." + Me.iugKzxx.GroupBoxTextForeColor = System.Drawing.Color.Red + Me.iugKzxx.Identity = "IMes" + Me.iugKzxx.IdentityForm = "" + Me.iugKzxx.LayOutFilePath = "" + Me.iugKzxx.Location = New System.Drawing.Point(359, 0) + Me.iugKzxx.Name = "iugKzxx" + Me.iugKzxx.PrintFitWidthToPages = 0 + Me.iugKzxx.PrintLandscape = True + Me.iugKzxx.PrintPageFooter = "" + Me.iugKzxx.PrintPageFooterHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKzxx.PrintPageFooterHeight = 20 + Me.iugKzxx.PrintPageHeader = "" + Me.iugKzxx.PrintPageHeaderHAlign = Infragistics.Win.HAlign.[Default] + Me.iugKzxx.PrintPageHeaderHeight = 20 + Me.iugKzxx.PrintZoom = 1.0R + Me.iugKzxx.Size = New System.Drawing.Size(300, 137) + Me.iugKzxx.TabIndex = 3 + Me.iugKzxx.UserNo = "IMes" + ' + 'frmBR_L_CO_GEN + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14) + Me.ClientSize = New System.Drawing.Size(1008, 732) + Me.Controls.Add(Me.uplAll) + Me.Controls.Add(Me.btnBinStateAdjust) + Me.Controls.Add(Me.btnSWR) + Me.Controls.Add(Me.chkUpdCheckOutTime) + Me.Controls.Add(Me.btnOperator) + Me.Controls.Add(Me.btnMultiUser) + Me.Controls.Add(Me.dtpcheckouttime) + Me.Controls.Add(Me.lblupdcheckouttime) + Me.Controls.Add(Me.btnClose) + Me.Controls.Add(Me.btnConfirm) + Me.Controls.Add(Me.SBar1) + Me.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.MinimizeBox = False + Me.Name = "frmBR_L_CO_GEN" + Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "General Check Out" + CType(Me.SBarPanel1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel3, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SBarPanel4, System.ComponentModel.ISupportInitialize).EndInit() + Me.gbxLotInfo.ResumeLayout(False) + Me.gbxLotInfo.PerformLayout() + CType(Me.txtOPName, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtOPNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtProductNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCustomerLotNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtMONo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtShiftNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtEmployeeNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtAreaNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtPriority, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSysUnitNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtSysQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCurUnitNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtCurQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtOPDescription, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtLotNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtMaterialNo, System.ComponentModel.ISupportInitialize).EndInit() + Me.gbxMaterial.ResumeLayout(False) + Me.gbxMaterial.PerformLayout() + CType(Me.txtMaterialLotNo, System.ComponentModel.ISupportInitialize).EndInit() + Me.gbxError.ResumeLayout(False) + Me.gbxError.PerformLayout() + CType(Me.txtErrorQty, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtErrorNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtUnionProductNo, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtUnionProductVersion, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtUnionProductUnit, System.ComponentModel.ISupportInitialize).EndInit() + Me.uplAll.ClientArea.ResumeLayout(False) + Me.uplAll.ResumeLayout(False) + CType(Me.uegMaterial_KeyIn2, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegMaterial_KeyIn2.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel4.ResumeLayout(False) + Me.UltraPanel4.ClientArea.ResumeLayout(False) + Me.UltraPanel4.ResumeLayout(False) + Me.uplMaterial_KeyIn.ClientArea.ResumeLayout(False) + Me.uplMaterial_KeyIn.ResumeLayout(False) + Me.uplKeyIn.ClientArea.ResumeLayout(False) + Me.uplKeyIn.ResumeLayout(False) + Me.uplMaterial.ClientArea.ResumeLayout(False) + Me.uplMaterial.ClientArea.PerformLayout() + Me.uplMaterial.ResumeLayout(False) + CType(Me.uegAttrib_Equipment, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegAttrib_Equipment.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel2.ResumeLayout(False) + Me.UltraPanel2.ClientArea.ResumeLayout(False) + Me.UltraPanel2.ResumeLayout(False) + Me.uplAttrib_Equipment.ClientArea.ResumeLayout(False) + Me.uplAttrib_Equipment.ResumeLayout(False) + Me.uplEquipment.ClientArea.ResumeLayout(False) + Me.uplEquipment.ResumeLayout(False) + Me.uplAttrib.ClientArea.ResumeLayout(False) + Me.uplAttrib.ResumeLayout(False) + CType(Me.uegLotInfo, System.ComponentModel.ISupportInitialize).EndInit() + Me.uegLotInfo.ResumeLayout(False) + Me.UltraExpandableGroupBoxPanel1.ResumeLayout(False) + Me.UltraPanel1.ClientArea.ResumeLayout(False) + Me.UltraPanel1.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + +#End Region + + Private Sub frmBR_L_CO_GEN_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load + + Dim editorSettings As New Infragistics.Win.UltraWinEditors.DefaultEditorOwnerSettings + editorSettings.DataType = GetType(System.DateTime) + editorSettings.MaskInput = "yyyy/mm/dd hh:mm:ss" + editor = New Infragistics.Win.DateTimeEditor(New Infragistics.Win.UltraWinEditors.DefaultEditorOwner(editorSettings)) + + vlMaterialLevel = COM_Utility.ValueListProvider.GetInstance.GetValueList("TBLWIPTEMP_MATERIAL", "MATERIALLEVEL") + + '240119 By 21681 + vlKzValueList = COM_Utility.ValueListProvider.GetInstance.GetValueList("TBLWIPKZTABLE_21681", "SELECTFLAG") + + btnConfirm.Enabled = False + btnMultiUser.Enabled = False + Me.btnKeyIn.Visible = False + + '2017/11/06 KunYuan:變更結束加工時間checkbox預設不勾選 + chkUpdCheckOutTime.Checked = False + + If LotNo = defString Or UserId = defString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%LotNo%] [%or%] [%UserId%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + '2022/2/25 0104829: SDD211216_02-01 / HaveComponent、HaveLevel判斷抽換成共用function + funGetLotStateIncludeData() + + Dim drSel As DataRow() + + Cursor.Current = Cursors.WaitCursor + Call funLoadParameter("ChamberManage") + ' 2016/01/05 YF, 左下角的時間預設為AP SERVER的時間 + Me.dtpcheckouttime.Value = funGetAPServerTime() + + '1.取出生產批資訊 -------------------------------------------------------------------------------------------- + If funLoadLotState() Then Exit Sub + If dsWIP.Tables(tblLotState).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200003", "[%LotNo%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + If funGetShift() Then Exit Sub + If funLoadTemp_AttribJoinBasis() Then Exit Sub + If funLoadTemp_Equipment() Then Exit Sub + If funLoadTemp_Material() Then Exit Sub + + '[Mantis:86124]2021/01/19,Boyi,Add BinAssign + ' + If HaveLevel Then + Call funLoadSystemBin() + Call funLoadGoodBinState() + dtBinNew = dsWIP.Tables(strBinState).Clone 'copy schema to new datatable + + '93358: SDD210525_01-01/TriggerPS調整 93359: SDD210525_01-02/企業邏輯調整 若GoodBinState沒有資料 則不顯示KeyIn按鈕 Edison 21/06/01 + If dsWIP.Tables(strBinState).Rows.Count > 0 Then + btnBinStateAdjust.Visible = True + End If + End If + + txtLotNo.Text = LotNo + txtEmployeeNo.Text = UserId + Call funLotInfo_Show() + + '2.生產參數 --------------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + '轉換抽樣參數 + If funGetSampleData() Then Exit Sub + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "AttribSource <> 0 And AttribSource <> 1 And (AttribPhase = " & PhaseNo & " or AttribPhase = 99)" 'Source = Not KeyIn, Not Calculate ,Current and All Phase + iugAttrib.iMESUltraGrid.DataSource = dsWIP.Tables(tblTAttrib).DefaultView + End If + + '3.KeyIn Attrib ---------------------------------------------------------------------------------------------- + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + dtKeyIn = New DataTable("KeyIn") + dtKeyIn.DefaultView.AllowNew = False + dtKeyIn.DefaultView.AllowDelete = False + dtKeyIn.DefaultView.AllowEdit = True + '建立KeyIn Table的欄位 + dtKeyIn.Columns.Add("AttribNo", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribName", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribValue", System.Type.GetType("System.String")) + dtKeyIn.Columns.Add("AttribSequence", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("InputType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("DataType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("ValueType", System.Type.GetType("System.Int32")) + dtKeyIn.Columns.Add("QCItemNo", System.Type.GetType("System.String")) '2015-12-18, Joe, Add + + '取出KeyIn Attrib + For Each dr As DataRow In dsWIP.Tables(tblTAttrib).Rows + '將資料存入KeyIn Table + If dr("AttribSource") = 0 AndAlso (dr("AttribPhase") = PhaseNo OrElse dr("AttribPhase") = 99) Then + drAdd = dtKeyIn.NewRow() + drAdd("AttribNo") = dr("AttribNo") + drAdd("AttribName") = dr("AttribName") + drAdd("AttribSequence") = dr("AttribSequence") + drAdd("AttribValue") = dr("AttribValue") + drAdd("InputType") = dr("InputType") + drAdd("DataType") = dr("DataType") + drAdd("ValueType") = dr("ValueType") + drAdd("QCItemNo") = dr("QCItemNo") '2015-12-18, Joe, Add + dtKeyIn.Rows.Add(drAdd) + End If + Next + + iugKeyIn.iMESUltraGrid.DataSource = dtKeyIn.DefaultView + End If + + Call funLoadLotBasis() + + Call funLoadOEMOBasis() + + '240119 By 21681 Call客制信息加载方法 + Call funLoadKzTable() + + '4.Error + If funLoadOPError() Then Exit Sub + + '5.OP Description + If funGetOPDescription() Then Exit Sub + + If funLoadSYSParameter() Then Exit Sub + + '6.Initialize + Call funInitialize() + + '7.語系切換 + Call ExeChangeResource(Me, gLanguageMode) + ExeGroupControlPriv(Me, PrivFunNo) + + txtMaterialNo.Focus() 'Gary Lu 20131105:開啟畫面時游標在物料批號輸入文字方塊內 + + '判斷系統參數EnableSWR_CICO 0:否 1:是 + strEnableSWR_CICO = "0" '預設為否 + drSel = dsWIP.Tables(tblSYSParameter).Select("ParameterNo = 'EnableSWR_CICO'") + If drSel.Length > 0 Then + strEnableSWR_CICO = drSel(0)("ParameterValue").ToString + End If + + btnSWR.Visible = False + + If strEnableSWR_CICO = "1" Then '系統參數EnableSWR_CICO為1才需要顯示特殊生產需求 + + '2019/02/12 Eric 無資料不顯示SWR視窗 + Call funLoadSWRJoinLog() + If dsWIP.Tables(tblSWRJoinLog).Rows.Count > 0 Then + blnShowSWR = True + End If + + btnSWR.Visible = True + + End If + + '自動依CI刷入的料批給定標準用量 + Call funAutoSetMaterialLot() + + Cursor.Current = Cursors.Default + Exit Sub + + + End Sub + + Private Sub frmBR_L_CO_GEN_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated + + If Not dsWIP.Tables(tblTMaterial) Is Nothing AndAlso dsWIP.Tables(tblTMaterial).Rows.Count > 0 Then + txtMaterialNo.Focus() + Else + If iugKeyIn.iMESUltraGrid.Rows.Count > 0 Then + 'iugKeyIn.iMESUltraGrid.ActiveCell = iugKeyIn.iMESUltraGrid.Rows(0).Cells("AttribValue") + iugKeyIn.iMESUltraGrid.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode, False, False) + End If + End If + + End Sub + + Private Sub frmBR_L_CO_GEN_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing + + If Not dsWIP Is Nothing Then dsWIP.Dispose() + If Not dtKeyIn Is Nothing Then dtKeyIn.Dispose() + If Not dtMLot Is Nothing Then dtMLot.Dispose() + '2019/12/17 OwenLiu, Mantis:0063698, 修正強制關閉企業邏輯,未正確執行ReverseTriggerOP的問題 + ' Call ExeReverseTriggerOP(UserId, LotNo, RevLotSerial, RevLotStamp) + '2020/3/17,Ning,不啟用Reverse時的ReverseTriggerOP + Call ExeReverseTriggerOP_NotUseUndo(UserId, LotNo, RevLotSerial, RevLotStamp) + + End Sub + + Protected Overrides Sub Finalize() + MyBase.Finalize() + End Sub + +#Region "Buttons" + + Private Sub btnConfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirm.Click + + Cursor.Current = Cursors.WaitCursor + + '1.基本檢查--------------------------------------------------------------------------------------------------- + Dim drSel(), drSelMTLLot(), drSelSeq() As DataRow + Dim blnH_Scrap, blnH_Defect As Boolean + Dim decScrapQty As Decimal = 0 + Dim decDefectQty As Decimal = 0 + Dim decLossQty As Decimal = 0 + Dim decGoodQty As Decimal = 0 + Dim decT_ScrapQty As Decimal = 0 + Dim decT_DefectQty As Decimal = 0 + Dim decBinQty_Sum As Decimal = 0 + Dim strNewBin As String = defString + Dim bBinNew As Boolean = False + Dim i As Integer + + drSel = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSel.Length = 0 Then + blnH_Scrap = False '沒有定義ScrapQty + Else + blnH_Scrap = True '有定義ScrapQty + If IsNumeric(drSel(0)("AttribValue")) Then + decScrapQty = drSel(0)("AttribValue") + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%ScrapQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + drSel = dtKeyIn.Select("AttribNo = 'DefectQty'") + If drSel.Length = 0 Then + blnH_Defect = False '沒有定義DefectQty + Else + blnH_Defect = True '有定義DefectQty + If IsNumeric(drSel(0)("AttribValue")) Then + decDefectQty = drSel(0)("AttribValue") + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%DefectQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + drSel = dtKeyIn.Select("AttribNo = 'GoodQty'") + If drSel.Length > 0 Then + If IsNumeric(drSel(0)("AttribValue")) Then + decGoodQty = drSel(0)("AttribValue") + + If CDec(drSel(0)("AttribValue")) < 0 Then '輸入的值需要大於或等於0 + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200016", "[%GoodQty%] [%MUST BE GREATER THAN OR EQUAL TO%] 0 !!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%GoodQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + + drSel = dtKeyIn.Select("AttribNo = 'LossQty'") + If drSel.Length <> 0 Then + If IsNumeric(drSel(0)("AttribValue")) Then + decLossQty = drSel(0)("AttribValue") + End If + End If + + '不良原因輸入檢查 + If blnH_Scrap Then + '計算總不良數 + drSel = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i = 0 To drSel.Length - 1 + If drSel(i)("ErrorQty") <= 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "[%ErrorNo%]:" & drSel(i)("ErrorNo") & ",[%ErrorQty%] <0 !!"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + decT_ScrapQty = decT_ScrapQty + drSel(i)("ErrorQty") + Next + If decScrapQty <> decT_ScrapQty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203085", "[%ScrapQty%] [%IS NOT EQUAL TO%] [%TOTAL SCRAP REASONN QTY%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + + '缺點原因輸入檢查 + If blnH_Defect Then + '計算總缺點數 + drSel = dsWIP.Tables(tblOPError).Select("ReasonType=1 And CheckFlag=" & True) + For i = 0 To drSel.Length - 1 + If drSel(i)("ErrorQty") <= 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "[%ErrorNo%]:" & drSel(i)("ErrorNo") & ",[%ErrorQty%] [%IS LESS THAN%] 0"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + decT_DefectQty = decT_DefectQty + drSel(i)("ErrorQty") + Next + If decDefectQty <> decT_DefectQty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203085", "[%DefectQty%] [%IS NOT EQUAL TO%] [%TOTAL DEFECT REASON QTY%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + + Dim NewBinQty_Sun As Integer = 0 + + '[Mantis:86124]2021/01/19,Boyi,Check BinAssign + '93358: SDD210525_01-01/TriggerPS調整 93359: SDD210525_01-02/企業邏輯調整 若GoodBinState沒有資料 則不卡控 Edison 21/06/01 + If HaveLevel AndAlso iGoodBinStateQty <> 0 Then + + If (CInt(decGoodQty) <> iGoodBinStateQty) Then + bBinNew = True + If dtBinNew.Rows.Count > 0 Then + '0111211: [49-1]扫脚_check-out_bin分布调整 + '原卡控:比較最後bin分布數量是否=BR介面上的curQty + '移除此卡控。新邏輯:點選按鈕'bin分布調整'後,將'最終bin分布之總和'回壓至GoodQty + 'For Each drTemp As DataRow In dsWIP.Tables(strSysBin).Rows + ' NewBinQty_Sun += CInt(dtBinNew.Rows(0)(drTemp("BinNo").ToString)) + 'Next + 'If (NewBinQty_Sun <> decGoodQty) Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200060", "[%BinStateAdjust Qty is not equal GoodQty%]"), MsgBoxStyle.Exclamation, Me.Text) + ' Exit Sub + 'End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200005", "[%Please Assign BinState%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + Else + bBinNew = False + End If + '0111211: [49-1]扫脚_check-out_bin分布调整 + '介面上的良品數與損壞數之總和,必須=curQty + If decGoodQty + decScrapQty + CInt(decLossQty) <> CInt(txtCurQty.Text) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "[%Sum of GoodQty and ScrapQty%]: " & decGoodQty + decScrapQty & " [%NOTEQUALTO%][%CurQty%]: " & txtCurQty.Text & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + End If + + + '2.格式化資料Attrib-------------------------------------------------------------------------------------------- + Dim strAttrib As String = "" + Dim strTemp As String + + If Not dsWIP.Tables(tblTAttrib) Is Nothing Then + 'Temp:Attrib + 'dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "Not (AttribPhase = " & PhaseNo & " And AttribSource = 0)" '所有Attrib,除了Current Phase KeyIn + 'BR只處理CurPhase & AllPhase的Attrib(不包含KeyIn,KeyIn於後處理),其他非本Phase不可更動. + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "(AttribPhase = " & PhaseNo & " or AttribPhase = 99) And AttribSource <> 0" + For i = 0 To dsWIP.Tables(tblTAttrib).DefaultView.Count - 1 + strTemp = CombineXMLValue("attribno", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribNo"))) & + CombineXMLValue("attribtype", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribType")) & + CombineXMLValue("attribsequence", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribSequence")) & + CombineXMLValue("attribsource", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribSource")) & + CombineXMLValue("attribphase", dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribPhase")) & + CombineXMLValue("savetolotpropertyno", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("SaveToLotPropertyNo"))) + If IsDBNull(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribValue")) Then + strTemp += CombineXMLValue("attribvalue", "") + Else + strTemp += CombineXMLValue("attribvalue", CInput(dsWIP.Tables(tblTAttrib).DefaultView.Item(i)("AttribValue"))) + End If + strAttrib += CombineXMLValueTag(strTemp) + Next + '還原顯示 + dsWIP.Tables(tblTAttrib).DefaultView.RowFilter = "AttribSource <> 0 And AttribSource <> 1 And (AttribPhase = " & PhaseNo & " or AttribPhase = 99)" 'Source = Not KeyIn, Not Calculate ,Current and All phase + + 'Temp:Attrib_KeyIn + For i = 0 To dtKeyIn.Rows.Count - 1 + If IsDBNull(dtKeyIn.Rows(i)("AttribValue")) = True Then + dtKeyIn.Rows(i)("AttribValue") = "" + End If + 'R1102001 改由ChkControlRule時才判斷 By Acer 2011/02/21 + 'If dtKeyIn.Rows(i)("AttribValue") = "" Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%AttribValue%] of [%AttribNo%]:" & dtKeyIn.Rows(i)("AttribNo") & " is empty!!"), MsgBoxStyle.Exclamation, Me.Text) + ' GoTo lblExitProcedure + 'End If + + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo='" & dtKeyIn.Rows(i)("AttribNo") & "'") + If drSel.Length = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203010", "[%AttribNo%]:" & dtKeyIn.Rows(i)("AttribNo")), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + Else + strTemp = CombineXMLValue("attribno", CInput(dtKeyIn.Rows(i)("AttribNo"))) & + CombineXMLValue("attribtype", drSel(0)("AttribType")) & + CombineXMLValue("attribsequence", drSel(0)("AttribSequence")) & + CombineXMLValue("attribsource", drSel(0)("AttribSource")) & + CombineXMLValue("attribphase", drSel(0)("AttribPhase")) & + CombineXMLValue("attribvalue", CInput(dtKeyIn.Rows(i)("AttribValue"))) & + CombineXMLValue("savetolotpropertyno", CInput(drSel(0)("SaveToLotPropertyNo"))) + '2015-12-18, Joe, Add QCItemNo + If IsDBNull(drSel(0)("QCItemNo")) Then + strTemp += CombineXMLValue("qcitemno", "") + Else + strTemp += CombineXMLValue("qcitemno", CInput(drSel(0)("QCItemNo"))) + End If + strAttrib += CombineXMLValueTag(strTemp) + End If + Next + End If + + '3.格式化資料Equipment----------------------------------------------------------------------------------------------- + Dim strEquipment As String = "" + Dim strEquipmentChamber As String = "" + If Not dsWIP.Tables(tblTEquipment) Is Nothing Then + For i = 0 To dsWIP.Tables(tblTEquipment).Rows.Count - 1 + strEquipment += CombineXMLValueTag(CombineXMLValue("equipmentno", CInput(dsWIP.Tables(tblTEquipment).Rows(i)("EquipmentNo")))) + Next + End If + If Not dsWIP.Tables("Chamber") Is Nothing Then + For Each dr As DataRow In dsWIP.Tables("Chamber").Rows + strEquipmentChamber += CombineXMLValueTag( + CombineXMLValue("equipmentno", CInput(dr("EquipmentNo"))) & + CombineXMLValue("belongequipmentno", dr("BelongEquipmentNo"))) + Next + End If + + '4.格式化資料Material----------------------------------------------------------------------------------------------- + Dim strMaterial As String = "" + Dim strMaterialExeCO As String = "" + Dim strMaterialLot As String = "" + Dim dtJoin As New DataTable 'Join兩個table + Dim dtMaterialLotNo As New DataTable + Dim drData As DataRow + Dim drSelect, drSub As DataRow() + + If (Not dsWIP.Tables(tblTMaterial) Is Nothing) AndAlso (dsWIP.Tables(tblTMaterial).Rows.Count > 0) Then + + '新建一Table,彙整主物料及其替代料(合併dsWIP.Tables(tblTMaterial)和dtMLot) + dtJoin = dsWIP.Tables(tblTMaterial).Copy + '新增OrgMaterialNo,紀錄原來的主物料用 + Dim colOrgMaterialNo As New DataColumn With { + .ColumnName = "OrgMaterialNo", + .DataType = System.Type.GetType("System.String"), + .DefaultValue = 0, + .AllowDBNull = False + } + dtJoin.Columns.Add(colOrgMaterialNo) + + '紀錄原來的主物料 + For i = 0 To dtJoin.Rows.Count - 1 + dtJoin.Rows(i)("OrgMaterialNo") = dtJoin.Rows(i)("MaterialNo") + Next + + For i = 0 To dtMLot.Rows.Count - 1 + drSelect = dtJoin.Select("MaterialNo='" & dtMLot.Rows(i)("SubstituteMaterialNo") & "' And OrgMaterialNo='" & dtMLot.Rows(i)("MaterialNo") & "'") + If drSelect.Length > 0 Then + drSub = dtMLot.Select("SubstituteMaterialNo='" & drSelect(0)("MaterialNo") & "'") + Dim intSumUseQty As Decimal = 0 '使用數量加總 + For j = 0 To drSub.Length - 1 + intSumUseQty = intSumUseQty + drSub(j)("UseQty") + Next + drSelect(0)("UseQty") = intSumUseQty + Else + drSelect = dtJoin.Select("MaterialNo='" & dtMLot.Rows(i)("MaterialNo") & "'") + + '如果只有選取替代料而無選取主料,要將主料的UseQty設為0 + drSub = dtMLot.Select("SubstituteMaterialNo='" & drSelect(0)("MaterialNo") & "' And MaterialNo='" & drSelect(0)("OrgMaterialNo") & "'") + If drSub.Length = 0 Then drSelect(0)("UseQty") = 0 + + drData = dtJoin.NewRow() + drData("OrgMaterialNo") = dtMLot.Rows(i)("MaterialNo") '紀錄原來的主物料 + drData("MaterialNo") = dtMLot.Rows(i)("SubstituteMaterialNo") '把MaterialNo替換成SubstituteMaterialNo + drData("MaterialType") = dtMLot.Rows(i)("SubstituteMaterialType") + drData("MaterialLevelShow") = dtMLot.Rows(i)("SubstituteMaterialLevel") + drData("UseQty") = dtMLot.Rows(i)("UseQty") + drData("CheckLotNo") = dtMLot.Rows(i)("CheckLotNo") + + '物料WIP INV投料點為2,半成品WIP INV投料點為4 + '因用料清單是紀錄主料的投料點如果主料與替代料的物料位階不同,則投料點需替換。 + If drSelect(0)("MaterialLevelShow") = 0 Then + If dtMLot.Rows(i)("SubstituteMaterialLevel") = 1 Then + If drSelect(0)("PutInPlaceType") = 2 Then + drData("PutInPlaceType") = 4 + Else + drData("PutInPlaceType") = drSelect(0)("PutInPlaceType") + End If + Else + drData("PutInPlaceType") = drSelect(0)("PutInPlaceType") + End If + Else + If dtMLot.Rows(i)("SubstituteMaterialLevel") = 0 Then + If drSelect(0)("PutInPlaceType") = 4 Then + drData("PutInPlaceType") = 2 + Else + drData("PutInPlaceType") = drSelect(0)("PutInPlaceType") + End If + Else + drData("PutInPlaceType") = drSelect(0)("PutInPlaceType") + End If + End If + drData("StdQty") = dtMLot.Rows(i)("SubstituteStdQty") + drData("DecreaseRate") = drSelect(0)("DecreaseRate") + drData("UnitNo") = drSelect(0)("UnitNo") + dtJoin.Rows.Add(drData) + End If + Next + + For Each drRow As DataRow In dsWIP.Tables(tblTMaterial).Rows + If drRow("UseQty") = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200017", "[%MaterialNo%]: " & drRow("MaterialNo") & ", [%USEQTY%] [%MUST BE GREATER THAN%] 0"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + Next + + '傳入匯整後的資料 + For i = 0 To dtJoin.Rows.Count - 1 + If dtJoin.Rows(i)("UseQty") > 0 Then '過濾UseQty為零的 + strMaterial += CombineXMLValueTag( + CombineXMLValue("orgmaterialno", CInput(dtJoin.Rows(i)("OrgMaterialNo"))) & + CombineXMLValue("materialno", CInput(dtJoin.Rows(i)("MaterialNo"))) & + CombineXMLValue("materialtype", CInput(dtJoin.Rows(i)("MaterialType"))) & + CombineXMLValue("materiallevel", dtJoin.Rows(i)("MaterialLevelShow")) & + CombineXMLValue("useqty", dtJoin.Rows(i)("UseQty")) & + CombineXMLValue("checklotno", CInput(dtJoin.Rows(i)("CheckLotNo"))) & + CombineXMLValue("putinplacetype", dtJoin.Rows(i)("PutInPlaceType")) & + CombineXMLValue("stdqty", dtJoin.Rows(i)("StdQty")) & + CombineXMLValue("decreaserate", dtJoin.Rows(i)("DecreaseRate")) & + CombineXMLValue("unitno", CInput(dtJoin.Rows(i)("UnitNo")))) + End If + Next + + '因OrgMaterialNo在作Exe_CheckOut時不使用,Exe_CheckOut所使用的物料用量資料先合併 + Dim dtMaterialNo As New DataTable + Dim drAddMNo As DataRow + Dim drSelMNo As DataRow() + dtMaterialNo.Columns.Add("MaterialNo", System.Type.GetType("System.String")) + dtMaterialNo.Columns.Add("MaterialType", System.Type.GetType("System.String")) + dtMaterialNo.Columns.Add("MaterialLevel", System.Type.GetType("System.String")) + dtMaterialNo.Columns.Add("UseQty", System.Type.GetType("System.Decimal")) + dtMaterialNo.Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) + dtMaterialNo.Columns.Add("PutInPlaceType", System.Type.GetType("System.Int16")) + dtMaterialNo.Columns.Add("StdQty", System.Type.GetType("System.Decimal")) + dtMaterialNo.Columns.Add("DecreaseRate", System.Type.GetType("System.Decimal")) + dtMaterialNo.Columns.Add("UnitNo", System.Type.GetType("System.String")) + For i = 0 To dtJoin.Rows.Count - 1 + '過濾UseQty為零的 + If dtJoin.Rows(i)("UseQty") > 0 Then + drSelMNo = dtMaterialNo.Select("MaterialNo = '" & dtJoin.Rows(i)("MaterialNo") & "'") + If drSelMNo.Length = 0 Then + drAddMNo = dtMaterialNo.NewRow + drAddMNo("MaterialNo") = dtJoin.Rows(i)("MaterialNo") + drAddMNo("MaterialType") = dtJoin.Rows(i)("MaterialType") + drAddMNo("MaterialLevel") = dtJoin.Rows(i)("MaterialLevelShow") + drAddMNo("UseQty") = dtJoin.Rows(i)("UseQty") + drAddMNo("CheckLotNo") = dtJoin.Rows(i)("CheckLotNo") + drAddMNo("PutInPlaceType") = dtJoin.Rows(i)("PutInPlaceType") + drAddMNo("StdQty") = dtJoin.Rows(i)("StdQty") + drAddMNo("DecreaseRate") = dtJoin.Rows(i)("DecreaseRate") + drAddMNo("UnitNo") = dtJoin.Rows(i)("UnitNo") + dtMaterialNo.Rows.Add(drAddMNo) + Else + drSelMNo(0)("UseQty") += dtJoin.Rows(i)("UseQty") + drSelMNo(0)("StdQty") += dtJoin.Rows(i)("StdQty") + drSelMNo(0)("DecreaseRate") = (drSelect(0)("DecreaseRate") + dtJoin.Rows(i)("DecreaseRate")) / 2 + End If + End If + Next + + '執行Exe_CheckOut與物料總用量檢查時所傳入的strMaterial + For i = 0 To dtMaterialNo.Rows.Count - 1 + strMaterialExeCO += CombineXMLValueTag( + CombineXMLValue("materialno", CInput(dtMaterialNo.Rows(i)("MaterialNo"))) & + CombineXMLValue("materialtype", CInput(dtMaterialNo.Rows(i)("MaterialType"))) & + CombineXMLValue("materiallevel", dtMaterialNo.Rows(i)("MaterialLevel")) & + CombineXMLValue("useqty", dtMaterialNo.Rows(i)("UseQty")) & + CombineXMLValue("checklotno", CInput(dtMaterialNo.Rows(i)("CheckLotNo"))) & + CombineXMLValue("putinplacetype", dtMaterialNo.Rows(i)("PutInPlaceType")) & + CombineXMLValue("stdqty", dtMaterialNo.Rows(i)("StdQty")) & + CombineXMLValue("decreaserate", dtMaterialNo.Rows(i)("DecreaseRate")) & + CombineXMLValue("unitno", CInput(dtMaterialNo.Rows(i)("UnitNo")))) + Next + + '------------------------------------------物料料批資訊strMaterialLot--------------------------------------------- + '因替代料有可能相同,故相同的替代料料批要合併 + Dim drAddMLotNo As DataRow + Dim drSelMLotNo As DataRow() + dtMaterialLotNo.Columns.Add("EquipmentNo", System.Type.GetType("System.String")) + dtMaterialLotNo.Columns.Add("MaterialNo", System.Type.GetType("System.String")) + dtMaterialLotNo.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtMaterialLotNo.Columns.Add("UseQty", System.Type.GetType("System.Decimal")) + ' 2016/10/26 YF, 設備用料管理替代料不用合併, 需依主料&替代料來判斷扣料 + dtMaterialLotNo.Columns.Add("OrgMaterialNo", System.Type.GetType("System.String")) + + For i = 0 To dtMLot.Rows.Count - 1 + + If (dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString = "1") Then + ' 2016/10/26 YF, 設備用料管理 + drAddMLotNo = dtMaterialLotNo.NewRow + drAddMLotNo("EquipmentNo") = dtMLot.Rows(i)("EquipmentNo") + drAddMLotNo("MaterialNo") = dtMLot.Rows(i)("SubstituteMaterialNo") + drAddMLotNo("OrgMaterialNo") = dtMLot.Rows(i)("MaterialNo") + drAddMLotNo("MaterialLotNo") = dtMLot.Rows(i)("MaterialLotNo") + drAddMLotNo("UseQty") = dtMLot.Rows(i)("UseQty") + dtMaterialLotNo.Rows.Add(drAddMLotNo) + Else + drSelMLotNo = dtMaterialLotNo.Select("MaterialNo = '" & dtMLot.Rows(i)("SubstituteMaterialNo") & "' And MaterialLotNo ='" & dtMLot.Rows(i)("MaterialLotNo") & "'") + If drSelMLotNo.Length = 0 Then + drAddMLotNo = dtMaterialLotNo.NewRow + drAddMLotNo("EquipmentNo") = dtMLot.Rows(i)("EquipmentNo") + drAddMLotNo("MaterialNo") = dtMLot.Rows(i)("SubstituteMaterialNo") + drAddMLotNo("OrgMaterialNo") = dtMLot.Rows(i)("MaterialNo") + drAddMLotNo("MaterialLotNo") = dtMLot.Rows(i)("MaterialLotNo") + drAddMLotNo("UseQty") = dtMLot.Rows(i)("UseQty") + dtMaterialLotNo.Rows.Add(drAddMLotNo) + Else + drSelMLotNo(0)("UseQty") += dtMLot.Rows(i)("UseQty") + End If + End If + Next + + For i = 0 To dtMaterialLotNo.Rows.Count - 1 + If dtMaterialLotNo.Rows(i)("UseQty") > 0 Then + strMaterialLot += CombineXMLValueTag( + CombineXMLValue("materialno", CInput(dtMaterialLotNo.Rows(i)("MaterialNo"))) & + CombineXMLValue("orgmaterialno", CInput(dtMaterialLotNo.Rows(i)("OrgMaterialNo").ToString)) & + CombineXMLValue("materiallotno", CInput(dtMaterialLotNo.Rows(i)("MaterialLotNo"))) & + CombineXMLValue("qty", dtMaterialLotNo.Rows(i)("UseQty")) & + CombineXMLValue("equipmentno", CInput(dtMaterialLotNo.Rows(i)("EquipmentNo")))) + End If + Next + End If + + '5.格式化不良原因------------------------------------------------------------------------------------------------- + Dim strError As String = "" + + drSel = dsWIP.Tables(tblOPError).Select("CheckFlag=" & True) + For i = 0 To drSel.Length - 1 + strError += CombineXMLValueTag( + CombineXMLValue("errorno", CInput(drSel(i)("ErrorNo"))) & + CombineXMLValue("errorqty", drSel(i)("ErrorQty")) & + CombineXMLValue("errorlevel", drSel(i)("ReasonLevel"))) + Next + + '聯產品有勾起則必需有聯產品資料 + Dim blnPRDChgDetail As Boolean = False + + If chkUnionProductNo.Checked Then + If txtUnionProductNo.Text = "" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%UnionProductNo%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + '若為新模式變更, 但此BR不為作業站最後一個BR時, 需提示不可變更聯產品 + drSel = dsWIP.Tables(tblSYSParameter).Select("ParameterNo = 'ProductChangeUpdDetail'") + If drSel.Length > 0 Then + If drSel(0)("ParameterValue").ToString = "1" Then + blnPRDChgDetail = True + End If + End If + End If + + '6.檢查是否允許執行 ---------------------------------------------------------------------------------------------- + If ChkLotStamp(LotNo, UserId, dsWIP.Tables(tblLotState).Rows(0)("LotStamp")) < 0 Then GoTo lblExitProcedure + + + Dim strMsg As String + + '8.Control Rule Check -------------------------------------------------------------------------------------------- + Dim strLinkName As String + Dim strMailGroupNo As String = "" + Dim strRuleNo As String = defString + Dim intERFType As Integer = defInteger + Dim dsTestValue As DataSet + Dim strERFMsg As String + Dim strHoldLotNo As String = defString + + If ChkControlRule(LotNo, UserId, dsWIP.Tables(tblLotState).Rows(0)("LotStamp"), + strAttrib, strLinkName, strMsg, strRuleNo, intERFType, strMailGroupNo, strError, , , dsTestValue) < 0 Then GoTo lblExitProcedure + + '2015-12-07, Joe, Check SPC Contorl + If funChkSPCControl_Var(LotNo, strAttrib, dsTestValue, strLinkName, intERFType, strERFMsg) < 0 Then GoTo lblExitProcedure + strERFMsg = ChgTranslateErrorMsg(strERFMsg) + + '7.ChkMaterial--------------------------------------------------------------------------------------------- + '2022/8/23,Ning, 117535: 厦门云天--生产批进站后设备故障再修复,出站报错, 無用料資訊不需查核存量 + If Not dsWIP.Tables(tblTMaterial) Is Nothing AndAlso dsWIP.Tables(tblTMaterial).Rows.Count > 0 Then + If funCheckMTLForBR(dtMLot.Copy, strLinkName, intERFType, strRuleNo) = False Then + GoTo lblExitProcedure + End If + End If + + '若需變更明細, 則需檢查此BR是否為此作業站最後一個BR + If chkUnionProductNo.Checked AndAlso blnPRDChgDetail = True Then + If funChkLastBR(strLinkName) = False Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "[%Current BR is not the last BR in OP, cannot change Product%]!"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + End If + + + '240119 By 21681 出站卡控 判断是否拿到了值 没拿到值不允许出站 + If dsKz.Tables(0).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-2168102", "[%NOVALUE%], [%No KzTable Value,cannot to next%]"), MsgBoxStyle.Exclamation, Me.Text) + GoTo lblExitProcedure + End If + + '9.Execute CheckOut ----------------------------------------------------------------------------------------------- + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("linkname", "LinkName", "String", CInput(strLinkName), "") + strParameter += CombineXMLParameter("lotstamp", "LotStamp", "Decimal", dsWIP.Tables(tblLotState).Rows(0)("LotStamp"), "") + strParameter += CombineXMLParameter("shiftno", "ShiftNo", "String", CInput(txtShiftNo.Text), "") + 'strParameter += CombineXMLParameter("checkouttime", "CheckOutTime", "String", dtpcheckouttime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") '2017/11/06 mark by KunYuan:移至下方處理 + strParameter += CombineXMLParameterMultiValue("attrib", "Attrib", "String", strAttrib, "") + strParameter += CombineXMLParameterMultiValue("equipment", "Equipment", "String", strEquipment, "") + strParameter += CombineXMLParameterMultiValue("material", "Material", "String", strMaterialExeCO, "") 'Kevin 2012/11/22,修改傳入的物料資訊 + strParameter += CombineXMLParameterMultiValue("materiallot", "MaterialLot", "String", strMaterialLot, "") + If (bBinNew = True) Then + For Each drTemp As DataRow In dsWIP.Tables(strSysBin).Rows + strNewBin += CombineXMLValueTag( + CombineXMLValue("binno", CInput(drTemp("BinNo").ToString)) & + CombineXMLValue("binqty", CInput(dtBinNew.Rows(0)(drTemp("BinNo").ToString)))) + + Next + + strParameter += CombineXMLParameterMultiValue("newbin", "NewBin", "String", strNewBin, "") + End If + strParameter += CombineXMLParameterMultiValue("error", "Error", "String", strError, "") + strParameter += CombineXMLParameter("lotrecord", "LotRecord", "String", CInput(txtLotRecord.Text), "") + strParameter += CombineXMLParameter("ruleno", "RuleNo", "String", CInput(strRuleNo), "") 'Added by Jialing 2011/02/17 + '20180105 KevinChang 若有選取則加入聯產品資訊 + '2020/6/10, Mantis 0073105: [6.0.5] 產品變更_L_CO_GEN 調整, 有勾起聯產品才傳入聯產品資訊 + If Not IsDBNull(txtUnionProductNo.Text) AndAlso Not String.IsNullOrEmpty(txtUnionProductNo.Text) Then + strParameter += CombineXMLParameter("fromproductno", "FromProductNo", "String", dsWIP.Tables(tbllotbasis).Rows(0)("ProductNo").ToString, "") + strParameter += CombineXMLParameter("fromproductversion", "FromProductVersion", "String", dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString, "") + strParameter += CombineXMLParameter("toproductno", "ToProductNo", "String", CInput(txtUnionProductNo.Text), "") + strParameter += CombineXMLParameter("toproductversion", "ToProductVersion", "String", CInput(txtUnionProductVersion.Text), "") + strParameter += CombineXMLParameter("toproductunitno", "ToProductUnitNo", "String", CInput(txtUnionProductUnit.Text), "") + End If + + '2017/11/06 KunYuan:當有勾選『變更結束加工時間』,再傳入CheckOutTime + If chkUpdCheckOutTime.Checked Then + strParameter += CombineXMLParameter("checkouttime", "CheckOutTime", "String", dtpcheckouttime.Value.ToString("yyyy/MM/dd HH:mm:ss"), "") + End If + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + '2019/06/20 Lena, Mantis: 0058845 [WIP] CI/CO執行時間紀錄 + '新增參數 LogOn = True, 記錄執行時間. + OutXml = InvokeSrv("wsWIP.Exe_CheckOut", InXml, LogOn:=True) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then '找出Exception訊並顯示出來 + '成功執行完成,避免再按下一次 + btnConfirm.Enabled = False + + '2017/11/06 KunYuan:變更結束加工時間checkbox預設不勾選 + chkUpdCheckOutTime.Checked = False + + '惟全:判斷是否開立異常單 + If XmlDoc.GetElementsByTagName("holdlotno").Count > 0 Then + If XmlDoc.GetElementsByTagName("holdlotno").Item(0).SelectNodes("value").Count > 0 Then + strHoldLotNo = XmlDoc.DocumentElement.GetElementsByTagName("holdlotno").Item(0).SelectNodes("value").Item(0).InnerText + + '2021/11/24,Ning, 102031: 【瑶华】qtime卡控不断触发 + strLinkName = "HOLD" + End If + End If + + If strLinkName <> "HOLD" And strLinkName <> "WAIT" Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-000001", "[%LotNo%]:" & LotNo & " [%Check Out%] [%Successfully%]"), MsgBoxStyle.Information, Me.Text) + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + GoTo lblExitProcedure + End If + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + GoTo lblExitProcedure + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + GoTo lblExitProcedure + End Try + + Me.Close() + + '惟全:判斷是否開立異常單 + If strHoldLotNo <> defString Then + If intERFType = defInteger Then + intERFType = 0 + End If + + '89904: 6.0.5.12 L_CO_GEN出站觸發Hold 開立異常單未帶出異常說明 2021/03/23 + '開立異常單 + '//CCC 07,0608: 傳入過帳人員 + ' 2016/08/12 YF, WP_BRERFCreate + 'Dim parameters As New Dictionary(Of String, Object) + 'parameters.Add("LotNo", strHoldLotNo) + 'parameters.Add("UserId", UserId) + 'parameters.Add("ERFType", 1) + 'parameters.Add("RuleNo", strExceedTime_Rule) + 'Me.ObjectFileHandler.Execute("WP_BRERFCreate", parameters) + 'Exit Sub + If strRuleNo <> defString Then + strRuleNo += "," & strExceedTime_Rule + Else + strRuleNo = strExceedTime_Rule + End If + + End If + + '10.Mail------------------------------------------------------------------------------------------------------------- + '以下的執行,不管成功失敗,都讓FormClose,代表此BR已完成 + + If strMailGroupNo <> "" Then + Call SendEmailToERFGroup_NoneERF(LotNo, UserId, strMailGroupNo, strMsg, + dsWIP.Tables(tblLotState).Rows(0)("OPNo"), dsWIP.Tables(tblLotState).Rows(0)("OPName"), dsWIP.Tables(tblLotState).Rows(0)("BRNo")) + End If + + '11.Transfer Lot----------------------------------------------------------------------------------------------------- + '以下的執行,不管成功失敗,都讓FormClose,代表此BR已完成 + '若再執行Confirm一次則不正確,同一BR會執行多次 + '2015-12-21, Joe, 加ERFMsg + '2020/6/11, Ning, 若有變更產品且為新模式, LinkName = PASS則不需TransferLot + If chkUnionProductNo.Checked = True AndAlso blnPRDChgDetail = True AndAlso strLinkName.ToUpper = "PASS" Then + Else + Call BRTransferLot(LotNo, UserId, strLinkName, intERFType, strRuleNo, , strERFMsg) + End If + + gReturnKeyValue = LotNo + + +lblExitProcedure: + + Cursor.Current = Cursors.Default + Exit Sub + + End Sub + + Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click + + Cursor.Current = Cursors.WaitCursor + + '檢查此 BR 是否此站第一次執行,若是第一次執行則以Reverse取消Trigger OP的動作 + Try + '2019/12/17 OwenLiu, Mantis:0063698, ReverseTriggerOP統一呼叫 WIP_Kit共用函式 + 'Call ExeReverseTriggerOP(UserId, LotNo, RevLotSerial, RevLotStamp) + + '2020/3/17,Ning,不啟用Reverse時的ReverseTriggerOP + '2022/9/19,Ning, 116091: 各BR 在畫面關閉動作執行ReverseTriggerOP,若有執行失敗須把訊息顯示:統一在form_closing時處理 + 'Call ExeReverseTriggerOP_NotUseUndo(UserId, LotNo, RevLotSerial, RevLotStamp) + + Catch e1 As Exception + Finally + Me.Close() + End Try + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub btnMultiUser_Click(sender As System.Object, e As System.EventArgs) Handles btnMultiUser.Click + + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Dim parameters As New Dictionary(Of String, Object) + parameters.Add("CallType", 2) + parameters.Add("UserID", UserId) + parameters.Add("CheckOutTime", dtpcheckouttime.Value) + parameters.Add("drLotInfo", dsWIP.Tables(tblLotState).Rows(0)) + '2019/10/18 Grace 調整ObjectID + Me.ObjectFileHandler.Execute("WP_OperatorLogIn_Lot", parameters) + 'Me.ObjectFileHandler.Execute("WP_OperatorLogin_Lot", parameters) + 'Dim frmLogin As New frmOperatorLogin_Lot + 'frmLogin.CallType = 2 'CO + 'frmLogin.UserID = UserId + 'frmLogin.CheckOutTime = dtpcheckouttime.Value + 'frmLogin.drLotInfo = dsWIP.Tables(tblLotState).Rows(0) + 'frmLogin.ShowDialog() + 'frmLogin.Dispose() + + End Sub + +#End Region + +#Region "--- Material ---" + + Private Sub txtMaterialNo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMaterialNo.KeyPress + + If e.KeyChar <> Convert.ToChar(13) Then Exit Sub + + If dsWIP.Tables(tblTMaterial) Is Nothing OrElse txtMaterialNo.Text.Trim = "" Then Exit Sub + txtMaterialNo.Text = txtMaterialNo.Text.ToUpper '輸入小寫自動轉成大寫 + 'Gary Lu:刷完物料編號後準備刷物料批號 + txtMaterialLotNo.Focus() + + 'Cursor.Current = Cursors.WaitCursor + + 'Dim drSel() As DataRow + 'drSel = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & txtMaterialNo.Text & "'") + 'If drSel.Length > 0 Then + ' Dim frmMaterial As frmMaterialQtyInput_Main + ' frmMaterial = New frmMaterialQtyInput_Main + ' frmMaterial.drMaterial = drSel(0) + ' 'frmMaterial.LotStateQty = txtCurQty.Text + ' 'If drSel(0)("CheckLotNo") = 1 Then frmMaterial.dtMLot = dtMLot + ' frmMaterial.dtMLot = dtMLot + ' 'Show Form + ' frmMaterial.ShowDialog() + + ' 'Return Value + ' 'If drSel(0)("CheckLotNo") = 1 Then dtMLot = frmMaterial.dtMLot '將MaterialLot輸入資料取回 + ' dtMLot = frmMaterial.dtMLot '將MaterialLot輸入資料取回 + ' If gReturnKeyValue <> defString Then '更新數量 + ' drSel(0).BeginEdit() + ' drSel(0)("UseQty") = gReturnKeyValue + ' drSel(0).EndEdit() + ' End If + ' frmMaterial.Dispose() + 'End If + + 'Cursor.Current = Cursors.Default + + End Sub + + Private Sub btnKeyIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeyIn.Click + + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + + Cursor.Current = Cursors.WaitCursor + + '找出DataSet中在目前游標列的資料列(DataRow) + Dim strMaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + Dim drSel() As DataRow = dsWIP.Tables(tblTMaterial).Select("MaterialNo='" & strMaterialNo & "'") + If drSel.Length = 0 Then Exit Sub + + ' 2016/08/30 YF, 不直接參考改用invoke叫用 + Dim drTMaterial As DataRow = drSel(0) + Dim parameters As New Dictionary(Of String, Object) From { + {"drMaterial", drTMaterial}, + {"dtMLot", dtMLot} + } + Me.ObjectFileHandler.Execute("WP_MaterialQtyInput_Main", parameters) + + dtMLot = parameters("dtMLot") + For Each drMLot As DataRow In dtMLot.Rows + If drMLot("UseQty") <= 0 Then + drMLot("UseQty") = funCalculateUseQty(drTMaterial, drMLot) + End If + Next + + funUpdateSumUseQty(drTMaterial) + + 'ActiveRow若消失→ActiveRow設定在上一層的UltraGrid上 + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then + iugMaterial.iMESUltraGrid.ActiveRow = FindRecordPosition(iugMaterial, "MaterialNo", strMaterialNo) + End If + + 'Gary Lu 20131105:使用者改用「輸入」方式選擇要扣那些料批的料後,物料編號和物料批號兩個輸入方塊全清空 + txtMaterialLotNo.Clear() + txtMaterialNo.Clear() + txtMaterialNo.Focus() + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDel.Click + + If iugMaterial.iMESUltraGrid.ActiveRow Is Nothing Then Exit Sub + + Cursor.Current = Cursors.WaitCursor + Dim strMaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + '找出DataSet中在目前游標列的資料列(DataRow) + Dim drSel() As DataRow + 'Gary Lu 20131106:判斷使用者要刪除的是怎樣的資料 + If iugMaterial.iMESUltraGrid.ActiveRow.Band.Key = tblTMaterial Then + '要刪除的是主料的用料資訊 + drSel = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & strMaterialNo & "'") + If drSel.Length > 0 Then + dsWIP.Tables(tblTMaterial).Rows.Remove(drSel(0)) + dsWIP.Tables(tblTMaterial).AcceptChanges() + End If + 'dtMLot關於此主料資訊一併清除 + drSel = dtMLot.Select("MaterialNo = '" & strMaterialNo & "'") + For i As Integer = 0 To drSel.Length - 1 + dtMLot.Rows.Remove(drSel(i)) + Next + + dtMLot.AcceptChanges() + + ElseIf iugMaterial.iMESUltraGrid.ActiveRow.Band.Key = dtMLot.TableName Then + Dim strSubstituteMaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("SubstituteMaterialNo").Value + + '要刪除的是使用者所選的一筆要扣料的資訊 + drSel = dtMLot.Select("MaterialNo='" & strMaterialNo & + "' and SubstituteMaterialNo='" & strSubstituteMaterialNo & + "' and MaterialLotNo='" & iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialLotNo").Value & "'") + '紀錄物料編號 + + Dim decMaterialUseQty As Decimal = iugMaterial.iMESUltraGrid.ActiveRow.Cells("UseQty").Value + If drSel.Length > 0 Then + dtMLot.Rows.Remove(drSel(0)) + dtMLot.AcceptChanges() + End If + 'TempMaterial中的使用數量必須更新 + drSel = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & strMaterialNo & "'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("UseQty") -= decMaterialUseQty + drSel(0).EndEdit() + End If + + '更新ActiveRow的位置 + drSel = dtMLot.Select("MaterialNo='" & strMaterialNo & "'") + If drSel.Length > 0 Then + '還有主料本身或替代料的用料資訊 + iugMaterial.iMESUltraGrid.ActiveRow = FindRecordPosition(iugMaterial, "MaterialNo", strMaterialNo).GetChild(ChildRow.First) + Else + '已沒有用料資訊了 + iugMaterial.iMESUltraGrid.ActiveRow = FindRecordPosition(iugMaterial, "MaterialNo", strMaterialNo) + End If + End If + drSel = Nothing + + Cursor.Current = Cursors.Default + + End Sub + + +#End Region + +#Region "--- Error ---" + + Private Sub txtErrorNo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtErrorNo.KeyPress + + If e.KeyChar = Convert.ToChar(13) Then + If txtErrorNo.Text.Trim = "" Then Exit Sub + txtErrorQty.Focus() + End If + + End Sub + + Private Sub txtErrorQty_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtErrorQty.KeyPress, txtUnionProductVersion.KeyPress + + If e.KeyChar <> Convert.ToChar(13) Then Exit Sub + + If txtErrorNo.Text.Trim = "" Then Exit Sub + If txtErrorQty.Text.Trim = "" Then Exit Sub + + Cursor.Current = Cursors.WaitCursor + + If IsNumeric(txtErrorQty.Text) Then + If txtErrorQty.Text <= 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200017", "[%ErrorQty%]"), MsgBoxStyle.Exclamation, Me.Text) + txtErrorQty.Focus() + Exit Sub + End If + 'If InStr(txtErrorQty.Text, ".", CompareMethod.Text) > 0 Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "ErrorQty can't be decimal!!"), MsgBoxStyle.Exclamation, Me.Text) + ' txtErrorQty.Focus() + ' Exit Sub + 'End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%ErrorQty%]"), MsgBoxStyle.Exclamation, Me.Text) + txtErrorQty.Focus() + Exit Sub + End If + + Dim drSel() As DataRow + Dim strErrorNo As String + strErrorNo = txtErrorNo.Text.Trim.ToUpper + drSel = dsWIP.Tables(tblOPError).Select("ErrorNo='" & strErrorNo & "'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("CheckFlag") = True + drSel(0)("ErrorQty") = txtErrorQty.Text + drSel(0).EndEdit() + + 'Focus在勾選的Row. + iugError.iMESUltraGrid.Selected.Rows.Clear() + ugrRow = FindRecordPosition(iugError, "ErrorNo", strErrorNo) + If Not ugrRow Is Nothing Then + iugError.iMESUltraGrid.ActiveRow = ugrRow + iugError.iMESUltraGrid.ActiveRow.Selected = True + End If + + '加入後清除 + txtErrorNo.Text = "" + txtErrorQty.Text = "" + txtErrorNo.Focus() + Else + txtErrorNo.Focus() + End If + drSel = Nothing + 'Elena 2011/11/8 R1111002 自動計算GoodQty、ScrapQty及DefectQty數量 + If funGetParameter("SysInfo", "CalculateQty") = 1 Then + Dim drSelError() As DataRow + Dim decScrapQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decScrapQty = decScrapQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decScrapQty + End If + drSelError = dtKeyIn.Select("AttribNo = 'GoodQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = CDec(txtCurQty.Text) - decScrapQty + End If + + Dim decDefectQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=1 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decDefectQty = decDefectQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'DefectQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decDefectQty + End If + drSelError = Nothing + End If + Cursor.Current = Cursors.Default + + End Sub + + +#End Region + +#Region "--- Control Enter,KeyPress ---" + + Private Sub txtLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLotNo.Enter + txtLotNo.SelectAll() + End Sub + Private Sub txtLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtLotNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtPriority_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPriority.Enter + txtPriority.SelectAll() + End Sub + Private Sub txtPriority_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtPriority.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtAreaNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtAreaNo.Enter + txtAreaNo.SelectAll() + End Sub + Private Sub txtAreaNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtAreaNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCurQty_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCurQty.Enter + txtCurQty.SelectAll() + End Sub + Private Sub txtCurQty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCurQty.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCurUnitNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCurUnitNo.Enter + txtCurUnitNo.SelectAll() + End Sub + Private Sub txtCurUnitNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCurUnitNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtSysQty_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSysQty.Enter + txtSysQty.SelectAll() + End Sub + Private Sub txtSysQty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSysQty.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtSysUnitNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSysUnitNo.Enter + txtSysUnitNo.SelectAll() + End Sub + Private Sub txtSysUnitNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSysUnitNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtOPNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOPNo.Enter + txtOPNo.SelectAll() + End Sub + Private Sub txtOPNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtOPNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtOPDescription_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOPDescription.Enter + txtOPDescription.SelectAll() + End Sub + Private Sub txtOPDescription_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtOPDescription.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtCustomerLotNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCustomerLotNo.Enter + txtCustomerLotNo.SelectAll() + End Sub + Private Sub txtCustomerLotNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCustomerLotNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtMONo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtMONo.Enter + txtMONo.SelectAll() + End Sub + Private Sub txtMONo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMONo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtEmployeeNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEmployeeNo.Enter + txtEmployeeNo.SelectAll() + End Sub + Private Sub txtEmployeeNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtEmployeeNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtShiftNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtShiftNo.Enter + txtShiftNo.SelectAll() + End Sub + Private Sub txtShiftNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtShiftNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtLotRecord_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtLotRecord.Enter + txtLotRecord.SelectAll() + End Sub + + Private Sub txtProductNo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtProductNo.Enter + txtProductNo.SelectAll() + End Sub + Private Sub txtProductNo_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtProductNo.KeyPress + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + + Private Sub txtMaterialLotNo_Enter(sender As System.Object, e As System.EventArgs) Handles txtMaterialLotNo.Enter + txtMaterialLotNo.SelectAll() + End Sub + Private Sub txtMaterialLotNo_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtMaterialLotNo.KeyPress + + If e.KeyChar <> Convert.ToChar(13) Then + Exit Sub + End If + + If txtMaterialLotNo.Text.Trim = "" Then + Exit Sub + End If + + ' 2016/10/27 YF, 依作業站用料選項處理用料機制 + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + Case "0" + ' 發料點(線邊倉或工單) + AutoFeedingByPutinPlace(txtMaterialNo.Text, txtMaterialLotNo.Text) + Case "1" + ' 設備 + '2019/9/6,Ning,Co時不允許設備上料 + 'AutoFeedingByEQP() + Case "2" + ' 生產線, 待組裝版再實作 + Case "3" + ' 工位, 待組裝版再實作 + Case Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-003000", "[%MaterialOption%]:" & dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString & " [%NOT DEFINE%]!"), MsgBoxStyle.Exclamation, Me.Text) + End Select + + End Sub + +#End Region + +#Region "--- Ultra Grid ---" + + Private Sub iugAttrib_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugAttrib.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblTAttrib).Columns.Count - 1 + Select Case dsWIP.Tables(tblTAttrib).Columns(i).ColumnName.ToUpper + Case "ATTRIBNO" + With .Bands(tblTAttrib).Columns("AttribNo") + .Header.Caption = "AttribNo" + .Width = 70 + .Header.VisiblePosition = 1 + End With + Case "ATTRIBNAME" + With .Bands(tblTAttrib).Columns("AttribName") + .Header.Caption = "AttribName" + .Width = 95 + .Header.VisiblePosition = 2 + End With + Case "ATTRIBVALUE" + With .Bands(tblTAttrib).Columns("AttribValue") + .Header.Caption = "AttribValue" + .Width = 80 + .Header.VisiblePosition = 3 + End With + Case "ATTRIBSOURCE" + With .Bands(tblTAttrib).Columns("AttribSource") + .Header.Caption = "AttribSource" + .Width = 65 + .Header.VisiblePosition = 4 + .ValueList = iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists("ASource") + End With + Case Else + With .Bands(tblTAttrib).Columns(dsWIP.Tables(tblTAttrib).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + End With + + + End Sub + + Private Sub iugAttrib_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugAttrib.iMESUltraGrid_InitializeRow + + Dim strAttribValue As String + strAttribValue = e.Row.Cells("AttribValue").Value.ToString.Trim + + '\\Server\01A.pdf + If Mid(strAttribValue, 1, 2) = "\\" Then + e.Row.Cells("AttribValue").Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + '\\HTTP + If Mid(strAttribValue.ToUpper, 1, 4) = "HTTP" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + '\\HTTPS + If Mid(strAttribValue.ToUpper, 1, 5) = "HTTPS" Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + End If + + End Sub + + Private Sub iugAttrib_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugAttrib.iMESUltraGrid_ClickCellButton + + Cursor.Current = Cursors.WaitCursor + + Dim strFilePath As String + + strFilePath = e.Cell.Row.Cells("AttribValue").Value.ToString.Trim + + If strFilePath = "" Then Exit Sub + + Try + Dim objProcess As New Process + objProcess.Start(strFilePath) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugMaterial.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblTMaterial).Columns.Count - 1 + Select Case dsWIP.Tables(tblTMaterial).Columns(i).ColumnName.ToUpper + Case "MATERIALLEVELSHOW" + With .Bands(tblTMaterial).Columns("MaterialLevelShow") + .Header.Caption = "MaterialLevelShow" + .Hidden = False + .CalculateAutoResizeWidth(PerformAutoSizeType.VisibleRows, True) + .Header.VisiblePosition = 0 + .ValueList = vlMaterialLevel + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "MATERIALNO" + With .Bands(tblTMaterial).Columns("MaterialNo") + .Header.Caption = "MaterialNo" + .Width = 110 + .Header.VisiblePosition = 1 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "STDQTY" + With .Bands(tblTMaterial).Columns("StdQty") + .Header.Caption = "StdQty" + .Width = 100 + .Header.VisiblePosition = 2 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .Format = "0.########" + .TabStop = False + End With + Case "STDUSEQTY" + With .Bands(tblTMaterial).Columns("StdUseQty") + .Header.Caption = "StdUseQty" + .Width = 80 + .Header.VisiblePosition = 3 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case "USEQTY" + With .Bands(tblTMaterial).Columns("UseQty") + .Header.Caption = "UseQty" + .Width = 80 + .Header.VisiblePosition = 4 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .CellAppearance.BackColor = System.Drawing.Color.White + .CellAppearance.ForeColor = System.Drawing.Color.Blue + End With + Case "UNITNO" + With .Bands(tblTMaterial).Columns("UnitNo") + .Header.Caption = "UnitNo" + .Width = 40 + .Header.VisiblePosition = 5 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + Case Else + With .Bands(tblTMaterial).Columns(dsWIP.Tables(tblTMaterial).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + If Not dtMLot Is Nothing Then + For Each dc As DataColumn In dsWIP.Tables(dsWIP.Tables(dtMLot.TableName).TableName).Columns + With .Bands(dsWIP.Tables(dtMLot.TableName).TableName).Columns(dc.ColumnName.ToUpper) + .Hidden = True + End With + Next + + With .Bands(dsWIP.Tables(dtMLot.TableName).TableName) + With .Columns("EquipmentNo") + .Width = 110 + .Header.VisiblePosition = 1 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + If blnByEQP = True Then + .Hidden = False + Else + .Hidden = True + End If + End With + With .Columns("MaterialNo") + .Width = 110 + .Header.VisiblePosition = 1 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Hidden = True + End With + With .Columns("SubstituteMaterialNo") + .Width = 110 + .Header.VisiblePosition = 2 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Hidden = False + End With + With .Columns("MaterialLotNo") + .Width = 100 + .Header.VisiblePosition = 3 + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .Hidden = False + End With + With .Columns("Qty") + .Width = 100 + .Header.VisiblePosition = 4 + .Format = "0.########" + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .Hidden = False + End With + With .Columns("UseQty") + .Width = 80 + .Header.VisiblePosition = 5 + .Format = "0.########" + .Header.Appearance.BackColor = System.Drawing.Color.Yellow + .CellAppearance.BackColor = System.Drawing.Color.White + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .Hidden = False + End With + .SortedColumns.Add("SubstituteMaterialNo", False, False) + .SortedColumns.Add("MaterialLotNo", False, False) + End With + End If + + iugMaterial.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + + End With + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugMaterial.iMESUltraGrid_InitializeRow + + If e.Row.Band.Key = tblTMaterial Then + 'If e.Row.Cells("CheckLotNo").Value = 1 Then '不允許直接編輯 + + e.Row.Cells("UseQty").Activation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + e.Row.Cells("UseQty").Appearance.BackColor = System.Drawing.Color.Gainsboro + 'End If + End If + + + End Sub + + Private Sub iugMaterial_iMESUltraGrid_BeforeCellUpdate(sender As System.Object, e As Infragistics.Win.UltraWinGrid.BeforeCellUpdateEventArgs) Handles iugMaterial.iMESUltraGrid_BeforeCellUpdate + If e.Cell.Column.Key.ToUpper = "USEQTY" Then + If IsNumeric(e.NewValue) Then + If e.NewValue < 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200017", "[%USEQTY%]"), MsgBoxStyle.Exclamation, Me.Text) + e.Cancel = True + Exit Sub + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%USEQTY%]"), MsgBoxStyle.Exclamation, Me.Text) + e.Cancel = True + Exit Sub + End If + End If + End Sub + + Private Sub iugMaterial_iMESUltraGrid_AfterCellUpdate(sender As System.Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugMaterial.iMESUltraGrid_AfterCellUpdate + If e.Cell.Column.Key.ToUpper <> "USEQTY" Then + Exit Sub + End If + + Dim strMaterialNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialNo").Value + Dim strMaterialLotNo As String = iugMaterial.iMESUltraGrid.ActiveRow.Cells("MaterialLotNo").Value + + Dim drTMaterial() As DataRow + drTMaterial = dsWIP.Tables(tblTMaterial).Select("MaterialNo = '" & strMaterialNo & "'") + If drTMaterial.Length > 0 Then + If e.Cell.Row.Cells("Qty").Value >= e.Cell.Row.Cells("USEQTY").Value Then + '更新數量 + funUpdateSumUseQty(drTMaterial(0)) + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-203083", "[%USEQTY%] > [%MATERIALSTATE%], [%MaterialLotNo%]: " & strMaterialLotNo), MsgBoxStyle.Exclamation, Me.Text) + + e.Cell.Row.Cells("USEQTY").Value = 0 + Exit Sub + End If + End If + End Sub + + Private Sub iugEquipment_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugEquipment.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + 'Equipment + For i = 0 To dsWIP.Tables(tblTEquipment).Columns.Count - 1 + Select Case dsWIP.Tables(tblTEquipment).Columns(i).ColumnName.ToUpper + Case "EQUIPMENTNO" + With .Bands(tblTEquipment).Columns("EquipmentNo") + .Header.Caption = "EquipmentNo" + .Width = 120 + .Header.VisiblePosition = 2 + End With + Case "EQUIPMENTTYPE" + With .Bands(tblTEquipment).Columns("EquipmentType") + .Header.Caption = "EquipmentType" + .Width = 100 + .Header.VisiblePosition = 3 + End With + Case Else + With .Bands(tblTEquipment).Columns(dsWIP.Tables(tblTEquipment).Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + + If Not dsWIP.Tables("Chamber") Is Nothing Then + For i = 0 To dsWIP.Tables("Chamber").Columns.Count - 1 + Select Case dsWIP.Tables("Chamber").Columns(i).ColumnName.ToUpper + Case "EQUIPMENTNO" + With .Bands("Chamber").Columns("EquipmentNo") + .Header.Caption = "EquipmentNo" + .Width = 150 + .Header.VisiblePosition = 1 + End With + Case "EQUIPMENTNAME" + With .Bands("Chamber").Columns("EquipmentName") + .Header.Caption = "Equipment Name" + .Width = 150 + .Header.VisiblePosition = 2 + End With + Case "EQUIPMENTTYPE" + With .Bands("Chamber").Columns("EquipmentType") + .Header.Caption = "EquipmentType" + .Width = 100 + .Header.VisiblePosition = 3 + End With + Case Else + With .Bands("Chamber").Columns(dsWIP.Tables("Chamber").Columns(i).ColumnName.ToUpper) + .Hidden = True + End With + End Select + Next + End If + + 'Kevin 14/02/18,不顯示模治具數量 + If Not dsWIP.Tables("ContAcc") Is Nothing Then + With .Bands("ContAccessory").Columns("UseQty") + .Hidden = True + End With + + '[Mantis:0107151]L_CO_GEN,配件(模治具)開始時間格式不正確 + With .Bands("ContAccessory").Columns("StartTime") + .Format = "yyyy/MM/dd HH:mm:ss" + .Width = 120 + End With + + With .Bands("ContAccessory").Columns("EndTime") + .Format = "yyyy/MM/dd HH:mm:ss" + .Width = 120 + End With + + End If + + End With + + + 'UltraGrid + iugEquipment.iMESUltraGrid.Rows.ExpandAll(True) + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_InitializeLayOut(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugKeyIn.iMESUltraGrid_InitializeLayOut + + With e.Layout + With .Bands("KeyIn").Columns("AttribNo") + .Header.Caption = "AttribNo" + .Width = 90 + .Header.VisiblePosition = 1 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribName") + .Header.Caption = "AttribName" + .Width = 150 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribValue") + .Header.Caption = "AttribValue" + .Width = 130 + .Header.VisiblePosition = 3 + .CellAppearance.BackColor = System.Drawing.Color.White + End With + '2015-12-18, Joe, Add + With .Bands("KeyIn").Columns("QCItemNo") + .Header.Caption = "QCItemNo" + .Width = 100 + .Header.VisiblePosition = 4 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + End With + With .Bands("KeyIn").Columns("AttribSequence") + .Hidden = True + End With + With .Bands("KeyIn").Columns("InputType") + .Hidden = True + End With + With .Bands("KeyIn").Columns("DataType") + .Hidden = True + End With + With .Bands("KeyIn").Columns("ValueType") + .Hidden = True + End With + End With + + 'UltraGrid + iugKeyIn.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles iugKeyIn.iMESUltraGrid_InitializeRow + Dim strAttribValue As String + + Try + strAttribValue = e.Row.Cells("AttribNo").Value.ToString.Trim + + 'InputType=1 清單選擇 + If e.Row.Cells("InputType").Value = 1 Then + e.Row.Cells("AttribValue").Style = ColumnStyle.Button + e.Row.Cells("AttribValue").Appearance.BackColor = System.Drawing.Color.Pink + ElseIf e.Row.Cells("DataType").Value = 3 Then + e.Row.Cells("AttribValue").Style = ColumnStyle.DateTime + e.Row.Cells("AttribValue").Editor = editor + e.Row.Cells("AttribValue").Appearance.BackColor = Color.White + End If + + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + End Sub + + Private Sub iugKeyIn_iMESUltraGrid_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugKeyIn.iMESUltraGrid_ClickCellButton + + Dim intValueType As Integer + + Cursor.Current = Cursors.WaitCursor + + Try + + intValueType = iugKeyIn.iMESUltraGrid.ActiveRow.Cells("ValueType").Value + + If intValueType = 3 OrElse intValueType = 1 Then 'Reference System Parameter / Assign Valid Value + If Not IsNothing(dsWIP.Tables(strDefaultValue)) Then + dsWIP.Tables.Remove(strDefaultValue) + End If + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("elementno", "PropertyType", "String", iugKeyIn.iMESUltraGrid.ActiveRow.Cells("AttribNo").Value, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsSYS.LoadElementValue", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出Data + strDefaultValue = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadelementvalue").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadelementvalue").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadelementvalue").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" And XmlData <> "fail" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + + Dim fSearch As New frmCOMSearch + '如果 PropertyNo 的有效性檢查來自 MESParameter,則取出有效值提供選擇 + fSearch.dvSearch = dsWIP.Tables(strDefaultValue).DefaultView + fSearch.strFindColumnName = dsWIP.Tables(strDefaultValue).Columns(0).ColumnName + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If Not drSearch Is Nothing Then + If Not IsDBNull(drSearch(0).ToString) Then + iugKeyIn.iMESUltraGrid.ActiveRow.Cells("AttribValue").Value = drSearch(0).ToString + End If + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + End If + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + End Sub + + Private Sub iugError_iMESUltraGrid_AfterCellActivate(sender As Object, e As System.EventArgs) Handles iugError.iMESUltraGrid_AfterCellActivate + 'Elena 2011/11/8 R1111002 自動計算GoodQty、ScrapQty及DefectQty數量 + If funGetParameter("SysInfo", "CalculateQty") = 1 Then + Dim drSelError() As DataRow + Dim decScrapQty As Decimal = 0 + Dim decLossQty As Decimal = 0 + + drSelError = dtKeyIn.Select("AttribNo = 'LossQty'") + If drSelError.Length <> 0 Then + If IsNumeric(drSelError(0)("AttribValue")) Then + decLossQty = drSelError(0)("AttribValue") + End If + End If + + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decScrapQty = decScrapQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decScrapQty + End If + drSelError = dtKeyIn.Select("AttribNo = 'GoodQty'") + Dim blnCalulate As Boolean = True '0111211: [49-1]扫脚_check-out_bin分布调整,若有bin分佈調整, 則不自動計算GoodQty + If drSelError.Length <> 0 Then + If HaveLevel AndAlso iGoodBinStateQty <> 0 Then + If Not IsNothing(dtBinNew) AndAlso dtBinNew.Rows.Count > 0 Then + blnCalulate = False + End If + End If + If blnCalulate Then + drSelError(0)("AttribValue") = CDec(txtCurQty.Text) - decScrapQty - decLossQty + End If + End If + + Dim decDefectQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=1 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decDefectQty = decDefectQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'DefectQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decDefectQty + End If + drSelError = Nothing + End If + End Sub + + Private Sub iugError_iMESUltraGrid_InitializeLayOut(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles iugError.iMESUltraGrid_InitializeLayOut + + Dim i As Integer + + With e.Layout + For i = 0 To dsWIP.Tables(tblOPError).Columns.Count - 1 + With .Bands(tblOPError).Columns(dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper) + .Header.VisiblePosition = 99 + .Hidden = True + End With + Next + + With .Bands(tblOPError).Columns("CheckFlag") + .Header.Caption = "Check" + .Width = 30 + .Header.VisiblePosition = 1 + .CellAppearance.BackColor = System.Drawing.Color.White + .Hidden = False + End With + With .Bands(tblOPError).Columns("ErrorNo") + .Header.Caption = "ErrorNo" + .Width = 80 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .Hidden = False + End With + With .Bands(tblOPError).Columns("ReasonName") + .Header.Caption = "ReasonName" + .Width = 100 + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .TabStop = False + .Hidden = False + End With + With .Bands(tblOPError).Columns("ErrorQty") + .Header.Caption = "ErrorQty" + .Width = 50 + .Header.VisiblePosition = 4 + .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right + .CellAppearance.BackColor = System.Drawing.Color.White + .Hidden = False + End With + With .Bands(tblOPError).Columns("ReasonType") + .ValueList = iugError.iMESUltraGrid.DisplayLayout.ValueLists("AReasonType") + End With + + 'GroupBy + Dim G1 As Infragistics.Win.UltraWinGrid.UltraGridColumn + G1 = iugError.iMESUltraGrid.DisplayLayout.Bands(tblOPError).Columns("ReasonType") + iugError.iMESUltraGrid.DisplayLayout.Bands(tblOPError).SortedColumns.Add(G1, False, True) + iugError.iMESUltraGrid.Rows.ExpandAll(True) + + '客製化加總欄位 + .Bands(tblOPError).Summaries.Add("ErrorQtySum", Infragistics.Win.UltraWinGrid.SummaryType.Custom, + calCustomer, .Bands(tblOPError).Columns("ErrorQty"), Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn, Nothing) + + .Bands(tblOPError).Summaries("ErrorQtySum").Appearance.TextHAlign = Infragistics.Win.HAlign.Right + + '小數點不會顯示,改為Format(decTotal, "0.####")回傳時先format. + .Bands(tblOPError).Summaries("ErrorQtySum").DisplayFormat = "Sum={0:####}" + End With + + iugError.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + + End Sub + + Private Sub iugError_iMESUltraGrid_AfterCellUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles iugError.iMESUltraGrid_AfterCellUpdate + + If e.Cell.Column.Key = "CheckFlag" Then + If e.Cell.Value = False AndAlso e.Cell.Row.Cells("ErrorQty").Value > 0 Then + Dim drSel() As DataRow + drSel = dsWIP.Tables(tblOPError).Select("ErrorNo='" & e.Cell.Row.Cells("ErrorNo").Value & "'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("ErrorQty") = 0 + drSel(0).EndEdit() + End If + drSel = Nothing + End If + End If + 'Elena 2011/11/8 R1111002 自動計算GoodQty、ScrapQty及DefectQty數量 + If funGetParameter("SysInfo", "CalculateQty") = 1 Then + Dim drSelError() As DataRow + Dim decScrapQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decScrapQty = decScrapQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decScrapQty + End If + drSelError = dtKeyIn.Select("AttribNo = 'GoodQty'") + Dim blnCalulate As Boolean = True '0111211: [49-1]扫脚_check-out_bin分布调整,若有bin分佈調整, 則不自動計算GoodQty + If drSelError.Length <> 0 Then + If HaveLevel AndAlso iGoodBinStateQty <> 0 Then + If Not IsNothing(dtBinNew) AndAlso dtBinNew.Rows.Count > 0 Then + blnCalulate = False + End If + End If + If blnCalulate Then + drSelError(0)("AttribValue") = CDec(txtCurQty.Text) - decScrapQty + End If + End If + + Dim decDefectQty As Decimal = 0 + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=1 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decDefectQty = decDefectQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'DefectQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decDefectQty + End If + drSelError = Nothing + End If + End Sub + + Private Sub iugError_iMESUltraGrid_BeforeCellUpdate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeCellUpdateEventArgs) Handles iugError.iMESUltraGrid_BeforeCellUpdate + + If e.Cell.Column.Key = "ErrorQty" Then + If Not IsNumeric(e.NewValue) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%ErrorQty%]"), MsgBoxStyle.Exclamation, Me.Text) + e.Cancel = True + Exit Sub + End If + If e.NewValue < 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200016", "[%ErrorQty%]"), MsgBoxStyle.Exclamation, Me.Text) + e.Cancel = True + Exit Sub + End If + 'If InStr(e.NewValue, ".", CompareMethod.Text) > 0 Then + ' iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200015", "ErrorQty can't be decimal!!"), MsgBoxStyle.Exclamation, Me.Text) + ' e.Cancel = True + ' Exit Sub + 'End If + End If + + End Sub + +#End Region + +#Region "--- Load functions ---" + + '240119 By 21681 带出客制信息的方法 + Private Function funLoadKzTable() As String + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + + '在前面已经取得了LotNo,这里直接用就行 + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + 'OutXml = InvokeSrv("wsPRD.LoadPRDOpSubOp", InXml) + OutXml = InvokeSrv("ABC.wsWIP_21681.LoadWIPKzTableInOut", InXml) + + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblKzTable = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadkzinformationinout").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadkzinformationinout").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsKz.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadkzinformationinout").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsKz.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + '加入Check Field + Dim colCheckFlag As New DataColumn + colCheckFlag.ColumnName = "CheckFlag" + colCheckFlag.DataType = System.Type.GetType("System.Boolean") + colCheckFlag.DefaultValue = True + colCheckFlag.AllowDBNull = False + + dsKz.Tables(tblKzTable).Columns.Add(colCheckFlag) + iugKzxx.iMESUltraGrid.DataSource = dsKz.Tables(tblKzTable).DefaultView + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + End Function + + Private Function funLoadLotBasis() As String + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("baselotno", "BaseLotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadLotBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tbllotbasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadlotbasis").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + funLoadLotBasis = "suceess" + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + End Function + + Private Function funLoadLotState() As Integer + + funLoadLotState = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadLotBasisJoinState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + tblLotState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadlotbasisjoinstate").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasisjoinstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadlotbasisjoinstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadLotState = 0 + + End Function + + Private Function funLoadTemp_AttribJoinBasis() As Integer + + funLoadTemp_AttribJoinBasis = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_AttribJoinBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTAttrib = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_attrib").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_attrib").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_attrib").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + Call funAddValueList_Attrib() + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_AttribJoinBasis = 0 + + + End Function + + Private Function funLoadTemp_Equipment() As Integer + + funLoadTemp_Equipment = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + 'strParameter +=CombineXMLParameter("getmaterial", "GetMaterial", "Boolean", True, "") + strParameter += CombineXMLParameter("getrecipe", "GetRecipe", "Boolean", True, "") + + strParameter += CombineXMLParameter("getchamber", "GetChamber", "Boolean", True, "") + + If dsWIP.Tables(tblParameter).Rows.Count > 0 Then + If dsWIP.Tables(tblParameter).Rows(0).Item("ParameterValue") = "1" Then + strParameter += CombineXMLParameter("chambermanage", "ChamberManage", "Boolean", True, "") + Else + strParameter += CombineXMLParameter("chambermanage", "ChamberManage", "Boolean", False, "") + End If + Else + strParameter += CombineXMLParameter("chambermanage", "ChamberManage", "Boolean", False, "") + + End If + + strParameter += CombineXMLParameter("getcontaccessory", "GetContAccessory", "Boolean", True, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_Equipment", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTEquipment = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_equipment").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_equipment").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_equipment").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If Not dsWIP.Tables("ContAcc") Is Nothing Then + If dsWIP.Tables("ContAcc").Rows.Count = 0 Then + dsWIP.Relations.Remove("ContAccessory") + dsWIP.Tables.Remove("ContAcc") + End If + End If + If Not dsWIP.Tables("RecipeDetail") Is Nothing Then + If dsWIP.Tables("RecipeDetail").Rows.Count = 0 Then + dsWIP.Relations.Remove("Recipe") + dsWIP.Tables.Remove("RecipeDetail") + End If + End If + + iugEquipment.iMESUltraGrid.DataSource = dsWIP.Tables(tblTEquipment) + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_Equipment = 0 + + + End Function + + Private Function funLoadTemp_Material() As Integer + + funLoadTemp_Material = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_Material", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTMaterial = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_material").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_material").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_material").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If dsWIP.Tables(tblTMaterial).Rows.Count > 0 Then + '加入標準用量欄位 + Dim colStdQty As New DataColumn + colStdQty.ColumnName = "StdUseQty" + colStdQty.DataType = System.Type.GetType("System.Decimal") + colStdQty.DefaultValue = 0 + colStdQty.AllowDBNull = False + dsWIP.Tables(tblTMaterial).Columns.Add(colStdQty) + '加入實際用量欄位 + Dim colQty As New DataColumn + colQty.ColumnName = "UseQty" + colQty.DataType = System.Type.GetType("System.Decimal") + colQty.DefaultValue = 0 + colQty.AllowDBNull = False + dsWIP.Tables(tblTMaterial).Columns.Add(colQty) + + dsWIP.Tables(tblTMaterial).Columns("MaterialLevel").ColumnName = "MaterialLevelShow" + + '計算標準使用量 + Dim decCurQty, decStdQty As Decimal + Dim i As Integer + decCurQty = dsWIP.Tables(tblLotState).Rows(0)("CurQty") + For i = 0 To dsWIP.Tables(tblTMaterial).Rows.Count - 1 + decStdQty = decCurQty * dsWIP.Tables(tblTMaterial).Rows(i)("StdQty") * (1 + dsWIP.Tables(tblTMaterial).Rows(i)("DecreaseRate")) + dsWIP.Tables(tblTMaterial).Rows(i)("StdUseQty") = Format(decStdQty, "0.########") + dsWIP.Tables(tblTMaterial).Rows(i)("UseQty") = Format(0, "0.########") + ' 2016/10/20 YF, 一律自動計算標準使用量 + 'If dsWIP.Tables(tblTMaterial).Rows(i)("CountWay") = 0 Then 'Standard才要預設實際用量. + ' dsWIP.Tables(tblTMaterial).Rows(i)("UseQty") = Format(decStdQty, "0.######") + 'End If + Next + dsWIP.Tables(tblTMaterial).AcceptChanges() + + 'Create Material Lot Table + dtMLot = New DataTable("MaterialLot") + dtMLot.Columns.Add("EquipmentNo", System.Type.GetType("System.String")) + dtMLot.Columns.Add("MaterialNo", System.Type.GetType("System.String")) + dtMLot.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtMLot.Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dtMLot.Columns.Add("UseQty", System.Type.GetType("System.Decimal")) + dtMLot.Columns.Add("SubstituteMaterialNo", System.Type.GetType("System.String")) '新增一替代料欄位,2010/03/26,by yumei + dtMLot.Columns.Add("SubstituteMaterialLevel", System.Type.GetType("System.Int16")) '新增一替代料位階欄位,2013/01/08,by Kevin + dtMLot.Columns.Add("SubstituteMaterialType", System.Type.GetType("System.String")) '新增一替代料類型欄位,2013/01/08,by Kevin + dtMLot.Columns.Add("SubstituteStdQty", System.Type.GetType("System.Decimal")) '新增一替代料標準用量欄位,2013/01/08,by Kevin + dtMLot.Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) '新增一替代料是否檢查批號欄位,2013/01/08,by Kevin + dtMLot.Columns.Add("AccDate", System.Type.GetType("System.DateTime")) '新增回溫時間, 只有設備上料會有值 + + '建立Relation + dsWIP.Tables.Add(dtMLot) + + Dim parentColFI(0) As DataColumn + Dim childColFI(0) As DataColumn + + parentColFI(0) = dsWIP.Tables(tblTMaterial).Columns("MaterialNo") + childColFI(0) = dsWIP.Tables(dtMLot.TableName).Columns("MaterialNo") + + '建立主從關係(RelationName會影響WinForm資料的顯示) + Dim tmpRe1 As DataRelation + tmpRe1 = New DataRelation("MaterialLot", parentColFI, childColFI, False) + dsWIP.Relations.Add(tmpRe1) + '获取当前工单的物料清单 新设备上料14278 + Call funLoadMOMaterialList(dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString, dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString) + ' 2016/10/20 YF, 取得上料資訊 + GetFeedingData() + End If + + 'Binding + iugMaterial.iMESUltraGrid.DataSource = dsWIP.Tables(tblTMaterial) + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_Material = 0 + + + End Function + + Private Function funLoadTemp_MaterialLot() As Integer + + Dim drSel As DataRow() + + funLoadTemp_MaterialLot = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadTemp_MaterialLot", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblTMaterialLot = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadtemp_materiallot").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_materiallot").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadtemp_materiallot").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + dsWIP.Tables(tblTMaterialLot).Columns.Add("MainMaterialNo", System.Type.GetType("System.String")) 'BOM中的主料號 + dsWIP.Tables(tblTMaterialLot).Columns.Add("SubstituteMaterialLevel", System.Type.GetType("System.Int16")) '新增一替代料位階欄位,2013/01/08,by Kevin + dsWIP.Tables(tblTMaterialLot).Columns.Add("SubstituteMaterialType", System.Type.GetType("System.String")) '新增一替代料類型欄位,2013/01/08,by Kevin + dsWIP.Tables(tblTMaterialLot).Columns.Add("SubstituteStdQty", System.Type.GetType("System.Decimal")) '新增一替代料標準用量欄位,2013/01/08,by Kevin + dsWIP.Tables(tblTMaterialLot).Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) '新增一替代料是否檢查批號欄位,2013/01/08,by Kevin + dsWIP.Tables(tblTMaterialLot).Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dsWIP.Tables(tblTMaterialLot).Columns.Add("MFGDate", System.Type.GetType("System.DateTime")) + dsWIP.Tables(tblTMaterialLot).Columns.Add("ExpireDate", System.Type.GetType("System.DateTime")) + dsWIP.Tables(tblTMaterialLot).Columns.Add("InputDate", System.Type.GetType("System.DateTime")) + + For Each drTLot As DataRow In dsWIP.Tables(tblTMaterialLot).Rows + drSel = dtAllMTLLot.Select("SubstituteMaterialNo = '" & drTLot("MaterialNo") & "' And MaterialLotNo = '" & drTLot("MaterialLotNo") & "'") + If drSel.Length > 0 Then + drTLot.BeginEdit() + drTLot("MainMaterialNo") = drSel(0)("MaterialNo") + drTLot("SubstituteMaterialLevel") = drSel(0)("SubstituteMaterialLevel") + drTLot("SubstituteMaterialType") = drSel(0)("SubstituteMaterialType") + drTLot("SubstituteStdQty") = drSel(0)("SubstituteStdQty") + drTLot("CheckLotNo") = drSel(0)("CheckLotNo") + drTLot("Qty") = drSel(0)("Qty") + drTLot("MFGDate") = drSel(0)("MFGDate") + drTLot("ExpireDate") = drSel(0)("ExpireDate") + drTLot("InputDate") = drSel(0)("InputDate") + drTLot.EndEdit() + Else + '已不存在庫存中 + End If + Next + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadTemp_MaterialLot = 0 + + + End Function + + + Private Function funGetShift() As Integer + + funGetShift = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("userno", "UserNo", "String", UserId, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsUSR.GetShift", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出ShiftNo + If XmlDoc.GetElementsByTagName("shiftno").Item(0).SelectNodes("value").Count > 0 Then + txtShiftNo.Text = XmlDoc.DocumentElement.GetElementsByTagName("shiftno").Item(0).SelectNodes("value").Item(0).InnerText + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funGetShift = 0 + + End Function + + Private Function funGetOPDescription() As Integer + + funGetOPDescription = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.GetLotOPDescription", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + If XmlDoc.GetElementsByTagName("opdescription").Count > 0 Then + If XmlDoc.GetElementsByTagName("opdescription").Item(0).SelectNodes("value").Count > 0 Then + txtOPDescription.Text = XmlDoc.DocumentElement.GetElementsByTagName("opdescription").Item(0).SelectNodes("value").Item(0).InnerText + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funGetOPDescription = 0 + + End Function + + Private Function funLoadOPError() As Integer + + funLoadOPError = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + '將OPNo加上CInput轉換特殊字元,2010/04/08,by yumei + strParameter = CombineXMLParameter("opno", "OPNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsOP.LoadOPErrorJoinBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblOPError = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadoperrorjoinbasis").Item(0).SelectNodes("name").Item(0).InnerXml + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadoperrorjoinbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadoperrorjoinbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + '將不使用的資料移除 + Dim i As Integer + For i = dsWIP.Tables(tblOPError).Columns.Count - 1 To 0 Step -1 + If dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper <> "ERRORNO" AndAlso + dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper <> "REASONNAME" AndAlso + dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper <> "REASONLEVEL" AndAlso + dsWIP.Tables(tblOPError).Columns(i).ColumnName.ToUpper <> "REASONTYPE" Then + dsWIP.Tables(tblOPError).Columns.Remove(dsWIP.Tables(tblOPError).Columns(i)) + End If + Next + + '加入CheckFlag,ErrorQty欄位. + Dim colCheck As New DataColumn + colCheck.ColumnName = "CheckFlag" + colCheck.DataType = System.Type.GetType("System.Boolean") + colCheck.DefaultValue = False + colCheck.AllowDBNull = False + dsWIP.Tables(tblOPError).Columns.Add(colCheck) + + Dim colQty As New DataColumn + colQty.ColumnName = "ErrorQty" + colQty.DataType = System.Type.GetType("System.Decimal") + colQty.DefaultValue = 0 + colQty.AllowDBNull = False + dsWIP.Tables(tblOPError).Columns.Add(colQty) + + Call funAddValueList_Error() + + 'Binding + iugError.iMESUltraGrid.DataSource = dsWIP.Tables(tblOPError) + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + Finally + End Try + + funLoadOPError = 0 + + + End Function + + Private Function funLoadSubstituteMaterial_Main(ByVal strMaterialNo As String, + ByVal strUnitNo As String) As Integer + funLoadSubstituteMaterial_Main = -1 + + If Not IsNothing(dsWIP.Tables(tblSubstituteMaterial)) Then + dsWIP.Tables.Remove(tblSubstituteMaterial) + End If + + Dim XmlDoc As New XmlDocument + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(strMaterialNo), "") + strParameter += CombineXMLParameter("unitno", "UnitNo", "String", CInput(strUnitNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.LoadSubstituteMaterial_Main", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSubstituteMaterial = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadsubstitutematerial_main").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadsubstitutematerial_main").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadsubstitutematerial_main").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadSubstituteMaterial_Main = 0 + End Function + + '2019/01/19 Eric + Private Sub funLoadParameter(ByVal ParameterNo As String) + + If Not dsWIP.Tables(tblParameter) Is Nothing Then + dsWIP.Tables.Remove(tblParameter) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("parameterno", "ParameterNo", "String", CInput(ParameterNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsSYS.LoadParameter", InXml) + + Dim XmlDoc As New XmlDocument '//處理Xml字串之物件 + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblParameter = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadparameter").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If dsWIP.Tables(tblParameter).Rows.Count > 0 Then + strEnableSWR_CICO = dsWIP.Tables(tblParameter).Rows(0)("ParameterValue").ToString + Else + strEnableSWR_CICO = "0" + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load OP Error define relative data Failed!! , " & e1.Message) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + End Try + + End Sub + + + '2019/10/17 Grace 查詢作業站資料 + Private Sub funLoadOPBasis(ByVal OPNo As String) + + If Not IsNothing(dsTemp.Tables(tblOPBasis)) Then + dsTemp.Tables.Remove(tblOPBasis) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("opno", "OPNo", "String", CInput(OPNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Dim XmlDoc As New XmlDocument + + Try + ' 2016 YF, Using wsOP As New wsOP.wsOP + ' 2016 YF, wsOP.Url = LocalizeWebService(wsOP.Url.ToString) + ' 2016 YF, wsOP.EnableDecompression = True + ' 2016 YF, OutXml = wsOP.LoadOPBasis(InXml) + OutXml = InvokeSrv("wsOP.LoadOPBasis", InXml) + + ' 2016 YF, End Using + + '利用XmlDoc物件處理ReturnValue + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '//取出 Tablename + tblOPBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadopbasis").Item(0).SelectNodes("name").Item(0).InnerXml + '//取出 Table Schma + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadopbasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '//取出Attrib Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadopbasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + End Sub +#End Region + +#Region "--- Others ---" + + Private Function funInitialize() + + iugAttrib.iMESUltraGrid.Text = "Attrib" + iugAttrib.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugAttrib.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugAttrib.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugAttrib.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugAttrib.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + '20240119 By 21681 客制 + iugKzxx.iMESUltraGrid.Text = "Kzxx" + iugKzxx.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugKzxx.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugKzxx.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugKzxx.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugKzxx.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + iugEquipment.iMESUltraGrid.Text = "Equipment" + iugEquipment.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugEquipment.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugEquipment.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugEquipment.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugEquipment.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + + iugMaterial.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugMaterial.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugMaterial.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugMaterial.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugMaterial.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + iugMaterial.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + '只有子階有資料時,才有+號. + iugMaterial.iMESUltraGrid.DisplayLayout.Override.ExpansionIndicator = ShowExpansionIndicator.CheckOnDisplay + '當子階有資料時,+號自動展開. + iugMaterial.iMESUltraGrid.Rows.ExpandAll(True) + + iugKeyIn.iMESUltraGrid.Text = "Key In" + iugKeyIn.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugKeyIn.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugKeyIn.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugKeyIn.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugKeyIn.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + iugKeyIn.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + + iugError.iMESUltraGrid.DisplayLayout.GroupByBox.Hidden = True + iugError.iMESUltraGrid.DisplayLayout.MaxColScrollRegions = 1 + iugError.iMESUltraGrid.DisplayLayout.MaxRowScrollRegions = 1 + iugError.iMESUltraGrid.ContextMenuStrip.Items.Clear() + iugError.iMESUltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Drawing.Color.Gainsboro + iugError.iMESUltraGrid.UpdateMode = Infragistics.Win.UltraWinGrid.UpdateMode.OnCellChangeOrLostFocus + + SBar1.Panels(0).Text = "UserNo:" & UserId + SBar1.Panels(3).Text = Format(Now, "yyyy/MM/dd H:mm:ss") + + txtPriority.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + txtCurQty.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + txtSysQty.Appearance.TextHAlign = Infragistics.Win.HAlign.Right + + btnConfirm.Enabled = True + 'btnMultiUser.Enabled = True + + ' 2016/12/26 YF, 依系統參數是否啟動多人加工來決定是否顯示"作業人員"按鈕 + Me.btnOperator.Visible = Val(funGetParameter("SysInfo", "MultiOperator")) + + '2019/10/17 Grace 依系統參數是否啟動多人加工, 且多人加工模式為生產批, 來決定是否顯示"多人加工"按鈕 + btnMultiUser.Visible = False + btnMultiUser.Enabled = False + + If Val(funGetParameter("SysInfo", "MultiOperator")) Then + Call funLoadOPBasis(txtOPNo.Text) + If Not IsNothing(dsTemp.Tables(tblOPBasis)) Then + If dsTemp.Tables(tblOPBasis).Rows.Count > 0 Then + If dsTemp.Tables(tblOPBasis).Rows(0)("MultiOperatorMode").ToString = "5" Then + btnMultiUser.Visible = True + btnMultiUser.Enabled = True + End If + End If + End If + End If + + End Function + + Private Function funLotInfo_Show() + + RevLotSerial = dsWIP.Tables(tblLotState).Rows(0)("LotSerial") + RevLotStamp = dsWIP.Tables(tblLotState).Rows(0)("LotStamp") + + txtCurQty.Text = Format(dsWIP.Tables(tblLotState).Rows(0)("CurQty"), "0.####") + txtCurUnitNo.Text = dsWIP.Tables(tblLotState).Rows(0)("CurUnitNo").ToString + txtSysQty.Text = Format(dsWIP.Tables(tblLotState).Rows(0)("SysQty"), "0.####") + txtSysUnitNo.Text = dsWIP.Tables(tblLotState).Rows(0)("SysUnitNo").ToString + txtOPNo.Text = dsWIP.Tables(tblLotState).Rows(0)("OPNo").ToString + txtOPName.Text = dsWIP.Tables(tblLotState).Rows(0)("OPName").ToString + txtAreaNo.Text = dsWIP.Tables(tblLotState).Rows(0)("AreaNo").ToString + txtProductNo.Text = dsWIP.Tables(tblLotState).Rows(0)("ProductNo").ToString + PhaseNo = dsWIP.Tables(tblLotState).Rows(0)("PhaseNo") + + txtPriority.Text = dsWIP.Tables(tblLotState).Rows(0)("Priority") + If dsWIP.Tables(tblLotState).Rows(0)("Priority") = 1 Then + txtPriority.BackColor = System.Drawing.Color.Red + ElseIf dsWIP.Tables(tblLotState).Rows(0)("Priority") = 2 Then + txtPriority.BackColor = System.Drawing.Color.Yellow + ElseIf dsWIP.Tables(tblLotState).Rows(0)("Priority") = 3 Then + txtPriority.BackColor = System.Drawing.Color.LimeGreen + End If + txtMONo.Text = dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString + txtCustomerLotNo.Text = dsWIP.Tables(tblLotState).Rows(0)("CustomerLotNo").ToString + + End Function + + Private Sub funAddValueList_Attrib() + + iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists.Add("ASource") + With iugAttrib.iMESUltraGrid.DisplayLayout.ValueLists("ASource").ValueListItems + .Clear() + .Add(0, "KeyIn") + .Add(1, "Calculate") + .Add(2, "System") + .Add(3, "Setup") + End With + + End Sub + + Private Sub gbxError_Enter(sender As Object, e As EventArgs) Handles gbxError.Enter + + End Sub + + Private Sub funAddValueList_Error() + + iugError.iMESUltraGrid.DisplayLayout.ValueLists.Add("AReasonType") + With iugError.iMESUltraGrid.DisplayLayout.ValueLists("AReasonType").ValueListItems + .Clear() + .Add(0, "Scrap") + .Add(1, "Defect") + End With + + + End Sub + + Private Function funGetSampleData() + + Cursor.Current = Cursors.WaitCursor + + '轉換抽樣參數 + Dim strAQLType, strAQL, strQCLevel, strTemp As String + + If dsWIP.Tables(tblTAttrib) Is Nothing Then Exit Function + + Dim drSel() As DataRow + '若已轉換,不再轉 + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'SampleQty'") + If drSel.Length > 0 Then + If Not IsDBNull(drSel(0)("AttribValue")) Then + If drSel(0)("AttribValue") <> "" Then + Exit Function + End If + End If + End If + + 'AQLType + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AQLType'") + If drSel.Length > 0 Then + strAQLType = drSel(0)("AttribValue") + Else + strAQLType = defString + End If + 'AQL + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AQL'") + If drSel.Length > 0 Then + strAQL = drSel(0)("AttribValue") + Else + strAQL = defString + End If + 'QCLevel + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'QCLevel'") + If drSel.Length > 0 Then + strQCLevel = drSel(0)("AttribValue") + Else + strQCLevel = defString + End If + + drSel = Nothing + + If strAQLType = defString Or strAQL = defString Or strQCLevel = defString Then Exit Function + + '取出抽樣數 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("aqltype", "AQLType", "String", strAQLType, "") + strParameter += CombineXMLParameter("qty", "QTY", "Decimal", dsWIP.Tables(tblLotState).Rows(0)("CurQty"), "") + strParameter += CombineXMLParameter("qclevel", "QCLevel", "String", strQCLevel, "") + strParameter += CombineXMLParameter("aql", "AQL", "String", strAQL, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + Try + OutXml = InvokeSrv("wsQC.GetAQLQty", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + 'SampleQty + If XmlDoc.GetElementsByTagName("sampleqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("sampleqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'SampleQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%SampleQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + 'AcceptQty + If XmlDoc.GetElementsByTagName("acceptqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("acceptqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'AcceptQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%AcceptQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + 'RejectQty + If XmlDoc.GetElementsByTagName("rejectqty").Item(0).SelectNodes("value").Count > 0 Then + strTemp = XmlDoc.DocumentElement.GetElementsByTagName("rejectqty").Item(0).SelectNodes("value").Item(0).InnerText + If IsNumeric(strTemp) Then + drSel = dsWIP.Tables(tblTAttrib).Select("AttribNo = 'RejectQty'") + If drSel.Length > 0 Then + drSel(0).BeginEdit() + drSel(0)("AttribValue") = strTemp + drSel(0).EndEdit() + End If + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", "[%RejectQty%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + Cursor.Current = Cursors.Default + + + End Function + + Private Function funLoadSYSParameter() As Integer + + funLoadSYSParameter = -1 + + '先判斷是否dataset中已有此datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblSYSParameter)) Then + dsWIP.Tables.Remove(tblSYSParameter) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + InXml = CombineXMLRequest(strIdentity, "") + + Try + Dim XmlDoc As New XmlDocument + OutXml = InvokeSrv("wsSYS.LoadParameter", InXml) + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSYSParameter = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadparameter").Item(0).SelectNodes("name").Item(0).InnerXml + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadparameter").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funLoadSYSParameter = 0 + + End Function + + Private Sub funLoadProduct(Optional UnionProductNo As String = defString, Optional blnIssueState As Boolean = True) + + '先判斷是否dataset中已有此datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblProductBasis)) Then + dsWIP.Tables.Remove(tblProductBasis) + End If + + '組InXml的字串 + strParameter = "" + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + If blnIssueState Then + strParameter = CombineXMLParameter("issuestate", "IssueState", "Integer", 2, "") + End If + If UnionProductNo <> defString Then + strParameter = CombineXMLParameter("productno", "ProductNo", "String", UnionProductNo, "") + End If + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsPRD.LoadProduct(InXml) + If blnIssueState = False Then + OutXml = InvokeSrv("wsPRD.LoadCusProduct", InXml) + Else + OutXml = InvokeSrv("wsPRD.LoadProduct", InXml) + End If + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblProductBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadproduct").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadproduct").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadproduct").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + 'MsgBox("Unexpected Error. Load System Parameter failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + Private Sub funLoadOEMOBasis() + + '先判斷是否dataset中已有此datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsWIP.Tables(tblOEMOBasis)) Then + dsWIP.Tables.Remove(tblOEMOBasis) + End If + + '組InXml的字串 + strParameter = "" + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("issuestate", "IssueState", "Integer", 2, "") + strParameter = CombineXMLParameter("mono", "MONO", "String", CInput(txtMONo.Text), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsPRD.LoadProduct(InXml) + OutXml = InvokeSrv("wsOE.LoadMOBasis", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblOEMOBasis = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmobasis").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmobasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmobasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + 'MsgBox("Unexpected Error. Load System Parameter failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + Private Sub btnBinAssign_Click(sender As Object, e As EventArgs) Handles btnBinStateAdjust.Click + + Dim fBinStateAdjust As New frmBinStateAdjust + fBinStateAdjust.LotNo = LotNo + fBinStateAdjust.dvSysBin = dvSysBin + fBinStateAdjust.dtGoodBin = dsWIP.Tables(strBinState) + fBinStateAdjust.dtBinNew = dtBinNew + fBinStateAdjust.ShowDialog(Me) + fBinStateAdjust.Dispose() + If gReturnKeyValue <> "" Then + If dtBinNew.Rows.Count > 0 Then + Dim NewBinQty_Sun As Integer = 0 + For Each drTemp As DataRow In dsWIP.Tables(strSysBin).Rows + NewBinQty_Sun += CInt(dtBinNew.Rows(0)(drTemp("BinNo").ToString)) + Next + Dim drSel As DataRow() + drSel = dtKeyIn.Select("AttribNo = 'GoodQty'") + If drSel.Length > 0 Then + drSel(0)("AttribValue") = NewBinQty_Sun + dtKeyIn.AcceptChanges() + End If + End If + End If + End Sub + Private Function funCombineTTInXml(ByVal FromProductNo As String) + + Dim code As String = String.Empty + Dim sqlcode As String = String.Empty + Dim description As String = String.Empty + Dim strAccess As String = String.Empty + Dim strParameter As String = String.Empty + Dim strMaster As String = String.Empty + Dim strDetail As String = String.Empty + + Dim strTempField As String = String.Empty + Dim strTempRecord As String = String.Empty + Dim XmlDoc As New XmlDocument() + Dim dtUnionProduct As DataTable + Dim arriveTime As DateTime = Now + + '---- InXml ----- + ' + '2011/12/05 Aaron, 增加系統變數TPERPUseMESUserNo,設定是否使用MES帳號或是tiptop內建帳號進行單據拋送 + + Try + If funGetParameter("SysInfo", "TPERPUseMESUserNo") = 1 Then + strAccess = cbXMLAccess_TP(gUserNo) + Else + strAccess = cbXMLAccess_TP() + End If + + ' + strTempField = cbXMLField_TP("condition", "ima01 LIKE '" & FromProductNo & "%'") + 'strTempField += cbXMLField_TP("vdate", Format(dsWIP.Tables(tbllotbasis).Rows(0)("CreateDate"), "yyyy/MM/dd")) + strTempField += cbXMLField_TP("vdate", "") + strTempRecord = cbXMLRecord_TP(strTempField) + + ' + strTempRecord = cbXMLRecord_TP(strTempField) + strParameter = cbXMLParameter_TP(strTempRecord) + + InXml = cbXMLRequest_TP(strAccess, strParameter, strMaster, strDetail) + + '----- Call ERP Web Service ----- + Using ws As New COM_ERP.wsERP_TT.TIPTOPServiceGateWay + ws.Url = gERPWSURL + OutXml = ws.GetJointProductData(InXml) + End Using + + XmlDoc.LoadXml(OutXml) + + '----- 取得ERP執行結果 code, sqlcode, description ----- + chkExecutionStatus_TP(XmlDoc, code, sqlcode, description) + + If code <> "0" Then + If description <> String.Empty Then + 'MsgBox(description, , "ERP Return Message") + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Return Message%]" & vbCrLf & description), MsgBoxStyle.Exclamation, Me.Text) + Else + 'MsgBox("ERP Fail !") + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Fail%]"), MsgBoxStyle.Exclamation, Me.Text) + + End If + Exit Function + End If + + '取得ERP回傳之聯產品資訊 + dtUnionProduct = getResponseContentDetail_TP(XmlDoc) + + '開窗給使用者選擇 + Cursor.Current = Cursors.WaitCursor + + If dtUnionProduct.DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP DID NOT RETURN THE JOINT PRODUCT INFORMATION%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dtUnionProduct.DefaultView + fSearch.strFindColumnName = "UnionProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Function + + '檢查聯產品資料是否存在系統中以及是否有版本資訊 + funLoadProduct(drSearch("UnionProductNo").ToString.ToUpper, False) + + If dsWIP.Tables(tblProductBasis).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("IssueState") <> 2 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%EDATA%][%Unfrozen%] "), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString <> dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%NOTHINGSTATE%][%CURVERSION%][%PRODUCTINFO%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + txtUnionProductNo.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductNo").ToString + txtUnionProductVersion.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString + txtUnionProductUnit.Text = dsWIP.Tables(tblProductBasis).Rows(0)("UnitNo").ToString + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + End If + + Cursor.Current = Cursors.Default + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + + '紀錄TransactionLog + addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "GetJointProductData", My.Computer.Name, gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "CreateStockInData", LogClass:="WIP") + End Try + + End Function + Private Function funCombineTTICDInXml(ByVal FromProductNo As String) + + Dim code As String = String.Empty + Dim sqlcode As String = String.Empty + Dim description As String = String.Empty + Dim strAccess As String = String.Empty + Dim strParameter As String = String.Empty + Dim strMaster As String = String.Empty + Dim strDetail As String = String.Empty + + Dim strTempField As String = String.Empty + Dim strTempRecord As String = String.Empty + Dim XmlDoc As New XmlDocument() + Dim dtUnionProduct As DataTable + Dim arriveTime As DateTime = Now + + '---- InXml ----- + ' + '2011/12/05 Aaron, 增加系統變數TPERPUseMESUserNo,設定是否使用MES帳號或是tiptopicd內建帳號進行單據拋送 + + Try + If funGetParameter("SysInfo", "TPERPUseMESUserNo") = 1 Then + strAccess = cbXMLAccess_TTICD(gUserNo) + Else + strAccess = cbXMLAccess_TTICD() + End If + + ' + strTempField = cbXMLField_TTICD("condition", "ima01 LIKE '" & FromProductNo & "%'") + 'strTempField += cbXMLField_TTICD("vdate", Format(dsWIP.Tables(tbllotbasis).Rows(0)("CreateDate"), "yyyy/MM/dd")) + strTempField += cbXMLField_TTICD("vdate", "") + strTempRecord = cbXMLRecord_TTICD(strTempField) + + ' + strTempRecord = cbXMLRecord_TTICD(strTempField) + strParameter = cbXMLParameter_TTICD(strTempRecord) + + InXml = cbXMLRequest_TTICD(strAccess, strParameter, strMaster, strDetail) + + '----- Call ERP Web Service ----- + Using ws As New COM_ERP.wsERP_TT.TIPTOPServiceGateWay + ws.Url = gERPWSURL + OutXml = ws.GetJointProductData(InXml) + End Using + + XmlDoc.LoadXml(OutXml) + + '----- 取得ERP執行結果 code, sqlcode, description ----- + chkExecutionStatus_TTICD(XmlDoc, code, sqlcode, description) + + If code <> "0" Then + If description <> String.Empty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Return Message%]" & vbCrLf & description), MsgBoxStyle.Exclamation, Me.Text) + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Fail%]"), MsgBoxStyle.Exclamation, Me.Text) + End If + Exit Function + End If + + '取得ERP回傳之聯產品資訊 + dtUnionProduct = getResponseContentDetail_TTICD(XmlDoc) + + '開窗給使用者選擇 + Cursor.Current = Cursors.WaitCursor + + If dtUnionProduct.DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP DID NOT RETURN THE JOINT PRODUCT INFORMATION%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dtUnionProduct.DefaultView + fSearch.strFindColumnName = "UnionProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Function + + '檢查聯產品資料是否存在系統中以及是否有版本資訊 + funLoadProduct(drSearch("UnionProductNo").ToString.ToUpper, False) + + If dsWIP.Tables(tblProductBasis).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("IssueState") <> 2 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%EDATA%][%Unfrozen%] "), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString <> dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%NOTHINGSTATE%][%CURVERSION%][%PRODUCTINFO%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + txtUnionProductNo.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductNo").ToString + txtUnionProductVersion.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString + txtUnionProductUnit.Text = dsWIP.Tables(tblProductBasis).Rows(0)("UnitNo").ToString + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + End If + + Cursor.Current = Cursors.Default + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + + '紀錄TransactionLog + addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "GetJointProductData", My.Computer.Name, gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "CreateStockInData", LogClass:="WIP") + End Try + + End Function + Structure MethodNames + ''' 檢查物料數量 + Const funCheckMTLQuantity = "funCheckMTLQuantity" + ''' 膠類時效卡控 + Const funCheckMTLGumDefrostHour = "funCheckMTLGumDefrostHour" + End Structure + Private Function funCheckMTLForBR(ByVal dtMaterialLot As DataTable, + ByRef strLinkName As String, ByRef intERFType As Int16, ByRef strRuleNo As String) As Boolean + + funOrganizeDtMaterialLot(LotNo, dtMaterialLot) + dtMaterialLot.DefaultView.RowFilter = "Qty>0" + dtMaterialLot = dtMaterialLot.DefaultView.ToTable() + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter &= CombineXMLParameter("checkin", "CheckIn", "Boolean", CInput(False), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP_Material.CheckMTLForBR", InXml, dtMaterialLot.Copy) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If Not ChkExecutionSuccess(XmlDoc) Then + '找出Exception訊並顯示出來 + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Return False + End If + + Dim xmlList As XmlNodeList = XmlDoc.GetElementsByTagName("message") + If xmlList.Count > 0 Then + xmlList = xmlList(0).SelectNodes("note") + If xmlList.Count > 0 Then + For Each xmlNode As XmlNode In xmlList + If funProcessMessages(xmlNode, strLinkName, intERFType, strRuleNo) = False Then Return False + Next + End If + End If + + Return True + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Return False + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Return False + End Try + + End Function + Private Function funProcessMessages(ByVal xmlNode As XmlNode, + ByRef strLinkName As String, ByRef intERFType As Int16, ByRef strRuleNo As String) As Boolean + + Dim MCode, MType, MMsg As String + MCode = xmlNode.SelectNodes("mcode").Item(0).InnerText + MType = xmlNode.SelectNodes("mtype").Item(0).InnerText + MMsg = xmlNode.SelectNodes("mmsg").Item(0).InnerText + + Dim methodName As String = "" + If MMsg.Contains("{") AndAlso MMsg.Contains("}") Then + Dim intStart As Int16 = MMsg.IndexOf("{") + Dim intEnd As Int16 = MMsg.IndexOf("}") + methodName = MMsg.Substring(intStart + 1, intEnd - intStart - 1) + MMsg = MMsg.Substring(intEnd + 1, MMsg.Length - intEnd - 1) + End If + + Select Case methodName + Case MethodNames.funCheckMTLQuantity + If ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-100601", MMsg), MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.No Then + Return False + End If + + Case MethodNames.funCheckMTLGumDefrostHour + strLinkName = "HOLD" + intERFType = 0 'BR Hold + MMsg = ChgTranslateErrorMsg(MMsg) + MMsg = MMsg.TrimStart(New Char() {vbCr, vbLf}) + If strRuleNo = defString Then + strRuleNo = MMsg + Else + strRuleNo &= (vbCrLf & MMsg) + End If + + Case Else + ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg(MCode, MMsg), MsgBoxStyle.Exclamation, Me.Text) + Return False + End Select + + Return True + + End Function + Sub funOrganizeDtMaterialLot(ByVal LotNo As String, ByVal dtMaterialLot As DataTable) + + For i = dtMaterialLot.Columns.Count - 1 To 0 Step -1 + Dim dc As DataColumn = dtMaterialLot.Columns(i) + Select Case dc.ColumnName + Case "EquipmentNo", "MaterialNo", "SubstituteMaterialNo", "MaterialLotNo", "UseQty" + Case Else + dtMaterialLot.Columns.RemoveAt(i) + End Select + Next + + If Not dtMaterialLot.Columns.Contains("LotNo") Then dtMaterialLot.Columns.Add("LotNo", GetType(String)) + dtMaterialLot.Columns("MaterialNo").ColumnName = "OrgMaterialNo" + dtMaterialLot.Columns("SubstituteMaterialNo").ColumnName = "MaterialNo" + dtMaterialLot.Columns("UseQty").ColumnName = "Qty" + + For Each dr As DataRow In dtMaterialLot.Rows + dr("LotNo") = LotNo + Next + + End Sub + '2019/07/12 Eric + Private Function funCombineT100InXml(ByVal FromProductNo As String, ByVal MONo As String) + + Dim code As String = String.Empty + Dim sqlcode As String = String.Empty + Dim description As String = String.Empty + + Dim XmlDoc As New XmlDocument() + Dim dtUnionProduct As DataTable + Dim arriveTime As DateTime = Now + + Try + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("ProductNo", "ProductNo", "String", FromProductNo, "") + strParameter += CombineXMLParameter("mono", "MONo", "String", MONo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsERP_T100.ERP_Joint_Product_Get", InXml) + + XmlDoc.LoadXml(OutXml) + + code = XmlDoc.GetElementsByTagName("execution").Item(0).SelectNodes("status").Item(0).Attributes("code").Value + description = XmlDoc.GetElementsByTagName("execution").Item(0).SelectNodes("status").Item(0).Attributes("description").Value + If code <> "0" Then + If description <> String.Empty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Return Message%]" & vbCrLf & description), MsgBoxStyle.Exclamation, Me.Text) + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Fail%]"), MsgBoxStyle.Exclamation, Me.Text) + End If + Exit Function + End If + + Dim dtUProduct As New DataTable("UnionProductData") + dtUProduct = New DataTable("UnionProductData") + dtUProduct.DefaultView.AllowNew = False + dtUProduct.DefaultView.AllowDelete = False + dtUProduct.DefaultView.AllowEdit = True + '建立UnionProductData Table的欄位 + dtUProduct.Columns.Add("UnionProductNo", System.Type.GetType("System.String")) + dtUProduct.Columns.Add("UnionProductUnit", System.Type.GetType("System.String")) + + Dim drPRD As DataRow + Dim item_no As String + Dim unit_no As String + Dim iCount As Integer = XmlDoc.GetElementsByTagName("row").Count - 1 + + For i As Integer = 1 To iCount + item_no = XmlDoc.DocumentElement.GetElementsByTagName("row").Item(i).SelectNodes("field").Item(0).InnerXml + unit_no = XmlDoc.DocumentElement.GetElementsByTagName("row").Item(i).SelectNodes("field").Item(1).InnerXml + drPRD = dtUProduct.NewRow() + drPRD("UnionProductNo") = item_no + drPRD("UnionProductUnit") = unit_no + dtUProduct.Rows.Add(drPRD) + Next + + '取得ERP回傳之聯產品資訊 + dtUnionProduct = dtUProduct + + If dtUnionProduct.DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP DID NOT RETURN THE JOINT PRODUCT INFORMATION%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + + '開窗給使用者選擇 + Cursor.Current = Cursors.WaitCursor + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dtUnionProduct.DefaultView + fSearch.strFindColumnName = "UnionProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Function + + '檢查聯產品資料是否存在系統中以及是否有版本資訊 + funLoadProduct(drSearch("UnionProductNo").ToString.ToUpper, False) + + If dsWIP.Tables(tblProductBasis).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("IssueState") <> 2 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%EDATA%][%Unfrozen%] "), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString <> dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%NOTHINGSTATE%][%CURVERSION%][%PRODUCTINFO%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + txtUnionProductNo.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductNo").ToString + txtUnionProductVersion.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString + txtUnionProductUnit.Text = dsWIP.Tables(tblProductBasis).Rows(0)("UnitNo").ToString + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + End If + + Cursor.Current = Cursors.Default + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + + '紀錄TransactionLog + addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "ERP_Joint_Product_Get", My.Computer.Name, gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "ERP_Joint_Product_Get", LogClass:="WIP") + End Try + + End Function + + '87580: [605]iMES與E10整合_第一階段_SDD210205_01-09取得E10聯產品資料 + Private Function funCombineE10ICDInXml(ByVal FromProductNo As String, ByVal MONo As String) + + Dim code As String = String.Empty + Dim sqlcode As String = String.Empty + Dim description As String = String.Empty + + Dim XmlDoc As New XmlDocument() + Dim dtUnionProduct As DataTable + Dim arriveTime As DateTime = Now + + Try + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("ProductNo", "ProductNo", "String", FromProductNo, "") + strParameter += CombineXMLParameter("mono", "MONo", "String", MONo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsERP_E10ICD.ERP_Joint_Product_Get", InXml) + + XmlDoc.LoadXml(OutXml) + + code = XmlDoc.GetElementsByTagName("execution").Item(0).SelectNodes("status").Item(0).Attributes("code").Value + description = XmlDoc.GetElementsByTagName("execution").Item(0).SelectNodes("status").Item(0).Attributes("description").Value + If code <> "0" Then + If description <> String.Empty Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Return Message%]" & vbCrLf & description), MsgBoxStyle.Exclamation, Me.Text) + Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP Fail%]"), MsgBoxStyle.Exclamation, Me.Text) + End If + Exit Function + End If + + Dim dtUProduct As New DataTable("UnionProductData") + dtUProduct = New DataTable("UnionProductData") + dtUProduct.DefaultView.AllowNew = False + dtUProduct.DefaultView.AllowDelete = False + dtUProduct.DefaultView.AllowEdit = True + '建立UnionProductData Table的欄位 + dtUProduct.Columns.Add("UnionProductNo", System.Type.GetType("System.String")) + dtUProduct.Columns.Add("UnionProductUnit", System.Type.GetType("System.String")) + + Dim drPRD As DataRow + Dim item_no As String + Dim unit_no As String + Dim iCount As Integer = XmlDoc.GetElementsByTagName("row").Count - 1 + + For i As Integer = 1 To iCount + item_no = XmlDoc.DocumentElement.GetElementsByTagName("row").Item(i).SelectNodes("field").Item(0).InnerXml + unit_no = XmlDoc.DocumentElement.GetElementsByTagName("row").Item(i).SelectNodes("field").Item(1).InnerXml + drPRD = dtUProduct.NewRow() + drPRD("UnionProductNo") = item_no + drPRD("UnionProductUnit") = unit_no + dtUProduct.Rows.Add(drPRD) + Next + + '取得ERP回傳之聯產品資訊 + dtUnionProduct = dtUProduct + + If dtUnionProduct.DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ERP DID NOT RETURN THE JOINT PRODUCT INFORMATION%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + End If + + '開窗給使用者選擇 + Cursor.Current = Cursors.WaitCursor + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dtUnionProduct.DefaultView + fSearch.strFindColumnName = "UnionProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Function + + '檢查聯產品資料是否存在系統中以及是否有版本資訊 + funLoadProduct(drSearch("UnionProductNo").ToString.ToUpper, False) + + If dsWIP.Tables(tblProductBasis).Rows.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & ""), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("IssueState") <> 2 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%EDATA%][%Unfrozen%] "), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + ElseIf dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString <> dsWIP.Tables(tbllotbasis).Rows(0)("ProductVersion").ToString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-202106", "[%ProductNo%] : " & drSearch("UnionProductNo").ToString & " [%NOTHINGSTATE%][%CURVERSION%][%PRODUCTINFO%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Function + Else + txtUnionProductNo.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductNo").ToString + txtUnionProductVersion.Text = dsWIP.Tables(tblProductBasis).Rows(0)("ProductVersion").ToString + txtUnionProductUnit.Text = dsWIP.Tables(tblProductBasis).Rows(0)("UnitNo").ToString + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + End If + + Cursor.Current = Cursors.Default + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + + '紀錄TransactionLog + addTransactionLog_ErrorCode(InXml, OutXml, arriveTime.ToString("yyyyMMddHHmmssss"), "WIP", "ERP_Joint_Product_Get", My.Computer.Name, gUserNo, arriveTime.ToString("yyyy/MM/dd HH:mm:ss"), code, "", "ERP_Joint_Product_Get", LogClass:="WIP") + End Try + + End Function + + +#End Region + +#Region "用料機制" + + ''' + ''' 2016/10/20 YF, 取出上料資訊 + ''' + ''' + Private Function GetFeedingData() As Boolean + + Dim result As Boolean = False + + ' 2016/10/20 YF, 依作業站用料選項處理用料機制 + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + Case "0" + ' 發料點(線邊倉或工單) + 'result = GetFeedingByPutinPlace() + btnKeyIn.Visible = True + txtMaterialNo.Enabled = True + txtMaterialLotNo.Enabled = True + result = True + Case "1" + ' 設備 + blnByEQP = True + GetFeedingByEQP() + txtMaterialNo.Enabled = False + txtMaterialLotNo.Enabled = False + Case "2" + ' 生產線, 待組裝版再實作 + Case "3" + ' 工位, 待組裝版再實作 + Case Else + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-003000", "[%MaterialOption%]:" & dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString & " [%NOT DEFINE%]!"), MsgBoxStyle.Exclamation, Me.Text) + End Select + + Return result + + End Function + +#End Region + +#Region "發料點上料資訊" + + ''' + ''' 2016/10/27 YF, 在物料區刷入物料及料批號, 自動從投料點帶出物料資訊, 從txtMaterialLotNo_KeyPress搬移過來 + ''' Gary Lu 20131104~06:增加先刷入物料編號再刷入物料批號的方式 + ''' 並修改成刷入物料料批批量小於總標準用量時,仍可自動帶入,惟帶入用量為該料批之批量 + ''' + ''' + + Private Sub AutoFeedingByPutinPlace(ByVal strMaterialNo As String, ByVal strMaterialLotNo As String) + + Try + '不須用料 + If dsWIP.Tables(tblTMaterial) Is Nothing OrElse + dsWIP.Tables(tblTMaterial).Rows.Count = 0 Then Exit Sub + + If strMaterialNo.Trim = "" Then Exit Sub + If strMaterialLotNo.Trim = "" Then Exit Sub + + Dim drMLot() As DataRow = dtMLot.Select("SubstituteMaterialNo = '" & strMaterialNo & "' And MaterialLotNo = '" & strMaterialLotNo & "'") + If drMLot.Length > 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-200004", "[%MaterialNo%]: " & strMaterialNo & vbCrLf & + "[%MaterialLotNo%]: " & strMaterialLotNo), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + Dim drMaterialLotData As DataRow = Nothing + For Each drTMaterial As DataRow In dsWIP.Tables(tblTMaterial).Rows + drMaterialLotData = funGetMateriallLotData(strMaterialNo, strMaterialLotNo, drTMaterial) + If IsNothing(drMaterialLotData) Then Continue For + + funAddNewMlot(drMaterialLotData, drTMaterial) + funUpdateSumUseQty(drTMaterial) + Exit For + Next + + If IsNothing(drMaterialLotData) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog( + ChgTranslateName_Msg("0000-202104", "[%MaterialNo%]:" & strMaterialNo & ", [%MaterialLotNo%]: " & strMaterialLotNo), + MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + txtMaterialLotNo.Text = "" + txtMaterialNo.Text = "" + txtMaterialNo.Focus() + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + Cursor.Current = Cursors.Default + End Try + + End Sub + Private Sub funUpdateSumUseQty(ByVal drTMaterial As DataRow) + + Dim SumQty As Decimal = 0 + For Each drMLot As DataRow In dtMLot.Rows + If drMLot("MaterialNo") = drTMaterial("MaterialNo") Then + SumQty += (drMLot("UseQty") * (drTMaterial("StdQty") / drMLot("SubstituteStdQty"))) + End If + Next + + drTMaterial.BeginEdit() + drTMaterial("UseQty") = Format(SumQty, "0.########") + drTMaterial.EndEdit() + End Sub + Private Sub funAddNewMlot(ByVal drMaterialLot As DataRow, ByVal drTMaterial As DataRow) + + Dim drAddMLot As DataRow + drAddMLot = dtMLot.NewRow + drAddMLot("EquipmentNo") = drMaterialLot("EquipmentNo") + drAddMLot("MaterialNo") = drTMaterial("MaterialNo") + drAddMLot("MaterialLotNo") = drMaterialLot("MaterialLotNo") + drAddMLot("Qty") = drMaterialLot("Qty") + drAddMLot("UseQty") = funCalculateUseQty(drTMaterial, drMaterialLot) + drAddMLot("SubstituteMaterialNo") = drMaterialLot("MaterialNo") + drAddMLot("SubstituteMaterialLevel") = drMaterialLot("SubstituteMaterialLevel") + drAddMLot("SubstituteMaterialType") = drMaterialLot("SubstituteMaterialType") + drAddMLot("SubstituteStdQty") = drMaterialLot("SubstituteStdQty") + drAddMLot("CheckLotNo") = drMaterialLot("CheckLotNo") + dtMLot.Rows.Add(drAddMLot) + + End Sub + + Private Sub iugKzxx_iMESUltraGrid_InitializeLayOut(sender As Object, e As InitializeLayoutEventArgs) Handles iugKzxx.iMESUltraGrid_InitializeLayOut + With e.Layout + With .Bands(tblKzTable).Columns("CheckFlag") + .Width = 50 + .Header.VisiblePosition = 1 + .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + End With + With .Bands(tblKzTable).Columns("LotNoBySLC") + .Width = 100 + .Header.VisiblePosition = 2 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + End With + With .Bands(tblKzTable).Columns("SelectFlag") + .Width = 50 + .Header.VisiblePosition = 3 + .CellActivation = Infragistics.Win.UltraWinGrid.Activation.ActivateOnly + .CellAppearance.BackColor = System.Drawing.Color.Gainsboro + .ValueList = vlKzValueList + End With + 'UltraGrid + iugKzxx.iMESUltraGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.True + iugKzxx.iMESUltraGrid.Rows.ExpandAll(True) + + End With + End Sub + + Private Sub iugKzxx_Load(sender As Object, e As EventArgs) Handles iugKzxx.Load + + End Sub + + Private Function funGetMateriallLotData(ByVal strMaterialNo As String, ByVal strMaterialLotNo As String, ByVal drTMaterial As DataRow) As DataRow + + If funLoadSubstituteMaterial_Main(drTMaterial("MaterialNo"), drTMaterial("UnitNo")) >= 0 Then + Dim drSel As DataRow() = + dsWIP.Tables(tblSubstituteMaterial).Select("MaterialNo='" & strMaterialNo & "' and MaterialLotNo = '" & strMaterialLotNo & "'") + + If drSel.Length > 0 Then Return drSel(0) + End If + + Return Nothing + + End Function + Private Function funCalculateUseQty(ByVal drTMaterial As DataRow, ByVal drMateriallLot As DataRow) As Decimal + '判断当前物理与当前用料是否一致 不一致直接返回0 + If drMateriallLot("MaterialNo").ToString <> drTMaterial("MaterialNo").ToString Then + Return 0 + End If + Dim MaterialNo As String = drTMaterial("MaterialNo").ToString + + '總共需要的主料數量 + Dim StdUseQty As Decimal = drTMaterial("StdUseQty") + '做一個成品需要的主料數量 + Dim StdQty As Decimal = drTMaterial("StdQty") + + '計算還需要多少主料 + Dim RemainingQty As Decimal = funGetRemainingQty(StdUseQty, StdQty, MaterialNo) + + '單位轉成替代料 + RemainingQty = RemainingQty * (drMateriallLot("SubstituteStdQty") / StdQty) + + If RemainingQty <= 0 Then Return 0 + + '料批數量不足 則使用料批數量就好 + If drMateriallLot("Qty") < RemainingQty Then + Return drMateriallLot("Qty") + End If + + Return RemainingQty + + End Function + ''' + ''' 計算還需要多少主料 + ''' + Private Function funGetRemainingQty(ByVal StdUseQty As Decimal, ByVal StdQty As Decimal, ByVal MaterialNo As String) As Decimal + + Dim drSel As DataRow() = dtMLot.Select("MaterialNo = '" & MaterialNo & "'") + For Each drMLot In drSel + StdUseQty -= (drMLot("UseQty") * (StdQty / drMLot("SubstituteStdQty"))) + Next + + Return StdUseQty + + End Function + +#End Region + +#Region "設備上料資訊" + + ''' + ''' 2016/10/21 YF, 取得設備上料資訊 + ''' + ''' + Private Sub GetFeedingByEQP() + + Dim EquipmentNo As String = "" + Dim XmlDoc As New XmlDocument + Dim dsTemp As New DataSet + Dim drAdd As DataRow + + Try + + ' 設備編號 + If (dsWIP.Tables(tblTEquipment) Is Nothing) OrElse (dsWIP.Tables(tblTEquipment).Rows.Count = 0) Then + Throw New iMESException.MESException("0000-200003", "[%MATERIALOPTIONISEQP%], [%MUSTSELECTEQP%]!") + End If + + For Each r As DataRow In dsWIP.Tables(tblTEquipment).Rows + EquipmentNo += "|" & r("EquipmentNo").ToString + Next + If EquipmentNo <> "" Then + EquipmentNo = Mid(EquipmentNo, 2) + End If + + 'EquipmentNo = dsWIP.Tables(tblTEquipment).Rows(0)("EquipmentNo").ToString + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", dsWIP.Tables(tblLotState).Rows(0)("OPNo"), "") + strParameter += CombineXMLParameter("equipmentno", "EquipmentNo", "String", EquipmentNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsWIP_Material.LoadFeedingByEquipment", InXml) + + XmlDoc.LoadXml(OutXml) + + If Not ChkExecutionSuccess(XmlDoc) Then + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadfeedingbyequipment").Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadfeedingbyequipment").Item(0).SelectNodes("value").Item(0).InnerXml + + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + dtMLot.Clear() + + Dim iCount As Decimal + Dim drSel As DataRow() + Dim strConditionMtl As String = "" + For Each r1 As DataRow In dsWIP.Tables(tblTMaterial).Rows + strConditionMtl = "" + ' 判斷是否有上料 + Dim strSelectCondition As String = "" + If r1("PutInPlaceType") = 3 Then + strSelectCondition = " And MONo = '" & dsWIP.Tables(tblLotState).Rows(0)("MONo").ToString & "' " + ElseIf r1("PutInPlaceType") = 2 OrElse r1("PutInPlaceType") = 4 Then + strSelectCondition = " And MONo = 'N/A'" + End If + + '新设备上料 根据用料清单找到可以使用的物料 + drSel = dsOE.Tables(strMOList).Select("MaterialNo = '" & r1("MaterialNo") & "'") + For Each dr As DataRow In drSel + strConditionMtl += "'" & dr("SubstituteMaterialNo") & "'" + "," + Next + strConditionMtl = strConditionMtl.Substring(0, strConditionMtl.Length - 1) + 'dsTemp.Tables(0).DefaultView.RowFilter = "MaterialNo = '" & r1("MaterialNo") & "' And Qty > 0" & strSelectCondition + dsTemp.Tables(0).DefaultView.RowFilter = "InputMaterialNo in (" & strConditionMtl & ") And Qty > 0" & strSelectCondition + dsTemp.Tables(0).DefaultView.Sort = "SEQ" + + + + 'iCount = dsTemp.Tables(0).DefaultView.Count + 'Dim Num As Decimal + ''Dim Remainder As Decimal + 'If iCount <> 0 Then + ' Num = Format(Convert.ToDecimal(RemainingQty / iCount), "0.########") + ' 'Remainder = RemainingQty Mod iCount + 'End If + + Dim sumRemainingQty As Decimal = 0 + ' 將上料資訊寫入dtMLot + For Each r2 As DataRowView In dsTemp.Tables(0).DefaultView + drAdd = dtMLot.NewRow + drAdd("EquipmentNo") = r2("EquipmentNo") + 'drAdd("MaterialNo") = r2("MaterialNo") '因为上料表中的materialno是* 则取工单用料清单的主料 新设备上料 14278 + drAdd("MaterialNo") = r1("MaterialNo") + drAdd("MaterialLotNo") = r2("MaterialLotNo") + drAdd("Qty") = r2("Qty") + drAdd("UseQty") = 0 + drAdd("SubstituteMaterialNo") = r2("InputMaterialNo") + drAdd("SubstituteMaterialLevel") = r2("SubstituteMaterialLevel") + drAdd("SubstituteMaterialType") = r2("SubstituteMaterialType") + drAdd("SubstituteStdQty") = r2("SubstituteStdQty") + drAdd("CheckLotNo") = r2("CheckLotNo") + drAdd("AccDate") = r2("AcclimationDate") '回溫時間 + dtMLot.Rows.Add(drAdd) + Next + + For Each drMLot As DataRow In dtMLot.Rows + If drMLot("UseQty") <= 0 Then + drMLot("UseQty") = funCalculateUseQty(r1, drMLot) + End If + Next + + funUpdateSumUseQty(r1) + Next + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + XmlDoc = Nothing + End Try + + End Sub + + ''' + ''' 2016/10/27 YF, 自動上料 - 設備 + ''' + ''' + Private Function AutoFeedingByEQP() As Boolean + + Dim result As Boolean = False + Dim EquipmentNo As String + Dim ActiveRow As UltraGridRow + Dim XmlDoc As New XmlDocument + Dim FeedingQty As Decimal + + Try + + Cursor.Current = Cursors.WaitCursor + + ' 設備編號 + If (dsWIP.Tables(tblTEquipment) Is Nothing) OrElse (dsWIP.Tables(tblTEquipment).Rows.Count = 0) Then + Throw New iMESException.MESException("0000-200003", "[%MATERIALOPTIONISEQP%], [%MUSTSELECTEQP%]!") + End If + + EquipmentNo = dsWIP.Tables(tblTEquipment).Rows(0)("EquipmentNo").ToString + + ' 檢查是否有選定一筆物料 + If (Me.iugMaterial.iMESUltraGrid.ActiveRow Is Nothing) OrElse (Not Me.iugMaterial.iMESUltraGrid.ActiveRow.IsDataRow) Then + Throw New iMESException.MESException("0000-003000", "[%PLEASE SELECT%] [%MATERIAL%]!") + Else + ActiveRow = Me.iugMaterial.iMESUltraGrid.ActiveRow + End If + + ' 若目前作用中的資料列是子資料, 則先將父資料設為ActiveRow + If (Not ActiveRow.ParentRow Is Nothing) Then + Me.iugMaterial.iMESUltraGrid.ActiveRow = ActiveRow.ParentRow + ActiveRow = Me.iugMaterial.iMESUltraGrid.ActiveRow + End If + + ' 檢查有無輸入料號 + If (Me.txtMaterialNo.Text = "") Then + Me.txtMaterialNo.Focus() + Throw New iMESException.MESException("0000-200001", "[%MATERIALNO%]!") + End If + + ' 檢查有無輸入料批 + If (Me.txtMaterialLotNo.Text = "") Then + Me.txtMaterialLotNo.Focus() + Throw New iMESException.MESException("0000-200001", "[%MATERIALLOTNO%]!") + End If + + ' 2016/11/03 YF, 自動上料時, 應將工單或線邊倉目前數量全數上到設備 + FeedingQty = GetMaterialFeedingQty(ActiveRow) + + ' 進行設備上料 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("equipmentno", "EquipmentNo", "String", CInput(EquipmentNo), "") + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(ActiveRow.Cells("MaterialNo").Value), "") + strParameter += CombineXMLParameter("checklotno", "CheckLotNo", "String", CInput(ActiveRow.Cells("CheckLotNo").Value), "") + strParameter += CombineXMLParameter("mono", "MONo", "String", CInput(txtMONo.Text), "") + strParameter += CombineXMLParameter("inputmaterialno", "InputMaterialNo", "String", CInput(Me.txtMaterialNo.Text), "") + strParameter += CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(Me.txtMaterialLotNo.Text), "") + strParameter += CombineXMLParameter("inputqty", "InputQty", "Decimal", FeedingQty, "") + strParameter += CombineXMLParameter("userno", "UserNo", "String", CInput(gUserNo), "") + strParameter += CombineXMLParameter("revisedate", "ReviseDate", "DateTime", Format(Now, "yyyy/MM/dd HH:mm:ss"), "") + + ' 因CInput的參數是ByRef, 所以會造成UltraGrid的ActiveRow變成編輯狀況(有一支筆的圖示出現) + ActiveRow.CancelUpdate() + + InXml = CombineXMLRequest(strIdentity, strParameter) + + OutXml = InvokeSrv("wsWIP_Material.Exe_EQPMountMaterial", InXml) + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + Me.txtMaterialNo.Text = "" + Me.txtMaterialLotNo.Text = "" + Me.txtMaterialNo.Focus() + ' 上料成功後重新取出上料資訊 + GetFeedingByEQP() + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + result = True + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Finally + XmlDoc = Nothing + Cursor.Current = Cursors.Default + End Try + + Return result + + End Function + +#End Region + +#Region "取出物料要上料的數量" + + ''' + ''' 2016/11/03 YF, 取出要上料的數量 + ''' 工單發料: pPutinNo即為工單編號 + ''' 線邊倉發料: pPutinNo即為庫房編號 + ''' + ''' + ''' + Private Function GetMaterialFeedingQty(ByVal row As UltraGridRow) As Decimal + + Dim FeedingQty As Decimal = 0 + Dim dsTemp As New DataSet + Dim XmlDoc As New XmlDocument + Dim TagName As String + Dim ErrorCode As String + Dim InventoryNo As String + Dim ErrorMessage As String + + Try + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + + If (row.Cells("PutinPlaceType").Value = 3) Then + ' 工單發料 + strParameter = CombineXMLParameter("mono", "MONo", "String", CInput(Me.txtMONo.Text), "") + strParameter += CombineXMLParameter("materialno", "MaterialNo", "String", CInput(row.Cells("MaterialNo").Value), "") + strParameter += CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(Me.txtMaterialLotNo.Text), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + OutXml = InvokeSrv("wsOE.LoadMOMaterialState", InXml) + TagName = "loadmomaterialstate" + ErrorCode = "9P12-200026" + ErrorMessage = "[%MONO%]: " & Me.txtMONo.Text + ElseIf (row.Cells("PutinPlaceType").Value = 2) Then + ' 線邊倉發料 + ' 取出倉庫編號 + InventoryNo = GetInventoryNo() + strParameter = CombineXMLParameter("inventoryno", "InventoryNo", "String", CInput(InventoryNo), "") + strParameter += CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(Me.txtMaterialLotNo.Text), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + OutXml = InvokeSrv("wsINV.LoadWIPInventory_Raw", InXml) + TagName = "loadwipinventory_raw" + ErrorCode = "0000-202103" + ErrorMessage = "[%INVENTORYNO%]: " & InventoryNo & " " + Else + Throw New iMESException.MESException("0000-003000", "[%PutinPlaceType%]: " & row.Cells("PutinPlaceType").Value & ", [%NOT DEFINE%]!") + End If + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName(TagName).Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + XmlData = XmlDoc.DocumentElement.GetElementsByTagName(TagName).Item(0).SelectNodes("value").Item(0).InnerXml + + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If (dsTemp.Tables.Count > 0) AndAlso (dsTemp.Tables(0).Rows.Count > 0) Then + + If (dsTemp.Tables(0).Rows(0)("Qty") > 0) Then + FeedingQty = dsTemp.Tables(0).Rows(0)("Qty") + Else + Throw New iMESException.MESException(ErrorCode, + "[%MaterialNo%]: " & row.Cells("MaterialNo").Value & vbCrLf & + "[%MaterialLotNo%]: " & Me.txtMaterialLotNo.Text & vbCrLf & + "[%QUANTITY%] [%IS EQUAL TO%] 0!") + End If + + Else + Throw New iMESException.MESException("0000-200003", + ErrorMessage & vbCrLf & + "[%MaterialNo%]: " & row.Cells("MaterialNo").Value & vbCrLf & + "[%MaterialLotNo%]: " & Me.txtMaterialLotNo.Text) + + End If + + Else + Throw New iMESException.MESException(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc)) + End If + + Catch ex As iMESException.MESException + Throw + Catch ex As Exception + Throw + Finally + dsTemp = Nothing + XmlDoc = Nothing + End Try + + Return FeedingQty + + End Function + + ''' + ''' 2016/11/03 YF, 取出倉庫 + ''' + ''' + ''' + Private Function GetInventoryNo() As String + + Dim result As String = "" + Dim dsTemp As New DataSet + Dim XmlDoc As New XmlDocument + + Try + + strParameter = CombineXMLParameter("areano", "AreaNo", "String", CInput(Me.txtAreaNo.Text), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + OutXml = InvokeSrv("wsSMD.LoadAreaInventory", InXml) + + XmlDoc.LoadXml(OutXml) + + If ChkExecutionSuccess(XmlDoc) Then + + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadareainventory").Item(0).SelectNodes("schema").Item(0).InnerXml + + If XmlSchema <> "" Then + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsTemp.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadareainventory").Item(0).SelectNodes("value").Item(0).InnerXml + + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsTemp.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If (dsTemp.Tables.Count > 0) AndAlso (dsTemp.Tables(0).Rows.Count > 0) Then + dsTemp.Tables(0).DefaultView.Sort = "DefaultInv Desc" + result = dsTemp.Tables(0).DefaultView(0)("InventoryNo") + Else + Throw New iMESException.MESException("0000-202111", "[%AreaNo%]: " & Me.txtAreaNo.Text) + End If + + Else + Throw New iMESException.MESException(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc)) + End If + + + Catch ex As iMESException.MESException + Throw + Catch ex As Exception + Throw + Finally + dsTemp = Nothing + XmlDoc = Nothing + End Try + + Return result + + End Function + +#End Region + +#Region "作業人員" + + ''' + ''' 2016/12/26 YF, 顯示作業人員現況資訊 + ''' + ''' + ''' + Private Sub btnOperator_Click(sender As Object, e As EventArgs) Handles btnOperator.Click + + Dim parameters As Dictionary(Of String, Object) + Dim EquipmentNo As String = "" + + Try + + parameters = New Dictionary(Of String, Object) + + With dsWIP.Tables(tblLotState).Rows(0) + + Select Case .Item("MultiOperatorMode").ToString + Case "0" + ' 作業站 + parameters.Add("OPNo", .Item("OPNo").ToString) + Case "1" + ' 區域 + parameters.Add("AreaNo", .Item("AreaNo").ToString) + Case "2" + ' 設備 + If (dsWIP.Tables(tblTEquipment) Is Nothing) OrElse (dsWIP.Tables(tblTEquipment).Rows.Count = 0) Then + Throw New iMESException.MESException("0000-103010", "[%PLEASE SELECT%] [%EQUIPMENT%]!") + End If + + For Each row As DataRow In dsWIP.Tables(tblTEquipment).Rows + EquipmentNo += row("EquipmentNo") & "," + Next + + EquipmentNo = EquipmentNo.TrimEnd(",") + parameters.Add("EquipmentNo", EquipmentNo) + + Case "5" 'Mantis 63873: 增加判斷多人加工模式為生產批, 並傳入資料 + ' 生產批 + parameters.Add("LotNo", .Item("LotNo").ToString) + Case Else + Throw New iMESException.MESException("0000-003000", "[%MultiOperatorMode%]:" & .Item("MultiOperatorMode").ToString & " [%NOT DEFINE%]!") + End Select + + End With + + parameters.Add("EnableSignOut", False) + Me.ObjectFileHandler.Execute(pObjectID:="WP_OperatorOnline", pParameters:=parameters) + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + +#End Region + +#Region "特殊生產需求" + + '2019/01/19 Eric 特殊生產需求顯示 + Private Sub btnSWR_Click(sender As System.Object, e As System.EventArgs) Handles btnSWR.Click + + '2019/02/12 Eric 加入判斷有無資料 + If blnShowSWR = True Then + + Dim Parameters As New Dictionary(Of String, Object) + Parameters.Add("MONo", txtMONo.Text) + Parameters.Add("CustomerLotNo", txtCustomerLotNo.Text) + Parameters.Add("OPNo", txtOPNo.Text) + Parameters.Add("LotNo", txtLotNo.Text) + Parameters.Add("DeviceNo", dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString) + Parameters.Add("CustomerNo", dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString) + Parameters.Add("LogGroupSerial", dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString) + Parameters.Add("blnCICo", True) + Me.ObjectFileHandler.Execute("WP_SWRBasisRead", Parameters) + + btnSWR.Visible = True + + End If + + End Sub + + '2019/02/12 Eric + Private Sub funLoadSWRJoinLog() + + Cursor.Current = Cursors.WaitCursor + + + If Not IsNothing(dsWIP.Tables(tblSWRJoinLog)) Then + dsWIP.Tables.Remove(tblSWRJoinLog) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("loggroupserial", "LogGroupSerial", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("LogGroupSerial").ToString), "") + strParameter += CombineXMLParameter("customerno", "CustomerNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("CustomerNo").ToString), "") + strParameter += CombineXMLParameter("lotno", "LotNo", "String", CInput(txtLotNo.Text), "") + strParameter += CombineXMLParameter("deviceno", "DeviceNo", "String", CInput(dsWIP.Tables(tblLotState).Rows(0)("DeviceNo").ToString), "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", CInput(txtOPNo.Text), "") + strParameter += CombineXMLParameter("customerlotno", "CustomerLotNo", "String", CInput(txtCustomerLotNo.Text), "") + strParameter += CombineXMLParameter("mono", "MONo", "String", CInput(txtMONo.Text), "") + strParameter += CombineXMLParameter("status", "Status", "Integer", 2, "") + + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + + OutXml = InvokeSrv("wsWIP.LoadSWRBasisJoinLog", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + tblSWRJoinLog = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadswrbasisjoinlog").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadswrbasisjoinlog").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadswrbasisjoinlog").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Sub + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Sub + End Try + + Cursor.Current = Cursors.Default + + End Sub + +#End Region + +#Region "料批卡控" + + Private Sub funLoadAllMaterialLot() + + Dim drAdd As DataRow + Dim drSel As DataRow() + Dim defNullDate As Date = CDate("9999/12/31") '製造日期或保存期限為Null時, 填入9999/12/31, 以防步Null錯誤, 因Null表示不受管控, 可以較後使用, 故填入較大的值 + + dtAllMTLLot = New DataTable("AllMTLLot") + dtAllMTLLot.Columns.Add("MaterialNo", System.Type.GetType("System.String")) '主料號 + dtAllMTLLot.Columns.Add("MaterialLotNo", System.Type.GetType("System.String")) + dtAllMTLLot.Columns.Add("Qty", System.Type.GetType("System.Decimal")) + dtAllMTLLot.Columns.Add("MFGDate", System.Type.GetType("System.DateTime")) + dtAllMTLLot.Columns.Add("ExpireDate", System.Type.GetType("System.DateTime")) + dtAllMTLLot.Columns.Add("InputDate", System.Type.GetType("System.DateTime")) + + dtAllMTLLot.Columns.Add("SubstituteMaterialNo", System.Type.GetType("System.String")) '新增一替代料欄位,2010/03/26,by yumei, 實際用料的料號 + dtAllMTLLot.Columns.Add("SubstituteMaterialLevel", System.Type.GetType("System.Int16")) '新增一替代料位階欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("SubstituteMaterialType", System.Type.GetType("System.String")) '新增一替代料類型欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("SubstituteStdQty", System.Type.GetType("System.Decimal")) '新增一替代料標準用量欄位,2013/01/08,by Kevin + dtAllMTLLot.Columns.Add("CheckLotNo", System.Type.GetType("System.Int16")) '新增一替代料是否檢查批號欄位,2013/01/08,by Kevin + + dtAllMTLLot.Columns.Add("SeqNo", System.Type.GetType("System.Int16")) '記錄同料號間各料批應被使用的次序 + + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + + Case "0" ' 發料點(線邊倉或工單) + '將Temp_Material中各主料所有可用料批全數取出, 存入dtAllMTLLot中 + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + Call funLoadSubstituteMaterial_Main(drMTL("MaterialNo"), drMTL("UnitNo")) + For Each drMTLLot As DataRow In dsWIP.Tables(tblSubstituteMaterial).Rows + drAdd = dtAllMTLLot.NewRow + drAdd("MaterialNo") = drMTL("MaterialNo") 'BOM的主料號 + drAdd("MaterialLotNo") = drMTLLot("MaterialLotNo") + drAdd("Qty") = drMTLLot("Qty") + If drMTLLot("ManufactureDate").ToString = "" Then + drAdd("MFGDate") = defNullDate + Else + drAdd("MFGDate") = drMTLLot("ManufactureDate") + End If + If drMTLLot("ExpireDate").ToString = "" Then + drAdd("ExpireDate") = defNullDate + Else + drAdd("ExpireDate") = drMTLLot("ExpireDate") + End If + If drMTLLot("InputDate").ToString = "" Then + drAdd("InputDate") = defNullDate + Else + drAdd("InputDate") = drMTLLot("InputDate") + End If + + drAdd("SubstituteMaterialNo") = drMTLLot("MaterialNo") '實際料號, 有可能與主料號同也有可能是替代料號 + drAdd("SubstituteMaterialLevel") = drMTLLot("SubstituteMaterialLevel") + drAdd("SubstituteMaterialType") = drMTLLot("SubstituteMaterialType") + drAdd("SubstituteStdQty") = drMTLLot("SubstituteStdQty") + drAdd("CheckLotNo") = drMTLLot("CheckLotNo") + dtAllMTLLot.Rows.Add(drAdd) + Next + Next + + '計算同一料號各料批的使用次序 + Dim dvAllMTLLot, dvTemp As DataView + Dim dtTemp As DataTable + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + dvAllMTLLot = New DataView(dtAllMTLLot) + dvAllMTLLot.RowFilter = "MaterialNo = '" & drMTL("MaterialNo") & "'" + dtTemp = dvAllMTLLot.ToTable(True, {"MFGDate", "ExpireDate", "InputDate"}) '對製造日期,有效日期,入庫日做Distinct篩選 + dvTemp = dtTemp.DefaultView + dvTemp.Sort = "MFGDate, ExpireDate, InputDate" + '當MFGDate, ExpireDate, InputDate皆相同時, 需給予相同的SeqNo, 故以Distinct的三個日期下去跑Loop + For idx As Integer = 0 To dvTemp.Count - 1 + drSel = dtAllMTLLot.Select("MaterialNo = '" & drMTL("MaterialNo") & "'" & + "And MFGDate = #" & Format(dvTemp(idx)("MFGDate"), "yyyy/MM/dd HH:mm:ss") & "#" & + " And ExpireDate = #" & Format(dvTemp(idx)("ExpireDate"), "yyyy/MM/dd HH:mm:ss") & "#" & + " And InputDate = #" & Format(dvTemp(idx)("InputDate"), "yyyy/MM/dd HH:mm:ss") & "#") + For j As Integer = 0 To drSel.Length - 1 + drSel(j)("SeqNo") = idx + 1 + Next + Next + Next + + Case "1" '設備 已在LoadTemp_Material中處理 + + + End Select + + End Sub + + Private Sub funAutoSetMaterialLot() + + Dim drSel, dtSelMTL As DataRow() + Dim decLeftQty As Decimal + + Call funLoadAllMaterialLot() + Call funLoadTemp_MaterialLot() + + Select Case dsWIP.Tables(tblLotState).Rows(0)("MaterialOption").ToString + + Case "0" ' 發料點(線邊倉或工單) + '依據CI刷入的料批先進先出安排用量 + For Each drMTL As DataRow In dsWIP.Tables(tblTMaterial).Rows + + decLeftQty = drMTL("StdUseQty") + + drSel = dsWIP.Tables(tblTMaterialLot).Select("MainMaterialNo = '" & drMTL("MaterialNo") & "'", "MFGDate, ExpireDate, InputDate") + For idx As Integer = 0 To drSel.Length - 1 + drAdd = dtMLot.NewRow + drAdd("EquipmentNo") = "N/A" + drAdd("MaterialNo") = drMTL("MaterialNo") + drAdd("MaterialLotNo") = drSel(idx)("MaterialLotNo") + drAdd("Qty") = drSel(idx)("Qty") + drAdd("SubstituteMaterialNo") = drSel(idx)("MaterialNo") + drAdd("SubstituteMaterialLevel") = drSel(idx)("SubstituteMaterialLevel") + drAdd("SubstituteMaterialType") = drSel(idx)("SubstituteMaterialType") + drAdd("SubstituteStdQty") = drSel(idx)("SubstituteStdQty") + drAdd("CheckLotNo") = drSel(idx)("CheckLotNo") + + ' 計算使用量 + If (drSel(idx)("Qty") > decLeftQty) Then + drAdd("UseQty") = decLeftQty + decLeftQty = 0 + Else + drAdd("UseQty") = drSel(idx)("Qty") + decLeftQty = decLeftQty - drSel(idx)("Qty") + End If + + dtMLot.Rows.Add(drAdd) + Next + + If (decLeftQty <> 0) Then + drMTL("UseQty") = Format(drMTL("StdUseQty") - decLeftQty, "0.########") + Else + drMTL("UseQty") = Format(drMTL("StdUseQty"), "0.########") + End If + Next + + End Select + + End Sub + Private Sub LoadMaterialGumType(ByVal MaterialNo As String, ByVal MaterialType As String) + Dim tmpStringReader As System.IO.StringReader '將字串轉換成可讀入DataSet的物件 + + Dim XmlData As String '儲存取回之資料 + Dim XmlSchema As String '儲存取回之資料結構 + + '先判斷是否dataset中已有MaterialType之datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsDefine.Tables(strTableName)) Then + dsDefine.Tables.Remove(strTableName) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("materialtype", "MaterialType", "String", CInput(MaterialType), "") + strParameter &= CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + strParameter &= CombineXMLParameter("issuestate", "IssueState", "Integer", defInteger, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsMTL.LoadMaterialGumType", InXml) + + '利用XmlDoc物件處理ReturnValue + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + + If Not ChkExecutionSuccess(XmlDoc) Then + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + strTableName = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmaterialgumtype").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmaterialgumtype").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsDefine.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmaterialgumtype").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsDefine.ReadXml(tmpStringReader) + tmpStringReader.Close() + End If + + '當物料類別及物料編號都有設時,判斷時先依據有設MATERIALNO的判斷(非*) + If dsDefine.Tables(strTableName).Rows.Count > 1 Then + For index = 0 To dsDefine.Tables(strTableName).Rows.Count - 1 + Dim dr As DataRow = dsDefine.Tables(strTableName).Rows(index) + If dr("MaterialNo").ToString = "*" Then + dr.Delete() + Exit For + End If + Next + dsDefine.Tables(strTableName).AcceptChanges() + End If + + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + Private Sub funLoadWipInventory_Raw(ByVal MaterialNo As String, ByVal MaterialLotNo As String) + + Dim tmpStringReader As System.IO.StringReader '將字串轉換成可讀入DataSet的物件 + Dim XmlData As String '儲存取回之資料 + Dim XmlSchema As String '儲存取回之資料結構 + + '先判斷是否dataset中已有Inventory之datatable,若有,需先remove否則會有錯誤 + If Not IsNothing(dsINV.Tables(strRaw)) Then + dsINV.Tables.Remove(strRaw) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("materialno", "MaterialNo", "String", CInput(MaterialNo), "") + strParameter = CombineXMLParameter("materiallotno", "MaterialLotNo", "String", CInput(MaterialLotNo), "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsINV.LoadWIPInventory_Raw", InXml) + + '利用XmlDoc物件處理ReturnValue + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + + strRaw = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadwipinventory_raw").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_raw").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsINV.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadwipinventory_raw").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsINV.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load Raw of WIP Inventory failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + + Finally + tmpStringReader = Nothing + + End Try + + End Sub +#End Region + +#Region "聯產品" + + Private Sub btnGetProduct_Click(sender As Object, e As EventArgs) Handles btnGetProduct.Click + + Dim drSel As DataRow() + Dim strUniPrdPara As String + + '讀取系統參數AllowLotProductChange(允許生產批變更產品) 要從MES或ERP去撈聯產品資訊 + drSel = dsWIP.Tables(tblSYSParameter).Select("ParameterNo = 'AllowLotProductChange'") + If drSel.Length > 0 Then + strUniPrdPara = drSel(0)("ParameterValue").ToString + End If + + Select Case strUniPrdPara + Case "0" '不允許 + btnGetProduct.Enabled = False + Case "1" '撈MES產品資訊 + + Call funLoadProduct() + + Cursor.Current = Cursors.WaitCursor + + If dsWIP.Tables(tblProductBasis) Is Nothing Then Exit Sub + + If dsWIP.Tables(tblProductBasis).DefaultView.Count = 0 Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-103021", "[%Product Basis%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + Dim fSearch As New frmCOMSearch + fSearch.dvSearch = dsWIP.Tables(tblProductBasis).DefaultView + fSearch.strFindColumnName = "ProductNo" + '20221214,13871,右鍵 儲存設計 需要使用Owner(程式碼由程序建立) + fSearch.ShowDialog(Me) + fSearch.Dispose() + + If drSearch Is Nothing Then Exit Sub + + If txtUnionProductNo.Text <> drSearch("ProductNo").ToString Then + txtUnionProductNo.Text = drSearch("ProductNo").ToString + End If + If txtUnionProductVersion.Text <> drSearch("ProductVersion").ToString Then + txtUnionProductVersion.Text = drSearch("ProductVersion").ToString + End If + If txtUnionProductUnit.Text <> drSearch("UnitNo").ToString Then + txtUnionProductUnit.Text = drSearch("UnitNo").ToString + End If + + '選取聯產品資訊時, 需自動勾起聯產品checkBox + chkUnionProductNo.Checked = True + + Cursor.Current = Cursors.Default + + Case "2" '撈ERP TIPTOP 聯產品資訊 + + Call funCombineTTInXml(dsWIP.Tables(tblOEMOBasis).Rows(0)("ProductNo").ToString) + + Case "3" '撈ERP T100 聨產品資訊 + + Call funCombineT100InXml(dsWIP.Tables(tblOEMOBasis).Rows(0)("ProductNo").ToString, dsWIP.Tables(tblOEMOBasis).Rows(0)("MONO").ToString) + + Case "4" '撈E10ICD 聨產品資訊 + '87580: [605]iMES與E10整合_第一階段_SDD210205_01-09取得E10聯產品資料 + Call funCombineE10ICDInXml(dsWIP.Tables(tblOEMOBasis).Rows(0)("ProductNo").ToString, dsWIP.Tables(tblOEMOBasis).Rows(0)("MONO").ToString) + + Case "5" '撈ERP TIPTOPICD 聨產品資訊 + + Call funCombineTTICDInXml(dsWIP.Tables(tblOEMOBasis).Rows(0)("ProductNo").ToString) + + End Select + + End Sub + + Private Sub chkUnionProductNo_CheckedChanged(sender As Object, e As EventArgs) Handles chkUnionProductNo.CheckedChanged + '取消勾選聯產品時需將聯產品資訊清空 + If Not chkUnionProductNo.Checked Then + txtUnionProductNo.Text = "" + txtUnionProductVersion.Text = "" + txtUnionProductUnit.Text = "" + End If + End Sub + + Private Function funChkLastBR(ByVal LinkName As String) As Boolean + + funChkLastBR = False '預設為false + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", CInput(LotNo), "") + strParameter += CombineXMLParameter("linkname", "LinkName", "String", LinkName, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.ChkLastBR", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出ShiftNo + If XmlDoc.GetElementsByTagName("lastbr").Item(0).SelectNodes("value").Count > 0 Then + funChkLastBR = CBool(XmlDoc.DocumentElement.GetElementsByTagName("lastbr").Item(0).SelectNodes("value").Item(0).InnerText) + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + End Function + +#End Region + +#Region "Bin Process" + + Private Sub funLoadSystemBin() + + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + InXml = CombineXMLRequest(strIdentity, "") + + Try + ' 2016 YF, Dim wsSYS As New wsSYS.wsSYS + Dim XmlDoc As New XmlDocument + ' 2016 YF, wsSYS.Url = LocalizeWebService(wsSYS.Url.ToString) + ' 2016 YF, wsSYS.EnableDecompression = True + ' 2016 YF, OutXml = wsSYS.LoadBin(InXml) + OutXml = InvokeSrv("wsSYS.LoadBin", InXml) + + ' 2016 YF, wsSYS.Dispose() + + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + strSysBin = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadbin").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadbin").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadbin").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + If Not dsWIP.Tables(strSysBin) Is Nothing Then + dvSysBin = dsWIP.Tables(strSysBin).DefaultView + + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + End Try + + End Sub + + + Private Sub funLoadGoodBinState() + + '先判斷DS中是否已有相同名稱的資料表,若有需先remove,否則會有錯誤 + If Not IsNothing(dsWIP.Tables(strBinState)) Then + dsWIP.Tables.Remove(strBinState) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, UserId, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsWIP.LoadGoodBinState(InXml) + OutXml = InvokeSrv("wsWIP.LoadGoodBinState", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + strBinState = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadgoodbinstate").Item(0).SelectNodes("name").Item(0).InnerXml + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadgoodbinstate").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsWIP.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadgoodbinstate").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsWIP.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + iGoodBinStateQty = 0 + If dsWIP.Tables(strBinState).Rows.Count > 0 Then + For Each drTemp As DataRow In dsWIP.Tables(strSysBin).Rows + iGoodBinStateQty += CInt(dsWIP.Tables(strBinState).Rows(0)(drTemp("BinNo").ToString)) + Next + End If + + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load Good Bin State of LotNo:" & LotNo & " Failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + + Finally + + End Try + + End Sub + +#End Region + + Private Function funGetLotStateIncludeData() As Integer + + funGetLotStateIncludeData = -1 + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, Now) + strParameter = CombineXMLParameter("lotno", "LotNo", "String", LotNo, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + OutXml = InvokeSrv("wsWIP.GetLotStateIncludeData", InXml) + + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '取出ShiftNo + If XmlDoc.GetElementsByTagName("havecomponent").Item(0).SelectNodes("value").Count > 0 Then + HaveComponent = XmlDoc.DocumentElement.GetElementsByTagName("havecomponent").Item(0).SelectNodes("value").Item(0).InnerText + End If + If XmlDoc.GetElementsByTagName("havelevel").Item(0).SelectNodes("value").Count > 0 Then + HaveLevel = XmlDoc.DocumentElement.GetElementsByTagName("havelevel").Item(0).SelectNodes("value").Item(0).InnerText + End If + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Function + End If + + XmlDoc = Nothing + + Catch ex As iMESException.MESException + ExceptionManager.iMESShowDialog(ex.ErrorCode, ex.Message, ex.StackTrace) + Exit Function + Catch ex As Exception + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + Exit Function + End Try + + funGetLotStateIncludeData = 0 + + End Function + + +#Region "自動計算GoodQty、LossQty的數量" + Private Sub iugKeyIn_iMESUltraGrid_AfterCellActivate(sender As Object, e As EventArgs) Handles iugKeyIn.iMESUltraGrid_AfterCellActivate + + If funGetParameter("SysInfo", "CalculateQty") = 1 Then + Dim drSelError() As DataRow + Dim decScrapQty As Decimal = 0 + Dim decLossQty As Decimal = 0 + drSelError = dtKeyIn.Select("AttribNo = 'LossQty'") + If drSelError.Length <> 0 Then + If IsNumeric(drSelError(0)("AttribValue")) Then + decLossQty = drSelError(0)("AttribValue") + End If + End If + drSelError = dsWIP.Tables(tblOPError).Select("ReasonType=0 And CheckFlag=" & True) + For i As Integer = 0 To drSelError.Length - 1 + decScrapQty = decScrapQty + drSelError(i)("ErrorQty") + Next + drSelError = dtKeyIn.Select("AttribNo = 'ScrapQty'") + If drSelError.Length <> 0 Then + drSelError(0)("AttribValue") = decScrapQty + End If + drSelError = dtKeyIn.Select("AttribNo = 'GoodQty'") + Dim blnCalulate As Boolean = True '0111211: [49-1]扫脚_check-out_bin分布调整,若有bin分佈調整, 則不自動計算GoodQty + If drSelError.Length <> 0 Then + If HaveLevel AndAlso iGoodBinStateQty <> 0 Then + If Not IsNothing(dtBinNew) AndAlso dtBinNew.Rows.Count > 0 Then + blnCalulate = False + End If + End If + If blnCalulate Then + drSelError(0)("AttribValue") = CDec(txtCurQty.Text) - decScrapQty - decLossQty + End If + End If + End If + + End Sub +#End Region + + + Private Sub uegMaterial_KeyIn2_ExpandedStateChanged(sender As Object, e As EventArgs) Handles uegMaterial_KeyIn2.ExpandedStateChanged, uegAttrib_Equipment.ExpandedStateChanged + + If uegMaterial_KeyIn2.Expanded Then + + If uegAttrib_Equipment.Expanded Then + uegMaterial_KeyIn2.Size = New System.Drawing.Size(uegMaterial_KeyIn2.Width, ((uplAll.Height - uegLotInfo.Height) / 3) * 2 - 10) + uegAttrib_Equipment.Size = New System.Drawing.Size(uegAttrib_Equipment.Width, ((uplAll.Height - uegLotInfo.Height) / 3) - 10) + End If + + Else + + If uegAttrib_Equipment.Expanded Then + uegAttrib_Equipment.Size = New System.Drawing.Size(uegAttrib_Equipment.Width, uplAll.Height - uegLotInfo.Height - 20) + End If + + End If + + End Sub +#Region "'//^_^ADD BY H-14278 2023-12-29 新设备上料" + Private Sub funLoadMOMaterialList(ByVal MONo As String, ByVal OPNo As String) '//取出MO MaterialList資料 + + If Not IsNothing(dsOE.Tables(strMOList)) Then '修正用料清單多次查詢重複計算問題 + dsOE.Tables.Remove(strMOList) + End If + + '組InXml的字串 + strIdentity = CombineXMLIdentity(gComputerName, gUserNo, GetNow()) + strParameter = CombineXMLParameter("mono", "MONo", "String", MONo.ToUpper, "") + strParameter += CombineXMLParameter("opno", "OPNo", "String", OPNo.ToUpper, "") + InXml = CombineXMLRequest(strIdentity, strParameter) + + Try + ' 2016 YF, OutXml = wsOE.LoadMOMaterialListJoinMOBasis(InXml) + OutXml = InvokeSrv("wsOE.LoadMOMaterialListJoinMOBasis", InXml) + + '利用XmlDoc物件處理ReturnValue + Dim XmlDoc As New XmlDocument + XmlDoc.LoadXml(OutXml) + If ChkExecutionSuccess(XmlDoc) Then + '讀取取出資料表之名稱 + + strMOList = XmlDoc.GetElementsByTagName("returnvalue").Item(0).SelectNodes("loadmomateriallistjoinmobasis").Item(0).SelectNodes("name").Item(0).InnerXml + '取出Schema,dataset讀取Schema可防止Null Field及DateTime的問題 + XmlSchema = XmlDoc.DocumentElement.GetElementsByTagName("loadmomateriallistjoinmobasis").Item(0).SelectNodes("schema").Item(0).InnerXml + If XmlSchema <> "" Then + '將XML讀入String Reader object中,因為Dataset讀入XML時必須透過String Reader物件 + tmpStringReader = New System.IO.StringReader(XmlSchema) + dsOE.ReadXmlSchema(tmpStringReader) + tmpStringReader.Close() + End If + '取出Data + XmlData = XmlDoc.DocumentElement.GetElementsByTagName("loadmomateriallistjoinmobasis").Item(0).SelectNodes("value").Item(0).InnerXml + If XmlData <> "" Then + tmpStringReader = New System.IO.StringReader(XmlData) + dsOE.ReadXml(tmpStringReader, XmlReadMode.InferSchema) + tmpStringReader.Close() + End If + + XmlDoc = Nothing + Else + ExceptionManager.iMESShowDialog(GetExceptionCode(XmlDoc), GetExceptionSysMsg(XmlDoc), GetExceptionStack(XmlDoc)) + Exit Sub + End If + + Catch ex As Exception + 'MsgBox("Unexpected Error. Load MO Material List Failed," & e1.Message, MsgBoxStyle.Exclamation) + ExceptionManager.iMESShowDialog(defWinErrCode, ex.Message, ex.StackTrace) + + Finally + tmpStringReader = Nothing + End Try + + End Sub + +#End Region + +End Class + diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBinStateAdjust .resx b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBinStateAdjust .resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBinStateAdjust .resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBinStateAdjust .vb b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBinStateAdjust .vb new file mode 100644 index 0000000..4b00afa --- /dev/null +++ b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/frmBinStateAdjust .vb @@ -0,0 +1,410 @@ +Imports iMESExceptionManager + +Public Class frmBinStateAdjust + + Inherits System.Windows.Forms.Form + + '//Public Variables + Public LotNo As String = defString + Public dvSysBin As DataView + Public dtGoodBin As DataTable + Public dtBinNew As DataTable + Public PrivFunNo As String = defString + + '//資料表相關變數 + + Dim drSel As DataRow() + Dim drAdd As DataRow + + '//控制項物件 + + Dim lblBinNo() As Label + Dim txtOBin() As TextBox + ' Dim txtBin_R() As TextBox '剩餘 + Dim txtBin_S() As TextBox 'Split + + '//其他共用變數 + Dim aryRBin() As Long + Dim intCount As Integer + Dim i, j As Integer + Friend WithEvents lblOnlyAllowOrgBinSub As Label + +#Region " Windows Form 設計工具產生的程式碼 " + + Public Sub New() + MyBase.New() + + '此呼叫為 Windows Form 設計工具的必要項。 + + InitializeComponent() + + '在 InitializeComponent() 呼叫之後加入所有的初始設定 + + End Sub + + 'Form 覆寫 Dispose 以清除元件清單。 + + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing Then + If Not (components Is Nothing) Then + components.Dispose() + End If + End If + MyBase.Dispose(disposing) + End Sub + + '為 Windows Form 設計工具的必要項 + Private components As System.ComponentModel.IContainer + + '注意: 以下為 Windows Form 設計工具所需的程序 + + '您可以使用 Windows Form 設計工具進行修改。 + + '請勿使用程式碼編輯器來修改這些程序。 + + Friend WithEvents pnlBin As System.Windows.Forms.Panel + Friend WithEvents LineFrame1 As iMESWizards.LineFrame + Friend WithEvents lblOrgBinState As System.Windows.Forms.Label + Friend WithEvents lblFinalBinState As System.Windows.Forms.Label + Friend WithEvents btnConfirm As Infragistics.Win.Misc.UltraButton + Friend WithEvents btnClose As Infragistics.Win.Misc.UltraButton + Private Sub InitializeComponent() + Me.pnlBin = New System.Windows.Forms.Panel() + Me.lblFinalBinState = New System.Windows.Forms.Label() + Me.LineFrame1 = New iMESWizards.LineFrame() + Me.lblOrgBinState = New System.Windows.Forms.Label() + Me.btnConfirm = New Infragistics.Win.Misc.UltraButton() + Me.btnClose = New Infragistics.Win.Misc.UltraButton() + Me.lblOnlyAllowOrgBinSub = New System.Windows.Forms.Label() + Me.pnlBin.SuspendLayout() + Me.SuspendLayout() + ' + 'pnlBin + ' + Me.pnlBin.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.pnlBin.AutoScroll = True + Me.pnlBin.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D + Me.pnlBin.Controls.Add(Me.lblFinalBinState) + Me.pnlBin.Controls.Add(Me.LineFrame1) + Me.pnlBin.Controls.Add(Me.lblOrgBinState) + Me.pnlBin.Location = New System.Drawing.Point(16, 41) + Me.pnlBin.Name = "pnlBin" + Me.pnlBin.Size = New System.Drawing.Size(696, 128) + Me.pnlBin.TabIndex = 106 + ' + 'lblFinalBinState + ' + Me.lblFinalBinState.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblFinalBinState.Location = New System.Drawing.Point(16, 53) + Me.lblFinalBinState.Name = "lblFinalBinState" + Me.lblFinalBinState.Size = New System.Drawing.Size(80, 15) + Me.lblFinalBinState.TabIndex = 79 + Me.lblFinalBinState.Text = "FinalBinState" + Me.lblFinalBinState.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'LineFrame1 + ' + Me.LineFrame1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LineFrame1.Location = New System.Drawing.Point(0, 23) + Me.LineFrame1.Name = "LineFrame1" + Me.LineFrame1.Size = New System.Drawing.Size(692, 4) + Me.LineFrame1.TabIndex = 78 + Me.LineFrame1.Text = "LineFrame1" + ' + 'lblOrgBinState + ' + Me.lblOrgBinState.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOrgBinState.Location = New System.Drawing.Point(16, 30) + Me.lblOrgBinState.Name = "lblOrgBinState" + Me.lblOrgBinState.Size = New System.Drawing.Size(80, 15) + Me.lblOrgBinState.TabIndex = 76 + Me.lblOrgBinState.Text = "OrgBinState" + Me.lblOrgBinState.TextAlign = System.Drawing.ContentAlignment.TopRight + ' + 'btnConfirm + ' + Me.btnConfirm.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnConfirm.Location = New System.Drawing.Point(544, 186) + Me.btnConfirm.Name = "btnConfirm" + Me.btnConfirm.Size = New System.Drawing.Size(80, 32) + Me.btnConfirm.TabIndex = 114 + Me.btnConfirm.Text = "Confirm" + ' + 'btnClose + ' + Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnClose.Location = New System.Drawing.Point(632, 186) + Me.btnClose.Name = "btnClose" + Me.btnClose.Size = New System.Drawing.Size(80, 32) + Me.btnClose.TabIndex = 113 + Me.btnClose.Text = "Close" + ' + 'lblOnlyAllowOrgBinSub + ' + Me.lblOnlyAllowOrgBinSub.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblOnlyAllowOrgBinSub.ForeColor = System.Drawing.Color.Red + Me.lblOnlyAllowOrgBinSub.Location = New System.Drawing.Point(15, 9) + Me.lblOnlyAllowOrgBinSub.Name = "lblOnlyAllowOrgBinSub" + Me.lblOnlyAllowOrgBinSub.Size = New System.Drawing.Size(231, 29) + Me.lblOnlyAllowOrgBinSub.TabIndex = 115 + Me.lblOnlyAllowOrgBinSub.Text = "OrgBin sub Qty only" + Me.lblOnlyAllowOrgBinSub.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'frmBinStateAdjust + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14) + Me.ClientSize = New System.Drawing.Size(728, 228) + Me.ControlBox = False + Me.Controls.Add(Me.lblOnlyAllowOrgBinSub) + Me.Controls.Add(Me.btnConfirm) + Me.Controls.Add(Me.btnClose) + Me.Controls.Add(Me.pnlBin) + Me.Font = New System.Drawing.Font("Times New Roman", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "frmBinStateAdjust" + Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "BinStateAdjust " + Me.pnlBin.ResumeLayout(False) + Me.ResumeLayout(False) + + End Sub + +#End Region + + Private Sub frmLotSplit_BinAssign_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load + + Cursor.Current = Cursors.WaitCursor + + If LotNo = defString Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "[%LotNo%]"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + If dtGoodBin Is Nothing Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200001", "GoodBin state"), MsgBoxStyle.Exclamation, Me.Text) + Exit Sub + End If + + Call funCreateBin() + + Call ExeChangeResource(Me, gLanguageMode) '語系切換 + lblOnlyAllowOrgBinSub.ForeColor = Color.Red + '群組權限控管 + 'ExeGroupControlPriv(Me, PrivFunNo) + + Cursor.Current = Cursors.Default + + End Sub + + Private Sub frmLotSplit_BinAssign_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated + + If Not txtBin_S Is Nothing Then txtBin_S(0).Focus() + + End Sub + + + '//Private Sub or Function------------------------------------------------------------------------------------------------- + Private Function funCreateBin() + + If dvSysBin Is Nothing Then Exit Function + dvSysBin.Sort = "BinOrder, BinNo" + intCount = dvSysBin.Count + + '重新宣告物件陣列 + ReDim lblBinNo(intCount - 1) + ReDim txtOBin(intCount - 1) + 'ReDim txtBin_R(intCount - 1) + ReDim txtBin_S(intCount - 1) + + Dim fFont As New Font("Times New Roman", 9) + Dim x, y As Long + + x = 0 + y = 0 + For i = 0 To intCount - 1 + 'BinNo + lblBinNo(i) = New Label + lblBinNo(i).Location = New System.Drawing.Point(104 + x, 6) + lblBinNo(i).Size = New System.Drawing.Size(40, 16) + lblBinNo(i).ForeColor = System.Drawing.Color.Blue + lblBinNo(i).Font = fFont + lblBinNo(i).Text = "Bin" & Mid(dvSysBin.Item(i)("BinNo"), 4) + lblBinNo(i).Tag = dvSysBin.Item(i)("BinNo") 'BinNo + lblBinNo(i).TextAlign = ContentAlignment.TopCenter + pnlBin.Controls.Add(lblBinNo(i)) + + 'GoodBin + txtOBin(i) = New TextBox + txtOBin(i).Location = New System.Drawing.Point(104 + x, 28) + txtOBin(i).Size = New System.Drawing.Size(40, 21) + txtOBin(i).Text = 0 + txtOBin(i).ReadOnly = True + txtOBin(i).TextAlign = HorizontalAlignment.Right + txtOBin(i).TabIndex = i + + pnlBin.Controls.Add(txtOBin(i)) + AddHandler txtOBin(i).KeyPress, AddressOf Me.txtValue_KeyPress + AddHandler txtOBin(i).Enter, AddressOf Me.txtValue_Enter + AddHandler txtOBin(i).TextChanged, AddressOf Me.txtValue_TextChanged + + '剩餘Bin + 'txtBin_R(i) = New TextBox + 'txtBin_R(i).Location = New System.Drawing.Point(104 + x, 50) + 'txtBin_R(i).Size = New System.Drawing.Size(40, 21) + 'txtBin_R(i).Text = 0 + 'txtBin_R(i).ReadOnly = True + 'txtBin_R(i).TextAlign = HorizontalAlignment.Right + 'txtBin_R(i).TabIndex = i + intCount + ' + 'pnlBin.Controls.Add(txtBin_R(i)) + 'AddHandler txtBin_R(i).KeyPress, AddressOf Me.txtValue_KeyPress + 'AddHandler txtBin_R(i).Enter, AddressOf Me.txtValue_Enter + 'AddHandler txtBin_R(i).TextChanged, AddressOf Me.txtValue_TextChanged + + 'SplitBin + txtBin_S(i) = New TextBox + txtBin_S(i).Location = New System.Drawing.Point(104 + x, 53) + txtBin_S(i).Size = New System.Drawing.Size(40, 21) + txtBin_S(i).Text = 0 + txtBin_S(i).TextAlign = HorizontalAlignment.Right + txtBin_S(i).TabIndex = i + (intCount * 2) + + pnlBin.Controls.Add(txtBin_S(i)) + AddHandler txtBin_S(i).KeyPress, AddressOf Me.txtValue_KeyPress + AddHandler txtBin_S(i).Enter, AddressOf Me.txtValue_Enter + AddHandler txtBin_S(i).TextChanged, AddressOf Me.txtValue_TextChanged + + x = x + 42 + Next + ReDim aryRBin(intCount - 1) + '將GoodBin資料放上 + If dtGoodBin.Rows.Count > 0 Then + For i = 0 To intCount - 1 + txtOBin(i).Text = dtGoodBin.Rows(0)(lblBinNo(i).Tag) + 'txtBin_R(i).Text = txtOBin(i).Text + aryRBin(i) = txtOBin(i).Text + + If (txtOBin(i).Text = "0") Then + txtBin_S(i).ReadOnly = True + End If + Next + End If + Dim bRE As Boolean = False + '顯示已Assign的BinValue + drSel = dtBinNew.Select("LotNo ='" & LotNo & "'") + If drSel.Length <> 0 Then + 'SplitBin + For i = 0 To intCount - 1 + If (txtBin_S(i).ReadOnly = True) Then + bRE = True + txtBin_S(i).ReadOnly = False + Else + bRE = False + End If + txtBin_S(i).Text = drSel(0)(lblBinNo(i).Tag) + + If (bRE = True) Then txtBin_S(i).ReadOnly = True + Next + End If + + '剩餘Bin + ' For i = 0 To dtBinNew.Rows.Count - 1 + ' If dtBinNew.Rows(i)("LotNo") <> LotNo Then + ' For j = 0 To intCount - 1 + ' If dtBinNew.Rows(i)(lblBinNo(j).Tag) <> 0 Then + ' aryRBin(j) = aryRBin(j) - CLng(dtBinNew.Rows(i)(lblBinNo(j).Tag)) + ' End If + ' Next + ' End If + ' Next + ' For i = 0 To intCount - 1 + ' txtBin_R(i).Text = aryRBin(i) + ' Next + + + + + End Function + + Private Sub txtValue_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) + sender.SelectAll() + End Sub + Private Sub txtValue_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) + If e.KeyChar = Convert.ToChar(13) Then + SendKeys.Send("{TAB}") + End If + End Sub + Private Sub txtValue_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) + 'btnSave.Enabled = False + End Sub + + Protected Overrides Sub Finalize() + MyBase.Finalize() + End Sub + + + Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click + gReturnKeyValue = "" + Me.Close() + End Sub + + + Private Sub btnConfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConfirm.Click + + Cursor.Current = Cursors.WaitCursor + + 'Check + For i = 0 To intCount - 1 + If Not IsNumeric(txtBin_S(i).Text) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200011", lblBinNo(i).Text & " [%MUST BE NUMERIC%]"), MsgBoxStyle.Exclamation, Me.Text) + txtBin_S(i).Focus() + Exit Sub + End If + + If (txtBin_S(i).ReadOnly = False) Then + If (CInt(txtBin_S(i).Text) < 0) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200017", lblBinNo(i).Text), MsgBoxStyle.Exclamation, Me.Text) + txtBin_S(i).Focus() + Exit Sub + End If + End If + + '輸入值不可大於剩餘Bin + If CLng(txtBin_S(i).Text) > CLng(txtOBin(i).Text) Then + iMESExceptionManager.ExceptionManager.iMESMsgBoxShowDialog(ChgTranslateName_Msg("0000-200060", "[%FinalBin%]:" & lblBinNo(i).Text & " must less than total numbers of OrgBin:" & lblBinNo(i).Text), MsgBoxStyle.Exclamation, Me.Text) + txtBin_S(i).Focus() + Exit Sub + End If + Next i + + '加入SplitBin + drSel = dtBinNew.Select("LotNo = '" & LotNo & "'") + If drSel.Length = 0 Then 'Add + drAdd = dtBinNew.NewRow + drAdd("LotNo") = LotNo + For i = 0 To intCount - 1 + drAdd(lblBinNo(i).Tag) = txtBin_S(i).Text + Next + dtBinNew.Rows.Add(drAdd) + Else 'Update + drSel(0).BeginEdit() + For i = 0 To intCount - 1 + drSel(0)(lblBinNo(i).Tag) = txtBin_S(i).Text + Next + drSel(0).EndEdit() + End If + + + gReturnKeyValue = LotNo '做為判斷是否變更的Flag + + Cursor.Current = Cursors.Default + + Me.Close() + End Sub +End Class + diff --git a/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/iMES.snk b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/iMES.snk new file mode 100644 index 0000000..4206cdc Binary files /dev/null and b/SRC/MESWin/SXS5/BR_L_CO_GEN_21681/iMES.snk differ