【修改】模板上传
This commit is contained in:
parent
07df048893
commit
a717192703
@ -1,129 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>
|
|
||||||
</ProductVersion>
|
|
||||||
<SchemaVersion>
|
|
||||||
</SchemaVersion>
|
|
||||||
<ProjectGuid>{8CC8664F-C718-0888-187B-600F20E362E0}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>MEStc_ABC</RootNamespace>
|
|
||||||
<AssemblyName>MEStc_ABC</AssemblyName>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<MyType>Windows</MyType>
|
|
||||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
|
||||||
<SccProjectName>SAK</SccProjectName>
|
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
|
||||||
<SccProvider>SAK</SccProvider>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<DefineDebug>true</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<OutputPath>..\MES_S_DLL\</OutputPath>
|
|
||||||
<DocumentationFile>..\MES_S_DLL\MEStc_ABC.xml</DocumentationFile>
|
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
|
||||||
<WarningLevel>0</WarningLevel>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<DefineDebug>false</DefineDebug>
|
|
||||||
<DefineTrace>true</DefineTrace>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DocumentationFile>bin\Release\
|
|
||||||
</DocumentationFile>
|
|
||||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
|
||||||
<WarningLevel>0</WarningLevel>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<OptionExplicit>On</OptionExplicit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<OptionCompare>Binary</OptionCompare>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<OptionStrict>Off</OptionStrict>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<OptionInfer>On</OptionInfer>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
|
||||||
<Reference Include="data_access_service, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\MES_S_DLL\data_access_service.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="iMESAppSetting, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\MES_S_DLL\iMESAppSetting.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="iMESComSubroutine, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\MES_S_DLL\iMESComSubroutine.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="iMESComXML, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\MES_S_DLL\iMESComXML.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="iMESConst, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\MES_S_DLL\iMESConst.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="iMESException">
|
|
||||||
<HintPath>..\..\MESSeries_2016\MES_S_DLL\iMESException.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="iMESLog, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\MES_S_DLL\iMESLog.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.configuration" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Import Include="Microsoft.VisualBasic" />
|
|
||||||
<Import Include="System" />
|
|
||||||
<Import Include="System.Collections" />
|
|
||||||
<Import Include="System.Collections.Generic" />
|
|
||||||
<Import Include="System.Data" />
|
|
||||||
<Import Include="System.Diagnostics" />
|
|
||||||
<Import Include="System.Linq" />
|
|
||||||
<Import Include="System.Xml.Linq" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="tcWIP\clsLot.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="shared file\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
<Import Project="..\MESWin\shared file\MakeVersion_CS.targets" Condition="exists('..\MESWin\shared file\MakeVersion_CS.targets')" />
|
|
||||||
</Project>
|
|
@ -1,10 +0,0 @@
|
|||||||
""
|
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 14
|
|
||||||
VisualStudioVersion = 14.0.25420.1
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MEStc_ABC", "MEStc_ABC.csproj", "{8CC8664F-C718-0888-187B-600F20E362E0}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{8CC8664F-C718-0888-187B-600F20E362E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8CC8664F-C718-0888-187B-600F20E362E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8CC8664F-C718-0888-187B-600F20E362E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8CC8664F-C718-0888-187B-600F20E362E0}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(TeamFoundationVersionControl) = preSolution
|
|
||||||
SccNumberOfProjects = 2
|
|
||||||
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
|
||||||
SccTeamFoundationServer = http://tfs.imestech.com:8080/tfs/messeries6
|
|
||||||
SccLocalPath0 = .
|
|
||||||
SccProjectUniqueName1 = MEStc_ABC.csproj
|
|
||||||
SccLocalPath1 = .
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,32 +0,0 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// 組件的一般資訊是由下列的屬性集控制。
|
|
||||||
// 變更這些屬性的值即可修改組件的相關
|
|
||||||
// 資訊。
|
|
||||||
[assembly: AssemblyTitle("MEStc_ABC.Properties")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("iMES Technology Inc.")]
|
|
||||||
[assembly: AssemblyProduct("MESSeries 6")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright iMES Technology Inc.")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// 將 ComVisible 設定為 false 會使得這個組件中的類型
|
|
||||||
// 對 COM 元件而言為不可見。如果您需要從 COM 存取這個組件中
|
|
||||||
// 的類型,請在該類型上將 ComVisible 屬性設定為 true。
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
|
|
||||||
[assembly: Guid("00eb00ee-1246-48cf-a0bf-f5203de255f1")]
|
|
||||||
|
|
||||||
// 組件的版本資訊由下列四個值所組成:
|
|
||||||
//
|
|
||||||
// 主要版本
|
|
||||||
// 次要版本
|
|
||||||
// 組建編號
|
|
||||||
// 修訂編號
|
|
||||||
//
|
|
||||||
[assembly: AssemblyVersion("6.0.0.0")]
|
|
@ -1,337 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.Common;
|
|
||||||
using Microsoft.VisualBasic;
|
|
||||||
using static iMESCore.Base.iMESComSubroutine;
|
|
||||||
using static iMESCore.Base.iMESComXML;
|
|
||||||
using static iMESCore.Base.iMESConst;
|
|
||||||
using static iMESCore.DataBase.iMESSql;
|
|
||||||
using iMESCore.Settings;
|
|
||||||
|
|
||||||
namespace MEStc_ABC
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public class clsLot : IDisposable
|
|
||||||
{
|
|
||||||
/*不使用modXX,不再使用OleDb
|
|
||||||
* 資料庫相關(建立連線/讀取資料/異動資料),使用data_access_service.dll
|
|
||||||
* 設定檔相關,使用iMESAppSetting
|
|
||||||
* Xml相關,使用iMESComXML.dll
|
|
||||||
* 常數相關,使用iMESConst.dll
|
|
||||||
* 簡易副程式,使用iMESComSubroutine.dll
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
private AppSettings objSetting = new AppSettings();
|
|
||||||
private string strConnectionString; // Connection string
|
|
||||||
private string strDataBaseType; // DataBase Type:oracle, mysql, access
|
|
||||||
private string strMQType; // MessageQueue Type:TIBCO, MQSeries, MSMQ
|
|
||||||
private bool disposed = false; // To detect redundant calls
|
|
||||||
private string strSQL = "";
|
|
||||||
|
|
||||||
#region --- Initial Object ---
|
|
||||||
|
|
||||||
public clsLot()
|
|
||||||
{
|
|
||||||
// Get database type
|
|
||||||
strDataBaseType = objSetting.GetDataBaseType();
|
|
||||||
// Get connection string
|
|
||||||
strConnectionString = objSetting.GetConnectionString(strDataBaseType);
|
|
||||||
// Get Message Queue Type
|
|
||||||
strMQType = objSetting.GetMQType();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Property ---
|
|
||||||
|
|
||||||
// //Property--------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
public string ConnectionString
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return strConnectionString;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string DataBaseType
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return strDataBaseType;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string MQType
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return strMQType;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2003/03/22,sammi.
|
|
||||||
// 因TC可能呼叫KC,在整個Function中,必須要使用同一個Reverse物件,如此在產生AddReverseUpdateContent的資料時,ReverseOrder才不會重覆.
|
|
||||||
// 若KC再往下呼叫UD,則必須將Reverse物件傳遞予UD.
|
|
||||||
//public object ReverseObj
|
|
||||||
//{
|
|
||||||
// get
|
|
||||||
// {
|
|
||||||
// //return objReverse;
|
|
||||||
// // ReverseObj = objReverse
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Support
|
|
||||||
private bool disposedValue; // 偵測多餘的呼叫
|
|
||||||
|
|
||||||
// IDisposable
|
|
||||||
protected virtual void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (!disposedValue)
|
|
||||||
{
|
|
||||||
if (disposing)
|
|
||||||
{
|
|
||||||
// TODO: 處置 Managed 狀態 (Managed 物件)。
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: 釋放 Unmanaged 資源 (Unmanaged 物件) 並覆寫下面的 Finalize()。
|
|
||||||
// TODO: 將大型欄位設定為 null。
|
|
||||||
}
|
|
||||||
disposedValue = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: 只有當上面的 Dispose(ByVal disposing As Boolean) 有可釋放 Unmanaged 資源的程式碼時,才覆寫 Finalize()。
|
|
||||||
// Protected Overrides Sub Finalize()
|
|
||||||
// ' 請勿變更此程式碼。在上面的 Dispose(ByVal disposing As Boolean) 中輸入清除程式碼。
|
|
||||||
// Dispose(False)
|
|
||||||
// MyBase.Finalize()
|
|
||||||
// End Sub
|
|
||||||
|
|
||||||
// 由 Visual Basic 新增此程式碼以正確實作可處置的模式。
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
// 請勿變更此程式碼。在以上的 Dispose 置入清除程式碼 (ByVal 視為布林值處置)。
|
|
||||||
Dispose(true);
|
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
public string LoadOPType(string OPType = defString, int IssueState = defInteger, string AdditionalXml = "")
|
|
||||||
{
|
|
||||||
string LoadOPTypeRet = null;
|
|
||||||
// 此 Function 將資料以XML方式取出
|
|
||||||
// 傳入值: 索引值
|
|
||||||
// 傳回值: XML(成功), fail(失敗)
|
|
||||||
|
|
||||||
|
|
||||||
DataSet dsOP = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
dsOP = ShowOPType(OPType, IssueState, AdditionalXml);
|
|
||||||
|
|
||||||
// //Combine return value
|
|
||||||
LoadOPTypeRet = CombineXMLReturnValue("loadoptype", "OPType", "DataSet", FormatXMLSchema(dsOP.GetXmlSchema()), dsOP.GetXml(), "");
|
|
||||||
}
|
|
||||||
|
|
||||||
catch (Exception e1)
|
|
||||||
{
|
|
||||||
LoadOPTypeRet = "fail";
|
|
||||||
throw;
|
|
||||||
} // New Exception("kcOP.LoadOPType: " & e1.Message)
|
|
||||||
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (dsOP != null)
|
|
||||||
{
|
|
||||||
dsOP.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return LoadOPTypeRet;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataSet ShowOPType(string OPType = defString, int IssueState = defInteger, string AdditionalXml = "")
|
|
||||||
{
|
|
||||||
DataSet ShowOPTypeRet = null;
|
|
||||||
|
|
||||||
// 此 Function 將資料以 Dataset 方式取出
|
|
||||||
// 傳入值: 索引值
|
|
||||||
// 傳回值: Dataset(成功), Nothing(失敗)
|
|
||||||
|
|
||||||
|
|
||||||
DataSet dsOP = null;
|
|
||||||
IDbConnection cnnTemp = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// //Create connection
|
|
||||||
cnnTemp = CreateConnection(strConnectionString);
|
|
||||||
|
|
||||||
strSQL = "Select * From tblOPType Where OPType Is Not Null";
|
|
||||||
if (OPType != defString)
|
|
||||||
{
|
|
||||||
strSQL = strSQL + " And OPType = '" + OPType + "'";
|
|
||||||
}
|
|
||||||
if (IssueState != defInteger)
|
|
||||||
{
|
|
||||||
strSQL = strSQL + " And IssueState = " + IssueState;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(AdditionalXml))
|
|
||||||
{
|
|
||||||
// 加上additional的condition
|
|
||||||
strSQL = strSQL + SeparateAddXML_Condition(AdditionalXml);
|
|
||||||
}
|
|
||||||
|
|
||||||
// //Select data
|
|
||||||
dsOP = new DataSet();
|
|
||||||
ExecuteSQLQuery_Adapter(strSQL, dsOP, "OPType", cnnTemp);
|
|
||||||
|
|
||||||
// //Return data
|
|
||||||
ShowOPTypeRet = dsOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
catch (Exception e1)
|
|
||||||
{
|
|
||||||
ShowOPTypeRet = null;
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
CloseConnection(cnnTemp);
|
|
||||||
if (dsOP != null)
|
|
||||||
{
|
|
||||||
dsOP.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ShowOPTypeRet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataRow GetOPType(string OPType = defString, int IssueState = defInteger, string AdditionalXml = "")
|
|
||||||
{
|
|
||||||
DataRow GetOPTypeRet = null;
|
|
||||||
// 此 Function 將資料以XML方式取出
|
|
||||||
// 傳入值: 索引值
|
|
||||||
// 傳回值: XML(成功), fail(失敗)
|
|
||||||
|
|
||||||
|
|
||||||
DataSet dsOP = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
dsOP = ShowOPType(OPType, IssueState, AdditionalXml);
|
|
||||||
|
|
||||||
// //Return data
|
|
||||||
if (dsOP.Tables[0].Rows.Count > 0)
|
|
||||||
{
|
|
||||||
GetOPTypeRet = dsOP.Tables[0].Rows[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GetOPTypeRet = dsOP.Tables[0].NewRow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
catch (Exception e1)
|
|
||||||
{
|
|
||||||
GetOPTypeRet = null;
|
|
||||||
throw;
|
|
||||||
} // New Exception("kcOP.LoadOPType: " & e1.Message)
|
|
||||||
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (dsOP != null)
|
|
||||||
{
|
|
||||||
dsOP.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetOPTypeRet;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public string BR_CheckIn(long LotStamp, string LotNo, string LinkName, DataTable dtAttrib, DataTable dtEquipment, string UserNo, string ShiftNo,
|
|
||||||
string LotRecord = defString, DateTime CheckInTime = default(DateTime), string RuleNo = "", DataTable dtLoginState = null, DataTable dtAccessory = null,
|
|
||||||
DataTable dtMTLLot = null, string LanguageMode = defString)
|
|
||||||
{
|
|
||||||
string BR_CheckInRet = default(string);
|
|
||||||
// 此 Function 將更新CheckIn Data
|
|
||||||
// 傳入值: LotNo,dtAttrib,dtEquipment
|
|
||||||
// 傳回值: success(成功), fail(失敗)
|
|
||||||
|
|
||||||
IDbConnection cnnTemp = null;
|
|
||||||
DbDataReader drTemp;
|
|
||||||
var CollectionSQL = new Collection();
|
|
||||||
var CollectionSQL_Rows = new Collection();
|
|
||||||
string strSQL = "";
|
|
||||||
|
|
||||||
string LotSerial, OPNo, BRNo, SerialNo, LogGroupSerial, BaseLotNo, CurQTY;
|
|
||||||
int PhaseNo;
|
|
||||||
DateTime datEventTime;
|
|
||||||
long lngLotStamp;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// //Create connection
|
|
||||||
cnnTemp = CreateConnection(strConnectionString);
|
|
||||||
|
|
||||||
// 1.取出Temp LotState的資料
|
|
||||||
strSQL = "Select A.LotSerial,A.OPNo,A.SerialNo,B.BRNo,B.LogGroupSerial,B.LotStamp,B.BaseLotNo,B.CurQTY,B.PhaseNo " +
|
|
||||||
" From tblWIPTemp_LotState A, tblWIPLotState B " + " Where A.LotNo ='" + LotNo + "'" + " And A.LotNo = B.LotNo ";
|
|
||||||
// cmmTemp = New OleDb.OleDbCommand(strSQL, cnnTemp)
|
|
||||||
drTemp = ExecuteSQLQuery_Reader(strSQL, cnnTemp);
|
|
||||||
if (drTemp.Read())
|
|
||||||
{
|
|
||||||
LotSerial = drTemp["LotSerial"].ToString();
|
|
||||||
OPNo = drTemp["OPNo"].ToString();
|
|
||||||
SerialNo = drTemp["SerialNo"].ToString();
|
|
||||||
BRNo = drTemp["BRNo"].ToString();
|
|
||||||
LogGroupSerial = drTemp["LogGroupSerial"].ToString();
|
|
||||||
lngLotStamp = Convert.ToInt64(drTemp["LotStamp"]);
|
|
||||||
BaseLotNo = drTemp["BaseLotNo"].ToString();
|
|
||||||
CurQTY = drTemp["CurQTY"].ToString();
|
|
||||||
PhaseNo = Convert.ToInt32(drTemp["PhaseNo"]); // 2020/11/20 Steven Mantis: 0082084: [PAD]eRunCard_調整 BR 生產記錄
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new iMESException.MESException("0000-202003", "[%LotNo%] : " + LotNo);
|
|
||||||
}
|
|
||||||
drTemp.Close();
|
|
||||||
|
|
||||||
|
|
||||||
// 呼叫執行SQL指令
|
|
||||||
ExecuteSQLNoneQuery_ChkRowCount(strDataBaseType, strConnectionString, CollectionSQL, CollectionSQL_Rows);
|
|
||||||
|
|
||||||
// //Return success
|
|
||||||
BR_CheckInRet = "success";
|
|
||||||
}
|
|
||||||
|
|
||||||
catch (Exception e1)
|
|
||||||
{
|
|
||||||
BR_CheckInRet = "fail";
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
CloseConnection(cnnTemp);
|
|
||||||
|
|
||||||
}
|
|
||||||
return BR_CheckInRet;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user