From 82f6238ba410ce220ebf6f010472bbef9241d90d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BF=B1=20=E6=B2=88?= <2401809606@qq.com>
Date: Thu, 13 Jan 2022 21:53:38 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Alarms.cs | 29 +
App.config | 27 +
App.xaml | 7 +
App.xaml.cs | 17 +
Audit.csproj | 445 +++
Audit.sln | 25 +
AuxDslvQueue.cs | 29 +
AuxDslvQueueHistory.cs | 29 +
BatchDyeingCentral.Context.cs | 94 +
BatchDyeingCentral.Context.tt | 636 ++++
BatchDyeingCentral.Designer.cs | 10 +
BatchDyeingCentral.cs | 9 +
BatchDyeingCentral.edmx | 5268 ++++++++++++++++++++++++++++++
BatchDyeingCentral.edmx.diagram | 77 +
BatchDyeingCentral.tt | 733 +++++
BucketInfo.cs | 24 +
BucketShelf.cs | 32 +
BucketShelfHistory.cs | 32 +
BucketShelfQueue.cs | 29 +
BucketShelfQueueHistory.cs | 29 +
CHEMICAL_QUEUE.cs | 27 +
CleanDevice.cs | 21 +
Customize.cs | 23 +
DYESTUFF_QUEUE.cs | 27 +
Delays.cs | 28 +
DispenserEvent.cs | 33 +
DispenserLifeStatus.cs | 21 +
DispenserUtilization.cs | 22 +
Dispensers.cs | 34 +
DyelotBucketSummary.cs | 24 +
DyelotBuckets.cs | 28 +
DyelotBucketsHistory.cs | 28 +
DyelotDetail.cs | 40 +
DyelotDslvQueue.cs | 29 +
DyelotDslvQueueHistory.cs | 29 +
DyelotHead.cs | 65 +
DyelotHistories.cs | 21 +
Dyelots.cs | 83 +
DyelotsBatch.cs | 38 +
DyelotsBulkedRecipe.cs | 82 +
DyelotsBulkedRecipeHistory.cs | 68 +
DyelotsByShift.cs | 27 +
DyelotsHistory.cs | 52 +
DyelotsInAuto.cs | 26 +
DyelotsInAutoHistory.cs | 26 +
EventList.cs | 23 +
JOBTKT.cs | 24 +
LA571Tanks.cs | 23 +
LabDyeDslvQueue.cs | 27 +
LabDyeDslvQueueHistory.cs | 27 +
MachineState.cs | 41 +
MachineStateHistory.cs | 42 +
Machines.cs | 115 +
MachinesHistory.cs | 46 +
MainWindow.xaml | 12 +
MainWindow.xaml.cs | 28 +
ManualWeightQueue.cs | 28 +
ManualWeightQueueHistory.cs | 28 +
POWDER_QUEUE.cs | 27 +
PartsStatus.cs | 32 +
PartsStatusHistory.cs | 32 +
PipeFill.cs | 27 +
PipeHistory.cs | 28 +
Pipes.cs | 31 +
Product.cs | 78 +
ProductInventory.cs | 22 +
ProductUsed.cs | 21 +
ProgramGroups.cs | 40 +
Programs.cs | 27 +
ProgramsUsed.cs | 29 +
Properties/AssemblyInfo.cs | 55 +
Properties/Resources.Designer.cs | 71 +
Properties/Resources.resx | 117 +
Properties/Settings.Designer.cs | 30 +
Properties/Settings.settings | 7 +
REMOTETERMINAL.cs | 25 +
RFIDRecordQueue.cs | 29 +
RFIDRecordQueueHistory.cs | 29 +
RecipeDeduct.cs | 29 +
RecipeDeductHistory.cs | 30 +
SampleDyeDslvQueue.cs | 28 +
SampleDyeDslvQueueHistory.cs | 28 +
SchedulingLog.cs | 26 +
Shelf.cs | 21 +
StepVisits.cs | 42 +
Steps.cs | 34 +
Stoppages.cs | 27 +
TEMPCHEMICALTKT.cs | 25 +
TEMPDYESTUFFTKT.cs | 25 +
TEMPPOWDER.cs | 25 +
TICKET_DETAIL.cs | 63 +
TagShelf.cs | 28 +
Ticket.Context.cs | 43 +
Ticket.Context.tt | 636 ++++
Ticket.Designer.cs | 10 +
Ticket.cs | 9 +
Ticket.edmx | 1103 +++++++
Ticket.edmx.diagram | 25 +
Ticket.tt | 733 +++++
TicketSerial.cs | 21 +
UserAccount.cs | 26 +
UserGroup.cs | 22 +
Users.cs | 20 +
ViewModel/MainViewModel.cs | 34 +
ViewModel/ViewModelLocator.cs | 61 +
WaitChemical.cs | 33 +
packages.config | 8 +
record.cs | 21 +
108 files changed, 12940 insertions(+)
create mode 100644 Alarms.cs
create mode 100644 App.config
create mode 100644 App.xaml
create mode 100644 App.xaml.cs
create mode 100644 Audit.csproj
create mode 100644 Audit.sln
create mode 100644 AuxDslvQueue.cs
create mode 100644 AuxDslvQueueHistory.cs
create mode 100644 BatchDyeingCentral.Context.cs
create mode 100644 BatchDyeingCentral.Context.tt
create mode 100644 BatchDyeingCentral.Designer.cs
create mode 100644 BatchDyeingCentral.cs
create mode 100644 BatchDyeingCentral.edmx
create mode 100644 BatchDyeingCentral.edmx.diagram
create mode 100644 BatchDyeingCentral.tt
create mode 100644 BucketInfo.cs
create mode 100644 BucketShelf.cs
create mode 100644 BucketShelfHistory.cs
create mode 100644 BucketShelfQueue.cs
create mode 100644 BucketShelfQueueHistory.cs
create mode 100644 CHEMICAL_QUEUE.cs
create mode 100644 CleanDevice.cs
create mode 100644 Customize.cs
create mode 100644 DYESTUFF_QUEUE.cs
create mode 100644 Delays.cs
create mode 100644 DispenserEvent.cs
create mode 100644 DispenserLifeStatus.cs
create mode 100644 DispenserUtilization.cs
create mode 100644 Dispensers.cs
create mode 100644 DyelotBucketSummary.cs
create mode 100644 DyelotBuckets.cs
create mode 100644 DyelotBucketsHistory.cs
create mode 100644 DyelotDetail.cs
create mode 100644 DyelotDslvQueue.cs
create mode 100644 DyelotDslvQueueHistory.cs
create mode 100644 DyelotHead.cs
create mode 100644 DyelotHistories.cs
create mode 100644 Dyelots.cs
create mode 100644 DyelotsBatch.cs
create mode 100644 DyelotsBulkedRecipe.cs
create mode 100644 DyelotsBulkedRecipeHistory.cs
create mode 100644 DyelotsByShift.cs
create mode 100644 DyelotsHistory.cs
create mode 100644 DyelotsInAuto.cs
create mode 100644 DyelotsInAutoHistory.cs
create mode 100644 EventList.cs
create mode 100644 JOBTKT.cs
create mode 100644 LA571Tanks.cs
create mode 100644 LabDyeDslvQueue.cs
create mode 100644 LabDyeDslvQueueHistory.cs
create mode 100644 MachineState.cs
create mode 100644 MachineStateHistory.cs
create mode 100644 Machines.cs
create mode 100644 MachinesHistory.cs
create mode 100644 MainWindow.xaml
create mode 100644 MainWindow.xaml.cs
create mode 100644 ManualWeightQueue.cs
create mode 100644 ManualWeightQueueHistory.cs
create mode 100644 POWDER_QUEUE.cs
create mode 100644 PartsStatus.cs
create mode 100644 PartsStatusHistory.cs
create mode 100644 PipeFill.cs
create mode 100644 PipeHistory.cs
create mode 100644 Pipes.cs
create mode 100644 Product.cs
create mode 100644 ProductInventory.cs
create mode 100644 ProductUsed.cs
create mode 100644 ProgramGroups.cs
create mode 100644 Programs.cs
create mode 100644 ProgramsUsed.cs
create mode 100644 Properties/AssemblyInfo.cs
create mode 100644 Properties/Resources.Designer.cs
create mode 100644 Properties/Resources.resx
create mode 100644 Properties/Settings.Designer.cs
create mode 100644 Properties/Settings.settings
create mode 100644 REMOTETERMINAL.cs
create mode 100644 RFIDRecordQueue.cs
create mode 100644 RFIDRecordQueueHistory.cs
create mode 100644 RecipeDeduct.cs
create mode 100644 RecipeDeductHistory.cs
create mode 100644 SampleDyeDslvQueue.cs
create mode 100644 SampleDyeDslvQueueHistory.cs
create mode 100644 SchedulingLog.cs
create mode 100644 Shelf.cs
create mode 100644 StepVisits.cs
create mode 100644 Steps.cs
create mode 100644 Stoppages.cs
create mode 100644 TEMPCHEMICALTKT.cs
create mode 100644 TEMPDYESTUFFTKT.cs
create mode 100644 TEMPPOWDER.cs
create mode 100644 TICKET_DETAIL.cs
create mode 100644 TagShelf.cs
create mode 100644 Ticket.Context.cs
create mode 100644 Ticket.Context.tt
create mode 100644 Ticket.Designer.cs
create mode 100644 Ticket.cs
create mode 100644 Ticket.edmx
create mode 100644 Ticket.edmx.diagram
create mode 100644 Ticket.tt
create mode 100644 TicketSerial.cs
create mode 100644 UserAccount.cs
create mode 100644 UserGroup.cs
create mode 100644 Users.cs
create mode 100644 ViewModel/MainViewModel.cs
create mode 100644 ViewModel/ViewModelLocator.cs
create mode 100644 WaitChemical.cs
create mode 100644 packages.config
create mode 100644 record.cs
diff --git a/Alarms.cs b/Alarms.cs
new file mode 100644
index 0000000..f5f9af3
--- /dev/null
+++ b/Alarms.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class Alarms
+ {
+ public int ID { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public string Machine { get; set; }
+ public string Name { get; set; }
+ public string Category { get; set; }
+ public string Variable { get; set; }
+ public System.DateTime StartTime { get; set; }
+ public System.DateTime EndTime { get; set; }
+ public double Duration { get; set; }
+ public string Shift { get; set; }
+ }
+}
diff --git a/App.config b/App.config
new file mode 100644
index 0000000..05a3a05
--- /dev/null
+++ b/App.config
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App.xaml b/App.xaml
new file mode 100644
index 0000000..ea76964
--- /dev/null
+++ b/App.xaml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App.xaml.cs b/App.xaml.cs
new file mode 100644
index 0000000..6d8abe8
--- /dev/null
+++ b/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace Audit
+{
+ ///
+ /// App.xaml 的交互逻辑
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/Audit.csproj b/Audit.csproj
new file mode 100644
index 0000000..025f47b
--- /dev/null
+++ b/Audit.csproj
@@ -0,0 +1,445 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {43516CC3-DB11-401F-AC40-94676C508BB9}
+ WinExe
+ Audit
+ Audit
+ v4.8
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ packages\CommonServiceLocator.2.0.6\lib\net48\CommonServiceLocator.dll
+
+
+ packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll
+
+
+ packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll
+
+
+ packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll
+
+
+ packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll
+
+
+ packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll
+
+
+
+
+
+
+
+ packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ True
+ True
+ BatchDyeingCentral.Context.tt
+
+
+ True
+ True
+ BatchDyeingCentral.tt
+
+
+ True
+ True
+ BatchDyeingCentral.edmx
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ Ticket.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ Ticket.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ Ticket.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ Ticket.tt
+
+
+ Ticket.tt
+
+
+ Ticket.tt
+
+
+ Ticket.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ Ticket.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ Ticket.tt
+
+
+ Ticket.tt
+
+
+ Ticket.tt
+
+
+ True
+ True
+ Ticket.Context.tt
+
+
+ True
+ True
+ Ticket.tt
+
+
+ True
+ True
+ Ticket.edmx
+
+
+ Ticket.tt
+
+
+ Ticket.tt
+
+
+ Ticket.tt
+
+
+ BatchDyeingCentral.tt
+
+
+ BatchDyeingCentral.tt
+
+
+
+
+ BatchDyeingCentral.tt
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ EntityModelCodeGenerator
+ BatchDyeingCentral.Designer.cs
+
+
+ BatchDyeingCentral.edmx
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ EntityModelCodeGenerator
+ Ticket.Designer.cs
+
+
+ Ticket.edmx
+
+
+
+
+
+
+
+ TextTemplatingFileGenerator
+ BatchDyeingCentral.Context.cs
+ BatchDyeingCentral.edmx
+
+
+ TextTemplatingFileGenerator
+ BatchDyeingCentral.edmx
+ BatchDyeingCentral.cs
+
+
+ TextTemplatingFileGenerator
+ Ticket.edmx
+ Ticket.Context.cs
+
+
+ TextTemplatingFileGenerator
+ Ticket.edmx
+ Ticket.cs
+
+
+
+
+
+
+
+
+
+
+
+ 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Audit.sln b/Audit.sln
new file mode 100644
index 0000000..3e0f841
--- /dev/null
+++ b/Audit.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.32014.148
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Audit", "Audit.csproj", "{43516CC3-DB11-401F-AC40-94676C508BB9}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {43516CC3-DB11-401F-AC40-94676C508BB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {43516CC3-DB11-401F-AC40-94676C508BB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {43516CC3-DB11-401F-AC40-94676C508BB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {43516CC3-DB11-401F-AC40-94676C508BB9}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {82049DD6-BD0B-41E6-B77E-51EB8BC3C9C7}
+ EndGlobalSection
+EndGlobal
diff --git a/AuxDslvQueue.cs b/AuxDslvQueue.cs
new file mode 100644
index 0000000..dc6773c
--- /dev/null
+++ b/AuxDslvQueue.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class AuxDslvQueue
+ {
+ public Nullable TankNo { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public string Station { get; set; }
+ public Nullable Industry { get; set; }
+ public Nullable State { get; set; }
+ public string Machine { get; set; }
+ public string Volume { get; set; }
+ public Nullable ShelfID { get; set; }
+ public Nullable Updated { get; set; }
+ }
+}
diff --git a/AuxDslvQueueHistory.cs b/AuxDslvQueueHistory.cs
new file mode 100644
index 0000000..dd0f955
--- /dev/null
+++ b/AuxDslvQueueHistory.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class AuxDslvQueueHistory
+ {
+ public Nullable TankNo { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public string Station { get; set; }
+ public Nullable Industry { get; set; }
+ public Nullable State { get; set; }
+ public string Machine { get; set; }
+ public string Volume { get; set; }
+ public Nullable ShelfID { get; set; }
+ public Nullable Created { get; set; }
+ }
+}
diff --git a/BatchDyeingCentral.Context.cs b/BatchDyeingCentral.Context.cs
new file mode 100644
index 0000000..3fc9631
--- /dev/null
+++ b/BatchDyeingCentral.Context.cs
@@ -0,0 +1,94 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Data.Entity;
+ using System.Data.Entity.Infrastructure;
+
+ public partial class BatchDyeingCentralEntities : DbContext
+ {
+ public BatchDyeingCentralEntities()
+ : base("name=BatchDyeingCentralEntities")
+ {
+ }
+
+ protected override void OnModelCreating(DbModelBuilder modelBuilder)
+ {
+ throw new UnintentionalCodeFirstException();
+ }
+
+ public virtual DbSet Alarms { get; set; }
+ public virtual DbSet Customize { get; set; }
+ public virtual DbSet Delays { get; set; }
+ public virtual DbSet DyelotHead { get; set; }
+ public virtual DbSet DyelotHistories { get; set; }
+ public virtual DbSet Dyelots { get; set; }
+ public virtual DbSet DyelotsByShift { get; set; }
+ public virtual DbSet Machines { get; set; }
+ public virtual DbSet MachineState { get; set; }
+ public virtual DbSet ProgramGroups { get; set; }
+ public virtual DbSet Programs { get; set; }
+ public virtual DbSet ProgramsUsed { get; set; }
+ public virtual DbSet record { get; set; }
+ public virtual DbSet SchedulingLog { get; set; }
+ public virtual DbSet Steps { get; set; }
+ public virtual DbSet StepVisits { get; set; }
+ public virtual DbSet Stoppages { get; set; }
+ public virtual DbSet Users { get; set; }
+ public virtual DbSet AuxDslvQueue { get; set; }
+ public virtual DbSet AuxDslvQueueHistory { get; set; }
+ public virtual DbSet BucketInfo { get; set; }
+ public virtual DbSet BucketShelf { get; set; }
+ public virtual DbSet BucketShelfHistory { get; set; }
+ public virtual DbSet BucketShelfQueue { get; set; }
+ public virtual DbSet BucketShelfQueueHistory { get; set; }
+ public virtual DbSet CleanDevice { get; set; }
+ public virtual DbSet DispenserEvent { get; set; }
+ public virtual DbSet DispenserLifeStatus { get; set; }
+ public virtual DbSet Dispensers { get; set; }
+ public virtual DbSet DispenserUtilization { get; set; }
+ public virtual DbSet DyelotBuckets { get; set; }
+ public virtual DbSet DyelotBucketsHistory { get; set; }
+ public virtual DbSet DyelotBucketSummary { get; set; }
+ public virtual DbSet DyelotDetail { get; set; }
+ public virtual DbSet DyelotDslvQueue { get; set; }
+ public virtual DbSet DyelotDslvQueueHistory { get; set; }
+ public virtual DbSet DyelotsBatch { get; set; }
+ public virtual DbSet DyelotsBulkedRecipe { get; set; }
+ public virtual DbSet DyelotsBulkedRecipeHistory { get; set; }
+ public virtual DbSet DyelotsHistory { get; set; }
+ public virtual DbSet DyelotsInAuto { get; set; }
+ public virtual DbSet DyelotsInAutoHistory { get; set; }
+ public virtual DbSet EventList { get; set; }
+ public virtual DbSet LA571Tanks { get; set; }
+ public virtual DbSet LabDyeDslvQueue { get; set; }
+ public virtual DbSet LabDyeDslvQueueHistory { get; set; }
+ public virtual DbSet MachinesHistory { get; set; }
+ public virtual DbSet MachineStateHistory { get; set; }
+ public virtual DbSet ManualWeightQueue { get; set; }
+ public virtual DbSet ManualWeightQueueHistory { get; set; }
+ public virtual DbSet PartsStatus { get; set; }
+ public virtual DbSet PartsStatusHistory { get; set; }
+ public virtual DbSet PipeFill { get; set; }
+ public virtual DbSet PipeHistory { get; set; }
+ public virtual DbSet Pipes { get; set; }
+ public virtual DbSet RecipeDeduct { get; set; }
+ public virtual DbSet RecipeDeductHistory { get; set; }
+ public virtual DbSet RFIDRecordQueue { get; set; }
+ public virtual DbSet RFIDRecordQueueHistory { get; set; }
+ public virtual DbSet SampleDyeDslvQueue { get; set; }
+ public virtual DbSet SampleDyeDslvQueueHistory { get; set; }
+ public virtual DbSet Shelf { get; set; }
+ public virtual DbSet TagShelf { get; set; }
+ public virtual DbSet UserGroup { get; set; }
+ public virtual DbSet WaitChemical { get; set; }
+ }
+}
diff --git a/BatchDyeingCentral.Context.tt b/BatchDyeingCentral.Context.tt
new file mode 100644
index 0000000..6a322ee
--- /dev/null
+++ b/BatchDyeingCentral.Context.tt
@@ -0,0 +1,636 @@
+<#@ template language="C#" debug="false" hostspecific="true"#>
+<#@ include file="EF6.Utility.CS.ttinclude"#><#@
+ output extension=".cs"#><#
+
+const string inputFile = @"BatchDyeingCentral.edmx";
+var textTransform = DynamicTextTransformation.Create(this);
+var code = new CodeGenerationTools(this);
+var ef = new MetadataTools(this);
+var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
+var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
+var itemCollection = loader.CreateEdmItemCollection(inputFile);
+var modelNamespace = loader.GetModelNamespace(inputFile);
+var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
+
+var container = itemCollection.OfType().FirstOrDefault();
+if (container == null)
+{
+ return string.Empty;
+}
+#>
+//------------------------------------------------------------------------------
+//
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
+//
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
+//
+//------------------------------------------------------------------------------
+
+<#
+
+var codeNamespace = code.VsNamespaceSuggestion();
+if (!String.IsNullOrEmpty(codeNamespace))
+{
+#>
+namespace <#=code.EscapeNamespace(codeNamespace)#>
+{
+<#
+ PushIndent(" ");
+}
+
+#>
+using System;
+using System.Data.Entity;
+using System.Data.Entity.Infrastructure;
+<#
+if (container.FunctionImports.Any())
+{
+#>
+using System.Data.Entity.Core.Objects;
+using System.Linq;
+<#
+}
+#>
+
+<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
+{
+ public <#=code.Escape(container)#>()
+ : base("name=<#=container.Name#>")
+ {
+<#
+if (!loader.IsLazyLoadingEnabled(container))
+{
+#>
+ this.Configuration.LazyLoadingEnabled = false;
+<#
+}
+
+foreach (var entitySet in container.BaseEntitySets.OfType())
+{
+ // Note: the DbSet members are defined below such that the getter and
+ // setter always have the same accessibility as the DbSet definition
+ if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
+ {
+#>
+ <#=codeStringGenerator.DbSetInitializer(entitySet)#>
+<#
+ }
+}
+#>
+ }
+
+ protected override void OnModelCreating(DbModelBuilder modelBuilder)
+ {
+ throw new UnintentionalCodeFirstException();
+ }
+
+<#
+ foreach (var entitySet in container.BaseEntitySets.OfType())
+ {
+#>
+ <#=codeStringGenerator.DbSet(entitySet)#>
+<#
+ }
+
+ foreach (var edmFunction in container.FunctionImports)
+ {
+ WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
+ }
+#>
+}
+<#
+
+if (!String.IsNullOrEmpty(codeNamespace))
+{
+ PopIndent();
+#>
+}
+<#
+}
+#>
+<#+
+
+private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+{
+ if (typeMapper.IsComposable(edmFunction))
+ {
+#>
+
+ [DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
+ <#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
+ {
+<#+
+ codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
+#>
+ <#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
+ }
+<#+
+ }
+ else
+ {
+#>
+
+ <#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
+ {
+<#+
+ codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
+#>
+ <#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
+ }
+<#+
+ if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
+ {
+ WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
+ }
+ }
+}
+
+public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
+{
+#>
+ var <#=name#> = <#=isNotNull#> ?
+ <#=notNullInit#> :
+ <#=nullInit#>;
+
+<#+
+}
+
+public const string TemplateId = "CSharp_DbContext_Context_EF6";
+
+public class CodeStringGenerator
+{
+ private readonly CodeGenerationTools _code;
+ private readonly TypeMapper _typeMapper;
+ private readonly MetadataTools _ef;
+
+ public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
+ {
+ ArgumentNotNull(code, "code");
+ ArgumentNotNull(typeMapper, "typeMapper");
+ ArgumentNotNull(ef, "ef");
+
+ _code = code;
+ _typeMapper = typeMapper;
+ _ef = ef;
+ }
+
+ public string Property(EdmProperty edmProperty)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2} {{ {3}get; {4}set; }}",
+ Accessibility.ForProperty(edmProperty),
+ _typeMapper.GetTypeName(edmProperty.TypeUsage),
+ _code.Escape(edmProperty),
+ _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
+ _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
+ }
+
+ public string NavigationProperty(NavigationProperty navProp)
+ {
+ var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2} {{ {3}get; {4}set; }}",
+ AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
+ navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
+ _code.Escape(navProp),
+ _code.SpaceAfter(Accessibility.ForGetter(navProp)),
+ _code.SpaceAfter(Accessibility.ForSetter(navProp)));
+ }
+
+ public string AccessibilityAndVirtual(string accessibility)
+ {
+ return accessibility + (accessibility != "private" ? " virtual" : "");
+ }
+
+ public string EntityClassOpening(EntityType entity)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1}partial class {2}{3}",
+ Accessibility.ForType(entity),
+ _code.SpaceAfter(_code.AbstractOption(entity)),
+ _code.Escape(entity),
+ _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
+ }
+
+ public string EnumOpening(SimpleType enumType)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} enum {1} : {2}",
+ Accessibility.ForType(enumType),
+ _code.Escape(enumType),
+ _code.Escape(_typeMapper.UnderlyingClrType(enumType)));
+ }
+
+ public void WriteFunctionParameters(EdmFunction edmFunction, Action writeParameter)
+ {
+ var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+ foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
+ {
+ var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
+ var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
+ var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
+ writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
+ }
+ }
+
+ public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} IQueryable<{1}> {2}({3})",
+ AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+ _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+ _code.Escape(edmFunction),
+ string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
+ }
+
+ public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
+ _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+ edmFunction.NamespaceName,
+ edmFunction.Name,
+ string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
+ _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
+ }
+
+ public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+ var returnType = _typeMapper.GetReturnType(edmFunction);
+
+ var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
+ if (includeMergeOption)
+ {
+ paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
+ }
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2}({3})",
+ AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+ returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+ _code.Escape(edmFunction),
+ paramList);
+ }
+
+ public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+ var returnType = _typeMapper.GetReturnType(edmFunction);
+
+ var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
+ if (includeMergeOption)
+ {
+ callParams = ", mergeOption" + callParams;
+ }
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
+ returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+ edmFunction.Name,
+ callParams);
+ }
+
+ public string DbSet(EntitySet entitySet)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} virtual DbSet<{1}> {2} {{ get; set; }}",
+ Accessibility.ForReadOnlyProperty(entitySet),
+ _typeMapper.GetTypeName(entitySet.ElementType),
+ _code.Escape(entitySet));
+ }
+
+ public string DbSetInitializer(EntitySet entitySet)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} = Set<{1}>();",
+ _code.Escape(entitySet),
+ _typeMapper.GetTypeName(entitySet.ElementType));
+ }
+
+ public string UsingDirectives(bool inHeader, bool includeCollections = true)
+ {
+ return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
+ ? string.Format(
+ CultureInfo.InvariantCulture,
+ "{0}using System;{1}" +
+ "{2}",
+ inHeader ? Environment.NewLine : "",
+ includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
+ inHeader ? "" : Environment.NewLine)
+ : "";
+ }
+}
+
+public class TypeMapper
+{
+ private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
+
+ private readonly System.Collections.IList _errors;
+ private readonly CodeGenerationTools _code;
+ private readonly MetadataTools _ef;
+
+ public static string FixNamespaces(string typeName)
+ {
+ return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
+ }
+
+ public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
+ {
+ ArgumentNotNull(code, "code");
+ ArgumentNotNull(ef, "ef");
+ ArgumentNotNull(errors, "errors");
+
+ _code = code;
+ _ef = ef;
+ _errors = errors;
+ }
+
+ public string GetTypeName(TypeUsage typeUsage)
+ {
+ return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
+ }
+
+ public string GetTypeName(EdmType edmType)
+ {
+ return GetTypeName(edmType, isNullable: null, modelNamespace: null);
+ }
+
+ public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
+ {
+ return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
+ }
+
+ public string GetTypeName(EdmType edmType, string modelNamespace)
+ {
+ return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
+ }
+
+ public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
+ {
+ if (edmType == null)
+ {
+ return null;
+ }
+
+ var collectionType = edmType as CollectionType;
+ if (collectionType != null)
+ {
+ return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
+ }
+
+ var typeName = _code.Escape(edmType.MetadataProperties
+ .Where(p => p.Name == ExternalTypeNameAttributeName)
+ .Select(p => (string)p.Value)
+ .FirstOrDefault())
+ ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
+ _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
+ _code.Escape(edmType));
+
+ if (edmType is StructuralType)
+ {
+ return typeName;
+ }
+
+ if (edmType is SimpleType)
+ {
+ var clrType = UnderlyingClrType(edmType);
+ if (!IsEnumType(edmType))
+ {
+ typeName = _code.Escape(clrType);
+ }
+
+ typeName = FixNamespaces(typeName);
+
+ return clrType.IsValueType && isNullable == true ?
+ String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
+ typeName;
+ }
+
+ throw new ArgumentException("edmType");
+ }
+
+ public Type UnderlyingClrType(EdmType edmType)
+ {
+ ArgumentNotNull(edmType, "edmType");
+
+ var primitiveType = edmType as PrimitiveType;
+ if (primitiveType != null)
+ {
+ return primitiveType.ClrEquivalentType;
+ }
+
+ if (IsEnumType(edmType))
+ {
+ return GetEnumUnderlyingType(edmType).ClrEquivalentType;
+ }
+
+ return typeof(object);
+ }
+
+ public object GetEnumMemberValue(MetadataItem enumMember)
+ {
+ ArgumentNotNull(enumMember, "enumMember");
+
+ var valueProperty = enumMember.GetType().GetProperty("Value");
+ return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
+ }
+
+ public string GetEnumMemberName(MetadataItem enumMember)
+ {
+ ArgumentNotNull(enumMember, "enumMember");
+
+ var nameProperty = enumMember.GetType().GetProperty("Name");
+ return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
+ }
+
+ public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ var membersProperty = enumType.GetType().GetProperty("Members");
+ return membersProperty != null
+ ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
+ : Enumerable.Empty();
+ }
+
+ public bool EnumIsFlags(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
+ return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
+ }
+
+ public bool IsEnumType(GlobalItem edmType)
+ {
+ ArgumentNotNull(edmType, "edmType");
+
+ return edmType.GetType().Name == "EnumType";
+ }
+
+ public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
+ }
+
+ public string CreateLiteral(object value)
+ {
+ if (value == null || value.GetType() != typeof(TimeSpan))
+ {
+ return _code.CreateLiteral(value);
+ }
+
+ return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
+ }
+
+ public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable types, string sourceFile)
+ {
+ ArgumentNotNull(types, "types");
+ ArgumentNotNull(sourceFile, "sourceFile");
+
+ var hash = new HashSet(StringComparer.InvariantCultureIgnoreCase);
+ if (types.Any(item => !hash.Add(item)))
+ {
+ _errors.Add(
+ new CompilerError(sourceFile, -1, -1, "6023",
+ String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
+ return false;
+ }
+ return true;
+ }
+
+ public IEnumerable GetEnumItemsToGenerate(IEnumerable itemCollection)
+ {
+ return GetItemsToGenerate(itemCollection)
+ .Where(e => IsEnumType(e));
+ }
+
+ public IEnumerable GetItemsToGenerate(IEnumerable itemCollection) where T: EdmType
+ {
+ return itemCollection
+ .OfType()
+ .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
+ .OrderBy(i => i.Name);
+ }
+
+ public IEnumerable GetAllGlobalItems(IEnumerable itemCollection)
+ {
+ return itemCollection
+ .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
+ .Select(g => GetGlobalItemName(g));
+ }
+
+ public string GetGlobalItemName(GlobalItem item)
+ {
+ if (item is EdmType)
+ {
+ return ((EdmType)item).Name;
+ }
+ else
+ {
+ return ((EntityContainer)item).Name;
+ }
+ }
+
+ public IEnumerable GetSimpleProperties(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+ }
+
+ public IEnumerable GetSimpleProperties(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+ }
+
+ public IEnumerable GetComplexProperties(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+ }
+
+ public IEnumerable GetComplexProperties(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+ }
+
+ public IEnumerable GetPropertiesWithDefaultValues(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+ }
+
+ public IEnumerable GetPropertiesWithDefaultValues(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+ }
+
+ public IEnumerable GetNavigationProperties(EntityType type)
+ {
+ return type.NavigationProperties.Where(np => np.DeclaringType == type);
+ }
+
+ public IEnumerable GetCollectionNavigationProperties(EntityType type)
+ {
+ return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+ }
+
+ public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
+ {
+ ArgumentNotNull(edmFunction, "edmFunction");
+
+ var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
+ return returnParamsProperty == null
+ ? edmFunction.ReturnParameter
+ : ((IEnumerable)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
+ }
+
+ public bool IsComposable(EdmFunction edmFunction)
+ {
+ ArgumentNotNull(edmFunction, "edmFunction");
+
+ var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
+ return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
+ }
+
+ public IEnumerable GetParameters(EdmFunction edmFunction)
+ {
+ return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+ }
+
+ public TypeUsage GetReturnType(EdmFunction edmFunction)
+ {
+ var returnParam = GetReturnParameter(edmFunction);
+ return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
+ }
+
+ public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
+ {
+ var returnType = GetReturnType(edmFunction);
+ return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
+ }
+}
+
+public static void ArgumentNotNull(T arg, string name) where T : class
+{
+ if (arg == null)
+ {
+ throw new ArgumentNullException(name);
+ }
+}
+#>
\ No newline at end of file
diff --git a/BatchDyeingCentral.Designer.cs b/BatchDyeingCentral.Designer.cs
new file mode 100644
index 0000000..674b9e4
--- /dev/null
+++ b/BatchDyeingCentral.Designer.cs
@@ -0,0 +1,10 @@
+// 为模型“D:\Visual Studio\Audit\BatchDyeingCentral.edmx”启用了 T4 代码生成。
+// 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值
+// 更改为“旧的 ObjectContext”。当在设计器中打开该模型时,此属性会出现在
+// “属性”窗口中。
+
+// 如果没有生成任何上下文和实体类,可能是因为您创建了空模型但是
+// 尚未选择要使用的实体框架版本。要为您的模型生成一个上下文类和实体
+// 类,请在设计器中打开该模型,右键单击设计器图面,然后
+// 选择“从数据库更新模型...”、“从模型生成数据库...”或“添加代码生成
+// 项...”。
\ No newline at end of file
diff --git a/BatchDyeingCentral.cs b/BatchDyeingCentral.cs
new file mode 100644
index 0000000..69c6b92
--- /dev/null
+++ b/BatchDyeingCentral.cs
@@ -0,0 +1,9 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
diff --git a/BatchDyeingCentral.edmx b/BatchDyeingCentral.edmx
new file mode 100644
index 0000000..3535c77
--- /dev/null
+++ b/BatchDyeingCentral.edmx
@@ -0,0 +1,5268 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT
+ [AuxDslvQueue].[TankNo] AS [TankNo],
+ [AuxDslvQueue].[Dyelot] AS [Dyelot],
+ [AuxDslvQueue].[ReDye] AS [ReDye],
+ [AuxDslvQueue].[StepNumber] AS [StepNumber],
+ [AuxDslvQueue].[Station] AS [Station],
+ [AuxDslvQueue].[Industry] AS [Industry],
+ [AuxDslvQueue].[State] AS [State],
+ [AuxDslvQueue].[Machine] AS [Machine],
+ [AuxDslvQueue].[Volume] AS [Volume],
+ [AuxDslvQueue].[ShelfID] AS [ShelfID],
+ [AuxDslvQueue].[Updated] AS [Updated]
+ FROM [dbo].[AuxDslvQueue] AS [AuxDslvQueue]
+
+
+ SELECT
+ [AuxDslvQueueHistory].[TankNo] AS [TankNo],
+ [AuxDslvQueueHistory].[Dyelot] AS [Dyelot],
+ [AuxDslvQueueHistory].[ReDye] AS [ReDye],
+ [AuxDslvQueueHistory].[StepNumber] AS [StepNumber],
+ [AuxDslvQueueHistory].[Station] AS [Station],
+ [AuxDslvQueueHistory].[Industry] AS [Industry],
+ [AuxDslvQueueHistory].[State] AS [State],
+ [AuxDslvQueueHistory].[Machine] AS [Machine],
+ [AuxDslvQueueHistory].[Volume] AS [Volume],
+ [AuxDslvQueueHistory].[ShelfID] AS [ShelfID],
+ [AuxDslvQueueHistory].[Created] AS [Created]
+ FROM [dbo].[AuxDslvQueueHistory] AS [AuxDslvQueueHistory]
+
+
+ SELECT
+ [BucketInfo].[BucketNo] AS [BucketNo],
+ [BucketInfo].[DID] AS [DID],
+ [BucketInfo].[StartTime] AS [StartTime],
+ [BucketInfo].[EndTime] AS [EndTime],
+ [BucketInfo].[Used] AS [Used],
+ [BucketInfo].[UserAccount] AS [UserAccount]
+ FROM [dbo].[BucketInfo] AS [BucketInfo]
+
+
+ SELECT
+ [BucketShelf].[BucketNo] AS [BucketNo],
+ [BucketShelf].[ShelfID] AS [ShelfID],
+ [BucketShelf].[Dyelot] AS [Dyelot],
+ [BucketShelf].[ReDye] AS [ReDye],
+ [BucketShelf].[StepNumber] AS [StepNumber],
+ [BucketShelf].[Station] AS [Station],
+ [BucketShelf].[DID] AS [DID],
+ [BucketShelf].[TotalBuckets] AS [TotalBuckets],
+ [BucketShelf].[DevideNo] AS [DevideNo],
+ [BucketShelf].[XPos] AS [XPos],
+ [BucketShelf].[YPos] AS [YPos],
+ [BucketShelf].[State] AS [State],
+ [BucketShelf].[OnShelfTime] AS [OnShelfTime],
+ [BucketShelf].[UserAccount] AS [UserAccount]
+ FROM [dbo].[BucketShelf] AS [BucketShelf]
+
+
+ SELECT
+ [BucketShelfHistory].[BucketNo] AS [BucketNo],
+ [BucketShelfHistory].[ShelfID] AS [ShelfID],
+ [BucketShelfHistory].[Dyelot] AS [Dyelot],
+ [BucketShelfHistory].[ReDye] AS [ReDye],
+ [BucketShelfHistory].[StepNumber] AS [StepNumber],
+ [BucketShelfHistory].[Station] AS [Station],
+ [BucketShelfHistory].[DID] AS [DID],
+ [BucketShelfHistory].[TotalBuckets] AS [TotalBuckets],
+ [BucketShelfHistory].[DevideNo] AS [DevideNo],
+ [BucketShelfHistory].[XPos] AS [XPos],
+ [BucketShelfHistory].[YPos] AS [YPos],
+ [BucketShelfHistory].[State] AS [State],
+ [BucketShelfHistory].[OnShelfTime] AS [OnShelfTime],
+ [BucketShelfHistory].[UserAccount] AS [UserAccount]
+ FROM [dbo].[BucketShelfHistory] AS [BucketShelfHistory]
+
+
+ SELECT
+ [BucketShelfQueue].[BucketNo] AS [BucketNo],
+ [BucketShelfQueue].[ShelfID] AS [ShelfID],
+ [BucketShelfQueue].[Dyelot] AS [Dyelot],
+ [BucketShelfQueue].[ReDye] AS [ReDye],
+ [BucketShelfQueue].[StepNumber] AS [StepNumber],
+ [BucketShelfQueue].[TotalBuckets] AS [TotalBuckets],
+ [BucketShelfQueue].[DevideNo] AS [DevideNo],
+ [BucketShelfQueue].[XPos] AS [XPos],
+ [BucketShelfQueue].[YPos] AS [YPos],
+ [BucketShelfQueue].[State] AS [State],
+ [BucketShelfQueue].[Updated] AS [Updated]
+ FROM [dbo].[BucketShelfQueue] AS [BucketShelfQueue]
+
+
+ SELECT
+ [BucketShelfQueueHistory].[BucketNo] AS [BucketNo],
+ [BucketShelfQueueHistory].[ShelfID] AS [ShelfID],
+ [BucketShelfQueueHistory].[Dyelot] AS [Dyelot],
+ [BucketShelfQueueHistory].[ReDye] AS [ReDye],
+ [BucketShelfQueueHistory].[StepNumber] AS [StepNumber],
+ [BucketShelfQueueHistory].[TotalBuckets] AS [TotalBuckets],
+ [BucketShelfQueueHistory].[DevideNo] AS [DevideNo],
+ [BucketShelfQueueHistory].[XPos] AS [XPos],
+ [BucketShelfQueueHistory].[YPos] AS [YPos],
+ [BucketShelfQueueHistory].[State] AS [State],
+ [BucketShelfQueueHistory].[Created] AS [Created]
+ FROM [dbo].[BucketShelfQueueHistory] AS [BucketShelfQueueHistory]
+
+
+ SELECT
+ [CleanDevice].[ID] AS [ID],
+ [CleanDevice].[State] AS [State],
+ [CleanDevice].[Enabled] AS [Enabled]
+ FROM [dbo].[CleanDevice] AS [CleanDevice]
+
+
+ SELECT
+ [DispenserEvent].[EventID] AS [EventID],
+ [DispenserEvent].[EventType] AS [EventType],
+ [DispenserEvent].[Dispenser] AS [Dispenser],
+ [DispenserEvent].[Dyelot] AS [Dyelot],
+ [DispenserEvent].[ReDye] AS [ReDye],
+ [DispenserEvent].[StepNumber] AS [StepNumber],
+ [DispenserEvent].[Code] AS [Code],
+ [DispenserEvent].[Description] AS [Description],
+ [DispenserEvent].[Description_BIG] AS [Description_BIG],
+ [DispenserEvent].[Description_GB] AS [Description_GB],
+ [DispenserEvent].[CreateDate] AS [CreateDate],
+ [DispenserEvent].[ConfirmDate] AS [ConfirmDate],
+ [DispenserEvent].[FinishDate] AS [FinishDate],
+ [DispenserEvent].[Shift] AS [Shift],
+ [DispenserEvent].[UserAccount] AS [UserAccount]
+ FROM [dbo].[DispenserEvent] AS [DispenserEvent]
+
+
+ SELECT
+ [DispenserLifeStatus].[Dispenser] AS [Dispenser],
+ [DispenserLifeStatus].[HeartBeat] AS [HeartBeat],
+ [DispenserLifeStatus].[UpdateDate] AS [UpdateDate]
+ FROM [dbo].[DispenserLifeStatus] AS [DispenserLifeStatus]
+
+
+ SELECT
+ [Dispensers].[Name] AS [Name],
+ [Dispensers].[Description] AS [Description],
+ [Dispensers].[Device] AS [Device],
+ [Dispensers].[Dyelot] AS [Dyelot],
+ [Dispensers].[ReDye] AS [ReDye],
+ [Dispensers].[StepNumber] AS [StepNumber],
+ [Dispensers].[Station] AS [Station],
+ [Dispensers].[State] AS [State],
+ [Dispensers].[Status] AS [Status],
+ [Dispensers].[Automatic] AS [Automatic],
+ [Dispensers].[Enabled] AS [Enabled],
+ [Dispensers].[HeartBeat] AS [HeartBeat],
+ [Dispensers].[CheckPeriod] AS [CheckPeriod],
+ [Dispensers].[UpdateDate] AS [UpdateDate],
+ [Dispensers].[CreateDate] AS [CreateDate],
+ [Dispensers].[UserAccount] AS [UserAccount]
+ FROM [dbo].[Dispensers] AS [Dispensers]
+
+
+ SELECT
+ [DispenserUtilization].[Dispenser] AS [Dispenser],
+ [DispenserUtilization].[UtilDate] AS [UtilDate],
+ [DispenserUtilization].[UtilTimes] AS [UtilTimes],
+ [DispenserUtilization].[UserAccount] AS [UserAccount]
+ FROM [dbo].[DispenserUtilization] AS [DispenserUtilization]
+
+
+ SELECT
+ [DyelotBuckets].[Dyelot] AS [Dyelot],
+ [DyelotBuckets].[ReDye] AS [ReDye],
+ [DyelotBuckets].[StepNumber] AS [StepNumber],
+ [DyelotBuckets].[DevideNo] AS [DevideNo],
+ [DyelotBuckets].[ProductCode] AS [ProductCode],
+ [DyelotBuckets].[BucketNo] AS [BucketNo],
+ [DyelotBuckets].[DID] AS [DID],
+ [DyelotBuckets].[Final] AS [Final],
+ [DyelotBuckets].[Dissolved] AS [Dissolved],
+ [DyelotBuckets].[Created] AS [Created]
+ FROM [dbo].[DyelotBuckets] AS [DyelotBuckets]
+
+
+ SELECT
+ [DyelotBucketsHistory].[Dyelot] AS [Dyelot],
+ [DyelotBucketsHistory].[ReDye] AS [ReDye],
+ [DyelotBucketsHistory].[StepNumber] AS [StepNumber],
+ [DyelotBucketsHistory].[DevideNo] AS [DevideNo],
+ [DyelotBucketsHistory].[ProductCode] AS [ProductCode],
+ [DyelotBucketsHistory].[BucketNo] AS [BucketNo],
+ [DyelotBucketsHistory].[DID] AS [DID],
+ [DyelotBucketsHistory].[Final] AS [Final],
+ [DyelotBucketsHistory].[Dissolved] AS [Dissolved],
+ [DyelotBucketsHistory].[Created] AS [Created]
+ FROM [dbo].[DyelotBucketsHistory] AS [DyelotBucketsHistory]
+
+
+ SELECT
+ [DyelotBucketSummary].[Dyelot] AS [Dyelot],
+ [DyelotBucketSummary].[ReDye] AS [ReDye],
+ [DyelotBucketSummary].[StepNumber] AS [StepNumber],
+ [DyelotBucketSummary].[TotalBuckets] AS [TotalBuckets],
+ [DyelotBucketSummary].[Final] AS [Final],
+ [DyelotBucketSummary].[Created] AS [Created]
+ FROM [dbo].[DyelotBucketSummary] AS [DyelotBucketSummary]
+
+
+ SELECT
+ [DyelotDetail].[Dyelot] AS [Dyelot],
+ [DyelotDetail].[ReDye] AS [ReDye],
+ [DyelotDetail].[StepNumber] AS [StepNumber],
+ [DyelotDetail].[Station] AS [Station],
+ [DyelotDetail].[ProductCode] AS [ProductCode],
+ [DyelotDetail].[ProductName] AS [ProductName],
+ [DyelotDetail].[ProductType] AS [ProductType],
+ [DyelotDetail].[Grams] AS [Grams],
+ [DyelotDetail].[Created] AS [Created],
+ [DyelotDetail].[SN] AS [SN],
+ [DyelotDetail].[DispenseTime] AS [DispenseTime],
+ [DyelotDetail].[DispenseGrams] AS [DispenseGrams],
+ [DyelotDetail].[CurrDispGrams] AS [CurrDispGrams],
+ [DyelotDetail].[LADispenseResult] AS [LADispenseResult],
+ [DyelotDetail].[Error] AS [Error],
+ [DyelotDetail].[UserAccount] AS [UserAccount],
+ [DyelotDetail].[Volume] AS [Volume],
+ [DyelotDetail].[CurrDispTime] AS [CurrDispTime],
+ [DyelotDetail].[CurrVolume] AS [CurrVolume],
+ [DyelotDetail].[RemainVolume] AS [RemainVolume],
+ [DyelotDetail].[FinalPickup] AS [FinalPickup],
+ [DyelotDetail].[LFManual] AS [LFManual]
+ FROM [dbo].[DyelotDetail] AS [DyelotDetail]
+
+
+ SELECT
+ [DyelotDslvQueue].[TankNo] AS [TankNo],
+ [DyelotDslvQueue].[Dyelot] AS [Dyelot],
+ [DyelotDslvQueue].[ReDye] AS [ReDye],
+ [DyelotDslvQueue].[StepNumber] AS [StepNumber],
+ [DyelotDslvQueue].[TotalBuckets] AS [TotalBuckets],
+ [DyelotDslvQueue].[DivideNo] AS [DivideNo],
+ [DyelotDslvQueue].[State] AS [State],
+ [DyelotDslvQueue].[ShelfID] AS [ShelfID],
+ [DyelotDslvQueue].[SchDispenseTime] AS [SchDispenseTime],
+ [DyelotDslvQueue].[BucketNo] AS [BucketNo],
+ [DyelotDslvQueue].[Updated] AS [Updated]
+ FROM [dbo].[DyelotDslvQueue] AS [DyelotDslvQueue]
+
+
+ SELECT
+ [DyelotDslvQueueHistory].[TankNo] AS [TankNo],
+ [DyelotDslvQueueHistory].[Dyelot] AS [Dyelot],
+ [DyelotDslvQueueHistory].[ReDye] AS [ReDye],
+ [DyelotDslvQueueHistory].[StepNumber] AS [StepNumber],
+ [DyelotDslvQueueHistory].[TotalBuckets] AS [TotalBuckets],
+ [DyelotDslvQueueHistory].[DivideNo] AS [DivideNo],
+ [DyelotDslvQueueHistory].[State] AS [State],
+ [DyelotDslvQueueHistory].[ShelfID] AS [ShelfID],
+ [DyelotDslvQueueHistory].[SchDispenseTime] AS [SchDispenseTime],
+ [DyelotDslvQueueHistory].[BucketNo] AS [BucketNo],
+ [DyelotDslvQueueHistory].[Created] AS [Created]
+ FROM [dbo].[DyelotDslvQueueHistory] AS [DyelotDslvQueueHistory]
+
+
+ SELECT
+ [DyelotsBatch].[Dyelot] AS [Dyelot],
+ [DyelotsBatch].[ReDye] AS [ReDye],
+ [DyelotsBatch].[StepNumber] AS [StepNumber],
+ [DyelotsBatch].[Station] AS [Station],
+ [DyelotsBatch].[ShotNo] AS [ShotNo],
+ [DyelotsBatch].[ProductCode] AS [ProductCode],
+ [DyelotsBatch].[SN] AS [SN],
+ [DyelotsBatch].[Grams] AS [Grams],
+ [DyelotsBatch].[DispenseStartTime] AS [DispenseStartTime],
+ [DyelotsBatch].[DispenseEndTime] AS [DispenseEndTime],
+ [DyelotsBatch].[DispenseGrams] AS [DispenseGrams],
+ [DyelotsBatch].[LADispenseResult] AS [LADispenseResult],
+ [DyelotsBatch].[DyeWeightTime] AS [DyeWeightTime],
+ [DyelotsBatch].[Process] AS [Process],
+ [DyelotsBatch].[FinalProcess] AS [FinalProcess],
+ [DyelotsBatch].[DispenseWater] AS [DispenseWater],
+ [DyelotsBatch].[DrainWater] AS [DrainWater],
+ [DyelotsBatch].[DissolveTemperature] AS [DissolveTemperature],
+ [DyelotsBatch].[SchDispenseTime] AS [SchDispenseTime],
+ [DyelotsBatch].[UserAccount] AS [UserAccount]
+ FROM [dbo].[DyelotsBatch] AS [DyelotsBatch]
+
+
+ SELECT
+ [DyelotsBulkedRecipe].[ID] AS [ID],
+ [DyelotsBulkedRecipe].[Dyelot] AS [Dyelot],
+ [DyelotsBulkedRecipe].[ReDye] AS [ReDye],
+ [DyelotsBulkedRecipe].[StepNumber] AS [StepNumber],
+ [DyelotsBulkedRecipe].[Station] AS [Station],
+ [DyelotsBulkedRecipe].[DevideNo] AS [DevideNo],
+ [DyelotsBulkedRecipe].[ShotNo] AS [ShotNo],
+ [DyelotsBulkedRecipe].[ProductCode] AS [ProductCode],
+ [DyelotsBulkedRecipe].[ProductName] AS [ProductName],
+ [DyelotsBulkedRecipe].[ProductType] AS [ProductType],
+ [DyelotsBulkedRecipe].[ProductLot] AS [ProductLot],
+ [DyelotsBulkedRecipe].[ProductClass] AS [ProductClass],
+ [DyelotsBulkedRecipe].[SN] AS [SN],
+ [DyelotsBulkedRecipe].[Amount] AS [Amount],
+ [DyelotsBulkedRecipe].[Grams] AS [Grams],
+ [DyelotsBulkedRecipe].[Created] AS [Created],
+ [DyelotsBulkedRecipe].[DispenseStartTime] AS [DispenseStartTime],
+ [DyelotsBulkedRecipe].[DispenseEndTime] AS [DispenseEndTime],
+ [DyelotsBulkedRecipe].[DispenseTime] AS [DispenseTime],
+ [DyelotsBulkedRecipe].[DispenseGrams] AS [DispenseGrams],
+ [DyelotsBulkedRecipe].[DispenseResult] AS [DispenseResult],
+ [DyelotsBulkedRecipe].[LADispenseResult] AS [LADispenseResult],
+ [DyelotsBulkedRecipe].[Volume] AS [Volume],
+ [DyelotsBulkedRecipe].[HostRead] AS [HostRead],
+ [DyelotsBulkedRecipe].[State] AS [State],
+ [DyelotsBulkedRecipe].[NeedDispense] AS [NeedDispense],
+ [DyelotsBulkedRecipe].[MixTankNo] AS [MixTankNo],
+ [DyelotsBulkedRecipe].[DyeWeightTime] AS [DyeWeightTime],
+ [DyelotsBulkedRecipe].[Process] AS [Process],
+ [DyelotsBulkedRecipe].[FinalProcess] AS [FinalProcess],
+ [DyelotsBulkedRecipe].[Dispenser] AS [Dispenser],
+ [DyelotsBulkedRecipe].[TankNo] AS [TankNo],
+ [DyelotsBulkedRecipe].[Error] AS [Error],
+ [DyelotsBulkedRecipe].[BucketNo] AS [BucketNo],
+ [DyelotsBulkedRecipe].[DID] AS [DID],
+ [DyelotsBulkedRecipe].[StepDevideNo] AS [StepDevideNo],
+ [DyelotsBulkedRecipe].[StepTotalBuckets] AS [StepTotalBuckets],
+ [DyelotsBulkedRecipe].[ReferenceDyelot] AS [ReferenceDyelot],
+ [DyelotsBulkedRecipe].[DispenseWater] AS [DispenseWater],
+ [DyelotsBulkedRecipe].[DrainWater] AS [DrainWater],
+ [DyelotsBulkedRecipe].[DissolveTemperature] AS [DissolveTemperature],
+ [DyelotsBulkedRecipe].[SchDispenseTime] AS [SchDispenseTime],
+ [DyelotsBulkedRecipe].[UserAccount] AS [UserAccount],
+ [DyelotsBulkedRecipe].[TargetGrams] AS [TargetGrams],
+ [DyelotsBulkedRecipe].[ActualGrams] AS [ActualGrams],
+ [DyelotsBulkedRecipe].[FinishTime] AS [FinishTime],
+ [DyelotsBulkedRecipe].[Tagged] AS [Tagged],
+ [DyelotsBulkedRecipe].[TotalBuckets] AS [TotalBuckets],
+ [DyelotsBulkedRecipe].[Final] AS [Final],
+ [DyelotsBulkedRecipe].[DissolveManual] AS [DissolveManual],
+ [DyelotsBulkedRecipe].[Concentration] AS [Concentration],
+ [DyelotsBulkedRecipe].[DeductTotalBuckets] AS [DeductTotalBuckets],
+ [DyelotsBulkedRecipe].[DeductBuckets] AS [DeductBuckets],
+ [DyelotsBulkedRecipe].[Kilograms] AS [Kilograms],
+ [DyelotsBulkedRecipe].[DKilograms] AS [DKilograms],
+ [DyelotsBulkedRecipe].[DyelotID] AS [DyelotID],
+ [DyelotsBulkedRecipe].[MixTemperature] AS [MixTemperature],
+ [DyelotsBulkedRecipe].[MixVolume] AS [MixVolume],
+ [DyelotsBulkedRecipe].[MixTime] AS [MixTime],
+ [DyelotsBulkedRecipe].[MixWater] AS [MixWater],
+ [DyelotsBulkedRecipe].[RoWater] AS [RoWater],
+ [DyelotsBulkedRecipe].[Notes] AS [Notes],
+ [DyelotsBulkedRecipe].[ProductIndex] AS [ProductIndex],
+ [DyelotsBulkedRecipe].[GRAVITY] AS [GRAVITY]
+ FROM [dbo].[DyelotsBulkedRecipe] AS [DyelotsBulkedRecipe]
+
+
+ SELECT
+ [DyelotsBulkedRecipeHistory].[Dyelot] AS [Dyelot],
+ [DyelotsBulkedRecipeHistory].[ReDye] AS [ReDye],
+ [DyelotsBulkedRecipeHistory].[StepNumber] AS [StepNumber],
+ [DyelotsBulkedRecipeHistory].[Station] AS [Station],
+ [DyelotsBulkedRecipeHistory].[DevideNo] AS [DevideNo],
+ [DyelotsBulkedRecipeHistory].[ShotNo] AS [ShotNo],
+ [DyelotsBulkedRecipeHistory].[ProductCode] AS [ProductCode],
+ [DyelotsBulkedRecipeHistory].[ProductName] AS [ProductName],
+ [DyelotsBulkedRecipeHistory].[ProductType] AS [ProductType],
+ [DyelotsBulkedRecipeHistory].[ProductLot] AS [ProductLot],
+ [DyelotsBulkedRecipeHistory].[ProductClass] AS [ProductClass],
+ [DyelotsBulkedRecipeHistory].[SN] AS [SN],
+ [DyelotsBulkedRecipeHistory].[Amount] AS [Amount],
+ [DyelotsBulkedRecipeHistory].[Grams] AS [Grams],
+ [DyelotsBulkedRecipeHistory].[Created] AS [Created],
+ [DyelotsBulkedRecipeHistory].[DispenseStartTime] AS [DispenseStartTime],
+ [DyelotsBulkedRecipeHistory].[DispenseEndTime] AS [DispenseEndTime],
+ [DyelotsBulkedRecipeHistory].[DispenseTime] AS [DispenseTime],
+ [DyelotsBulkedRecipeHistory].[DispenseGrams] AS [DispenseGrams],
+ [DyelotsBulkedRecipeHistory].[DispenseResult] AS [DispenseResult],
+ [DyelotsBulkedRecipeHistory].[LADispenseResult] AS [LADispenseResult],
+ [DyelotsBulkedRecipeHistory].[Volume] AS [Volume],
+ [DyelotsBulkedRecipeHistory].[HostRead] AS [HostRead],
+ [DyelotsBulkedRecipeHistory].[State] AS [State],
+ [DyelotsBulkedRecipeHistory].[NeedDispense] AS [NeedDispense],
+ [DyelotsBulkedRecipeHistory].[MixTankNo] AS [MixTankNo],
+ [DyelotsBulkedRecipeHistory].[DyeWeightTime] AS [DyeWeightTime],
+ [DyelotsBulkedRecipeHistory].[Process] AS [Process],
+ [DyelotsBulkedRecipeHistory].[FinalProcess] AS [FinalProcess],
+ [DyelotsBulkedRecipeHistory].[Dispenser] AS [Dispenser],
+ [DyelotsBulkedRecipeHistory].[TankNo] AS [TankNo],
+ [DyelotsBulkedRecipeHistory].[Error] AS [Error],
+ [DyelotsBulkedRecipeHistory].[BucketNo] AS [BucketNo],
+ [DyelotsBulkedRecipeHistory].[DID] AS [DID],
+ [DyelotsBulkedRecipeHistory].[StepDevideNo] AS [StepDevideNo],
+ [DyelotsBulkedRecipeHistory].[StepTotalBuckets] AS [StepTotalBuckets],
+ [DyelotsBulkedRecipeHistory].[ReferenceDyelot] AS [ReferenceDyelot],
+ [DyelotsBulkedRecipeHistory].[DispenseWater] AS [DispenseWater],
+ [DyelotsBulkedRecipeHistory].[DrainWater] AS [DrainWater],
+ [DyelotsBulkedRecipeHistory].[DissolveTemperature] AS [DissolveTemperature],
+ [DyelotsBulkedRecipeHistory].[SchDispenseTime] AS [SchDispenseTime],
+ [DyelotsBulkedRecipeHistory].[FinishTime] AS [FinishTime],
+ [DyelotsBulkedRecipeHistory].[UserAccount] AS [UserAccount],
+ [DyelotsBulkedRecipeHistory].[Updated] AS [Updated],
+ [DyelotsBulkedRecipeHistory].[Tagged] AS [Tagged],
+ [DyelotsBulkedRecipeHistory].[TotalBuckets] AS [TotalBuckets],
+ [DyelotsBulkedRecipeHistory].[Final] AS [Final],
+ [DyelotsBulkedRecipeHistory].[DissolveManual] AS [DissolveManual],
+ [DyelotsBulkedRecipeHistory].[DeductTotalBuckets] AS [DeductTotalBuckets],
+ [DyelotsBulkedRecipeHistory].[DeductBuckets] AS [DeductBuckets]
+ FROM [dbo].[DyelotsBulkedRecipeHistory] AS [DyelotsBulkedRecipeHistory]
+
+
+ SELECT
+ [DyelotsHistory].[ID] AS [ID],
+ [DyelotsHistory].[Dyelot] AS [Dyelot],
+ [DyelotsHistory].[ReDye] AS [ReDye],
+ [DyelotsHistory].[Industry] AS [Industry],
+ [DyelotsHistory].[Machine] AS [Machine],
+ [DyelotsHistory].[DispenseMachine] AS [DispenseMachine],
+ [DyelotsHistory].[StartTime] AS [StartTime],
+ [DyelotsHistory].[EndTime] AS [EndTime],
+ [DyelotsHistory].[StandardTime] AS [StandardTime],
+ [DyelotsHistory].[TotalShot] AS [TotalShot],
+ [DyelotsHistory].[State] AS [State],
+ [DyelotsHistory].[Blocked] AS [Blocked],
+ [DyelotsHistory].[Program] AS [Program],
+ [DyelotsHistory].[Color] AS [Color],
+ [DyelotsHistory].[CreationTime] AS [CreationTime],
+ [DyelotsHistory].[Batch] AS [Batch],
+ [DyelotsHistory].[OrderNo] AS [OrderNo],
+ [DyelotsHistory].[TotalWeight] AS [TotalWeight],
+ [DyelotsHistory].[LiquidRatio] AS [LiquidRatio],
+ [DyelotsHistory].[TotalVolume] AS [TotalVolume],
+ [DyelotsHistory].[AcidQty] AS [AcidQty],
+ [DyelotsHistory].[ActualAcidQty] AS [ActualAcidQty],
+ [DyelotsHistory].[Sequence] AS [Sequence],
+ [DyelotsHistory].[DispenseMode] AS [DispenseMode],
+ [DyelotsHistory].[DyeDissolve] AS [DyeDissolve],
+ [DyelotsHistory].[CheDissolve] AS [CheDissolve],
+ [DyelotsHistory].[TotalBuckets] AS [TotalBuckets],
+ [DyelotsHistory].[SpcTotalBuckets] AS [SpcTotalBuckets],
+ [DyelotsHistory].[DissolveMethod] AS [DissolveMethod],
+ [DyelotsHistory].[ReferenceDyelot] AS [ReferenceDyelot],
+ [DyelotsHistory].[Final] AS [Final],
+ [DyelotsHistory].[Shade] AS [Shade],
+ [DyelotsHistory].[UserAccount] AS [UserAccount],
+ [DyelotsHistory].[Updated] AS [Updated]
+ FROM [dbo].[DyelotsHistory] AS [DyelotsHistory]
+
+
+ SELECT
+ [DyelotsInAuto].[Machine] AS [Machine],
+ [DyelotsInAuto].[Dyelot] AS [Dyelot],
+ [DyelotsInAuto].[ReDye] AS [ReDye],
+ [DyelotsInAuto].[StepNumber] AS [StepNumber],
+ [DyelotsInAuto].[DyeState] AS [DyeState],
+ [DyelotsInAuto].[SchDispenseTime] AS [SchDispenseTime],
+ [DyelotsInAuto].[IsCheck] AS [IsCheck],
+ [DyelotsInAuto].[Shade] AS [Shade]
+ FROM [dbo].[DyelotsInAuto] AS [DyelotsInAuto]
+
+
+ SELECT
+ [DyelotsInAutoHistory].[Machine] AS [Machine],
+ [DyelotsInAutoHistory].[Dyelot] AS [Dyelot],
+ [DyelotsInAutoHistory].[ReDye] AS [ReDye],
+ [DyelotsInAutoHistory].[StepNumber] AS [StepNumber],
+ [DyelotsInAutoHistory].[DyeState] AS [DyeState],
+ [DyelotsInAutoHistory].[SchDispenseTime] AS [SchDispenseTime],
+ [DyelotsInAutoHistory].[IsCheck] AS [IsCheck],
+ [DyelotsInAutoHistory].[Shade] AS [Shade]
+ FROM [dbo].[DyelotsInAutoHistory] AS [DyelotsInAutoHistory]
+
+
+ SELECT
+ [EventList].[Code] AS [Code],
+ [EventList].[Description] AS [Description],
+ [EventList].[Description_BIG] AS [Description_BIG],
+ [EventList].[Description_GB] AS [Description_GB],
+ [EventList].[CreateDate] AS [CreateDate]
+ FROM [dbo].[EventList] AS [EventList]
+
+
+ SELECT
+ [LA571Tanks].[Name] AS [Name],
+ [LA571Tanks].[Station] AS [Station],
+ [LA571Tanks].[Tank] AS [Tank],
+ [LA571Tanks].[Volume] AS [Volume],
+ [LA571Tanks].[State] AS [State]
+ FROM [dbo].[LA571Tanks] AS [LA571Tanks]
+
+
+ SELECT
+ [LabDyeDslvQueue].[TankNo] AS [TankNo],
+ [LabDyeDslvQueue].[Dyelot] AS [Dyelot],
+ [LabDyeDslvQueue].[ReDye] AS [ReDye],
+ [LabDyeDslvQueue].[StepNumber] AS [StepNumber],
+ [LabDyeDslvQueue].[State] AS [State],
+ [LabDyeDslvQueue].[ShelfID] AS [ShelfID],
+ [LabDyeDslvQueue].[DistID] AS [DistID],
+ [LabDyeDslvQueue].[SchDispenseTime] AS [SchDispenseTime],
+ [LabDyeDslvQueue].[Updated] AS [Updated]
+ FROM [dbo].[LabDyeDslvQueue] AS [LabDyeDslvQueue]
+
+
+ SELECT
+ [LabDyeDslvQueueHistory].[TankNo] AS [TankNo],
+ [LabDyeDslvQueueHistory].[Dyelot] AS [Dyelot],
+ [LabDyeDslvQueueHistory].[ReDye] AS [ReDye],
+ [LabDyeDslvQueueHistory].[StepNumber] AS [StepNumber],
+ [LabDyeDslvQueueHistory].[State] AS [State],
+ [LabDyeDslvQueueHistory].[ShelfID] AS [ShelfID],
+ [LabDyeDslvQueueHistory].[DistID] AS [DistID],
+ [LabDyeDslvQueueHistory].[SchDispenseTime] AS [SchDispenseTime],
+ [LabDyeDslvQueueHistory].[Created] AS [Created]
+ FROM [dbo].[LabDyeDslvQueueHistory] AS [LabDyeDslvQueueHistory]
+
+
+ SELECT
+ [MachinesHistory].[Machine] AS [Machine],
+ [MachinesHistory].[DispenseDyelot] AS [DispenseDyelot],
+ [MachinesHistory].[DispenseReDye] AS [DispenseReDye],
+ [MachinesHistory].[ChemicalCallOff] AS [ChemicalCallOff],
+ [MachinesHistory].[ChemicalState] AS [ChemicalState],
+ [MachinesHistory].[ChemicalTank] AS [ChemicalTank],
+ [MachinesHistory].[ChemicalTankSize] AS [ChemicalTankSize],
+ [MachinesHistory].[ChemicalDispenser] AS [ChemicalDispenser],
+ [MachinesHistory].[ChemicalError] AS [ChemicalError],
+ [MachinesHistory].[ChemicalCallOff2] AS [ChemicalCallOff2],
+ [MachinesHistory].[ChemicalState2] AS [ChemicalState2],
+ [MachinesHistory].[ChemicalTank2] AS [ChemicalTank2],
+ [MachinesHistory].[DyeCallOff] AS [DyeCallOff],
+ [MachinesHistory].[DyeState] AS [DyeState],
+ [MachinesHistory].[DyeTank] AS [DyeTank],
+ [MachinesHistory].[DyeTankSize] AS [DyeTankSize],
+ [MachinesHistory].[DyeDispenser] AS [DyeDispenser],
+ [MachinesHistory].[DyeError] AS [DyeError],
+ [MachinesHistory].[PowderCallOff] AS [PowderCallOff],
+ [MachinesHistory].[PowderState] AS [PowderState],
+ [MachinesHistory].[PowderTank] AS [PowderTank],
+ [MachinesHistory].[PowderTankSize] AS [PowderTankSize],
+ [MachinesHistory].[PowderDispenser] AS [PowderDispenser],
+ [MachinesHistory].[PowderError] AS [PowderError],
+ [MachinesHistory].[HostRead] AS [HostRead],
+ [MachinesHistory].[DyeDispenseDyelot] AS [DyeDispenseDyelot],
+ [MachinesHistory].[DyeDispenseReDye] AS [DyeDispenseReDye],
+ [MachinesHistory].[Updated] AS [Updated]
+ FROM [dbo].[MachinesHistory] AS [MachinesHistory]
+
+
+ SELECT
+ [MachineStateHistory].[Machine] AS [Machine],
+ [MachineStateHistory].[DispenseDyelot] AS [DispenseDyelot],
+ [MachineStateHistory].[DispenseReDye] AS [DispenseReDye],
+ [MachineStateHistory].[ChemicalCallOff] AS [ChemicalCallOff],
+ [MachineStateHistory].[ChemicalState] AS [ChemicalState],
+ [MachineStateHistory].[ChemicalTank] AS [ChemicalTank],
+ [MachineStateHistory].[ChemicalTankSize] AS [ChemicalTankSize],
+ [MachineStateHistory].[ChemicalDispenser] AS [ChemicalDispenser],
+ [MachineStateHistory].[ChemicalError] AS [ChemicalError],
+ [MachineStateHistory].[ChemicalTargetSelect] AS [ChemicalTargetSelect],
+ [MachineStateHistory].[DyeCallOff] AS [DyeCallOff],
+ [MachineStateHistory].[DyeState] AS [DyeState],
+ [MachineStateHistory].[DyeTank] AS [DyeTank],
+ [MachineStateHistory].[DyeTankSize] AS [DyeTankSize],
+ [MachineStateHistory].[DyeDispenser] AS [DyeDispenser],
+ [MachineStateHistory].[DyeError] AS [DyeError],
+ [MachineStateHistory].[PowderCallOff] AS [PowderCallOff],
+ [MachineStateHistory].[PowderState] AS [PowderState],
+ [MachineStateHistory].[PowderTank] AS [PowderTank],
+ [MachineStateHistory].[PowderTankSize] AS [PowderTankSize],
+ [MachineStateHistory].[PowderDispenser] AS [PowderDispenser],
+ [MachineStateHistory].[PowderError] AS [PowderError],
+ [MachineStateHistory].[HostRead] AS [HostRead],
+ [MachineStateHistory].[Updated] AS [Updated]
+ FROM [dbo].[MachineStateHistory] AS [MachineStateHistory]
+
+
+ SELECT
+ [ManualWeightQueue].[Dyelot] AS [Dyelot],
+ [ManualWeightQueue].[ReDye] AS [ReDye],
+ [ManualWeightQueue].[StepNumber] AS [StepNumber],
+ [ManualWeightQueue].[State] AS [State],
+ [ManualWeightQueue].[CallTime] AS [CallTime],
+ [ManualWeightQueue].[Module] AS [Module],
+ [ManualWeightQueue].[ModuleName] AS [ModuleName],
+ [ManualWeightQueue].[Area] AS [Area],
+ [ManualWeightQueue].[EndTime] AS [EndTime],
+ [ManualWeightQueue].[Updated] AS [Updated]
+ FROM [dbo].[ManualWeightQueue] AS [ManualWeightQueue]
+
+
+ SELECT
+ [ManualWeightQueueHistory].[Dyelot] AS [Dyelot],
+ [ManualWeightQueueHistory].[ReDye] AS [ReDye],
+ [ManualWeightQueueHistory].[StepNumber] AS [StepNumber],
+ [ManualWeightQueueHistory].[State] AS [State],
+ [ManualWeightQueueHistory].[CallTime] AS [CallTime],
+ [ManualWeightQueueHistory].[Module] AS [Module],
+ [ManualWeightQueueHistory].[ModuleName] AS [ModuleName],
+ [ManualWeightQueueHistory].[Area] AS [Area],
+ [ManualWeightQueueHistory].[EndTime] AS [EndTime],
+ [ManualWeightQueueHistory].[Created] AS [Created]
+ FROM [dbo].[ManualWeightQueueHistory] AS [ManualWeightQueueHistory]
+
+
+ SELECT
+ [PartsStatus].[CUST_CODE] AS [CUST_CODE],
+ [PartsStatus].[Dispenser] AS [Dispenser],
+ [PartsStatus].[PartsCode] AS [PartsCode],
+ [PartsStatus].[PartsName] AS [PartsName],
+ [PartsStatus].[PartsType] AS [PartsType],
+ [PartsStatus].[Description] AS [Description],
+ [PartsStatus].[FactoryValue] AS [FactoryValue],
+ [PartsStatus].[UsedCount] AS [UsedCount],
+ [PartsStatus].[RunningTime] AS [RunningTime],
+ [PartsStatus].[ResetDate] AS [ResetDate],
+ [PartsStatus].[WarnDate] AS [WarnDate],
+ [PartsStatus].[UpdateDate] AS [UpdateDate],
+ [PartsStatus].[CreateDate] AS [CreateDate],
+ [PartsStatus].[UserAccount] AS [UserAccount]
+ FROM [dbo].[PartsStatus] AS [PartsStatus]
+
+
+ SELECT
+ [PartsStatusHistory].[CUST_CODE] AS [CUST_CODE],
+ [PartsStatusHistory].[Dispenser] AS [Dispenser],
+ [PartsStatusHistory].[PartsCode] AS [PartsCode],
+ [PartsStatusHistory].[PartsName] AS [PartsName],
+ [PartsStatusHistory].[PartsType] AS [PartsType],
+ [PartsStatusHistory].[Description] AS [Description],
+ [PartsStatusHistory].[FactoryValue] AS [FactoryValue],
+ [PartsStatusHistory].[UsedCount] AS [UsedCount],
+ [PartsStatusHistory].[RunningTime] AS [RunningTime],
+ [PartsStatusHistory].[ResetDate] AS [ResetDate],
+ [PartsStatusHistory].[WarnDate] AS [WarnDate],
+ [PartsStatusHistory].[UpdateDate] AS [UpdateDate],
+ [PartsStatusHistory].[CreateDate] AS [CreateDate],
+ [PartsStatusHistory].[UserAccount] AS [UserAccount]
+ FROM [dbo].[PartsStatusHistory] AS [PartsStatusHistory]
+
+
+ SELECT
+ [PipeFill].[ProductCode] AS [ProductCode],
+ [PipeFill].[ProductName] AS [ProductName],
+ [PipeFill].[Dispenser] AS [Dispenser],
+ [PipeFill].[No] AS [No],
+ [PipeFill].[Qty] AS [Qty],
+ [PipeFill].[StartTime] AS [StartTime],
+ [PipeFill].[EndTime] AS [EndTime],
+ [PipeFill].[AlarmTime] AS [AlarmTime],
+ [PipeFill].[Updated] AS [Updated]
+ FROM [dbo].[PipeFill] AS [PipeFill]
+
+
+ SELECT
+ [PipeHistory].[ProductCode] AS [ProductCode],
+ [PipeHistory].[ProductName] AS [ProductName],
+ [PipeHistory].[ProductType] AS [ProductType],
+ [PipeHistory].[Dispenser] AS [Dispenser],
+ [PipeHistory].[No] AS [No],
+ [PipeHistory].[Qty] AS [Qty],
+ [PipeHistory].[StartTime] AS [StartTime],
+ [PipeHistory].[EndTime] AS [EndTime],
+ [PipeHistory].[AlarmTime] AS [AlarmTime],
+ [PipeHistory].[Created] AS [Created]
+ FROM [dbo].[PipeHistory] AS [PipeHistory]
+
+
+ SELECT
+ [Pipes].[ProductCode] AS [ProductCode],
+ [Pipes].[ProductName] AS [ProductName],
+ [Pipes].[ProductType] AS [ProductType],
+ [Pipes].[Dispenser] AS [Dispenser],
+ [Pipes].[Enabled] AS [Enabled],
+ [Pipes].[No] AS [No],
+ [Pipes].[MinLimit] AS [MinLimit],
+ [Pipes].[MaxLimit] AS [MaxLimit],
+ [Pipes].[MinAction] AS [MinAction],
+ [Pipes].[MaxAction] AS [MaxAction],
+ [Pipes].[Conc] AS [Conc],
+ [Pipes].[Gravity] AS [Gravity],
+ [Pipes].[Alarm] AS [Alarm]
+ FROM [dbo].[Pipes] AS [Pipes]
+
+
+ SELECT
+ [RecipeDeduct].[Dyelot] AS [Dyelot],
+ [RecipeDeduct].[ReDye] AS [ReDye],
+ [RecipeDeduct].[StepNumber] AS [StepNumber],
+ [RecipeDeduct].[Station] AS [Station],
+ [RecipeDeduct].[ShotNo] AS [ShotNo],
+ [RecipeDeduct].[ProductCode] AS [ProductCode],
+ [RecipeDeduct].[DeductTime] AS [DeductTime],
+ [RecipeDeduct].[DeductGrams] AS [DeductGrams],
+ [RecipeDeduct].[BucketNo] AS [BucketNo],
+ [RecipeDeduct].[DID] AS [DID],
+ [RecipeDeduct].[UserAccount] AS [UserAccount]
+ FROM [dbo].[RecipeDeduct] AS [RecipeDeduct]
+
+
+ SELECT
+ [RecipeDeductHistory].[Dyelot] AS [Dyelot],
+ [RecipeDeductHistory].[ReDye] AS [ReDye],
+ [RecipeDeductHistory].[StepNumber] AS [StepNumber],
+ [RecipeDeductHistory].[Station] AS [Station],
+ [RecipeDeductHistory].[ShotNo] AS [ShotNo],
+ [RecipeDeductHistory].[ProductCode] AS [ProductCode],
+ [RecipeDeductHistory].[DeductTime] AS [DeductTime],
+ [RecipeDeductHistory].[DeductGrams] AS [DeductGrams],
+ [RecipeDeductHistory].[BucketNo] AS [BucketNo],
+ [RecipeDeductHistory].[DID] AS [DID],
+ [RecipeDeductHistory].[UserAccount] AS [UserAccount],
+ [RecipeDeductHistory].[Updated] AS [Updated]
+ FROM [dbo].[RecipeDeductHistory] AS [RecipeDeductHistory]
+
+
+ SELECT
+ [RFIDRecordQueue].[Station] AS [Station],
+ [RFIDRecordQueue].[Dyelot] AS [Dyelot],
+ [RFIDRecordQueue].[ReDye] AS [ReDye],
+ [RFIDRecordQueue].[StepNumber] AS [StepNumber],
+ [RFIDRecordQueue].[Machine] AS [Machine],
+ [RFIDRecordQueue].[DevideNo] AS [DevideNo],
+ [RFIDRecordQueue].[TotalBuckets] AS [TotalBuckets],
+ [RFIDRecordQueue].[State] AS [State],
+ [RFIDRecordQueue].[BucketNo] AS [BucketNo],
+ [RFIDRecordQueue].[DID] AS [DID],
+ [RFIDRecordQueue].[Updated] AS [Updated]
+ FROM [dbo].[RFIDRecordQueue] AS [RFIDRecordQueue]
+
+
+ SELECT
+ [RFIDRecordQueueHistory].[Station] AS [Station],
+ [RFIDRecordQueueHistory].[Dyelot] AS [Dyelot],
+ [RFIDRecordQueueHistory].[ReDye] AS [ReDye],
+ [RFIDRecordQueueHistory].[StepNumber] AS [StepNumber],
+ [RFIDRecordQueueHistory].[Machine] AS [Machine],
+ [RFIDRecordQueueHistory].[DevideNo] AS [DevideNo],
+ [RFIDRecordQueueHistory].[TotalBuckets] AS [TotalBuckets],
+ [RFIDRecordQueueHistory].[State] AS [State],
+ [RFIDRecordQueueHistory].[BucketNo] AS [BucketNo],
+ [RFIDRecordQueueHistory].[DID] AS [DID],
+ [RFIDRecordQueueHistory].[Created] AS [Created]
+ FROM [dbo].[RFIDRecordQueueHistory] AS [RFIDRecordQueueHistory]
+
+
+ SELECT
+ [SampleDyeDslvQueue].[TankNo] AS [TankNo],
+ [SampleDyeDslvQueue].[Dyelot] AS [Dyelot],
+ [SampleDyeDslvQueue].[ReDye] AS [ReDye],
+ [SampleDyeDslvQueue].[StepNumber] AS [StepNumber],
+ [SampleDyeDslvQueue].[State] AS [State],
+ [SampleDyeDslvQueue].[PassAuto] AS [PassAuto],
+ [SampleDyeDslvQueue].[ShelfID] AS [ShelfID],
+ [SampleDyeDslvQueue].[Machine] AS [Machine],
+ [SampleDyeDslvQueue].[SchDispenseTime] AS [SchDispenseTime],
+ [SampleDyeDslvQueue].[Updated] AS [Updated]
+ FROM [dbo].[SampleDyeDslvQueue] AS [SampleDyeDslvQueue]
+
+
+ SELECT
+ [SampleDyeDslvQueueHistory].[TankNo] AS [TankNo],
+ [SampleDyeDslvQueueHistory].[Dyelot] AS [Dyelot],
+ [SampleDyeDslvQueueHistory].[ReDye] AS [ReDye],
+ [SampleDyeDslvQueueHistory].[StepNumber] AS [StepNumber],
+ [SampleDyeDslvQueueHistory].[State] AS [State],
+ [SampleDyeDslvQueueHistory].[PassAuto] AS [PassAuto],
+ [SampleDyeDslvQueueHistory].[ShelfID] AS [ShelfID],
+ [SampleDyeDslvQueueHistory].[Machine] AS [Machine],
+ [SampleDyeDslvQueueHistory].[SchDispenseTime] AS [SchDispenseTime],
+ [SampleDyeDslvQueueHistory].[Created] AS [Created]
+ FROM [dbo].[SampleDyeDslvQueueHistory] AS [SampleDyeDslvQueueHistory]
+
+
+ SELECT
+ [Shelf].[ShelfID] AS [ShelfID],
+ [Shelf].[MaxLayer] AS [MaxLayer],
+ [Shelf].[MaxPosition] AS [MaxPosition]
+ FROM [dbo].[Shelf] AS [Shelf]
+
+
+ SELECT
+ [TagShelf].[BucketNo] AS [BucketNo],
+ [TagShelf].[Dyelot] AS [Dyelot],
+ [TagShelf].[Machines] AS [Machines],
+ [TagShelf].[TagManagerNo] AS [TagManagerNo],
+ [TagShelf].[ReDye] AS [ReDye],
+ [TagShelf].[StepNumber] AS [StepNumber],
+ [TagShelf].[DID] AS [DID],
+ [TagShelf].[TotalBuckets] AS [TotalBuckets],
+ [TagShelf].[DevideNo] AS [DevideNo],
+ [TagShelf].[OnShelfTime] AS [OnShelfTime]
+ FROM [dbo].[TagShelf] AS [TagShelf]
+
+
+ SELECT
+ [UserGroup].[Name] AS [Name],
+ [UserGroup].[password] AS [password],
+ [UserGroup].[Permission] AS [Permission],
+ [UserGroup].[User_Group] AS [User_Group]
+ FROM [dbo].[UserGroup] AS [UserGroup]
+
+
+ SELECT
+ [WaitChemical].[ID] AS [ID],
+ [WaitChemical].[Machine] AS [Machine],
+ [WaitChemical].[Dyelot] AS [Dyelot],
+ [WaitChemical].[ReDye] AS [ReDye],
+ [WaitChemical].[StepNumber] AS [StepNumber],
+ [WaitChemical].[CreationTime] AS [CreationTime],
+ [WaitChemical].[ProductType] AS [ProductType],
+ [WaitChemical].[ProductCode] AS [ProductCode],
+ [WaitChemical].[ProductName] AS [ProductName],
+ [WaitChemical].[Weight] AS [Weight],
+ [WaitChemical].[State] AS [State],
+ [WaitChemical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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BatchDyeingCentral.tt b/BatchDyeingCentral.tt
new file mode 100644
index 0000000..dd50f58
--- /dev/null
+++ b/BatchDyeingCentral.tt
@@ -0,0 +1,733 @@
+<#@ template language="C#" debug="false" hostspecific="true"#>
+<#@ include file="EF6.Utility.CS.ttinclude"#><#@
+ output extension=".cs"#><#
+
+const string inputFile = @"BatchDyeingCentral.edmx";
+var textTransform = DynamicTextTransformation.Create(this);
+var code = new CodeGenerationTools(this);
+var ef = new MetadataTools(this);
+var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
+var fileManager = EntityFrameworkTemplateFileManager.Create(this);
+var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
+var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
+
+if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
+{
+ return string.Empty;
+}
+
+WriteHeader(codeStringGenerator, fileManager);
+
+foreach (var entity in typeMapper.GetItemsToGenerate(itemCollection))
+{
+ fileManager.StartNewFile(entity.Name + ".cs");
+ BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
+<#=codeStringGenerator.EntityClassOpening(entity)#>
+{
+<#
+ var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
+ var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
+ var complexProperties = typeMapper.GetComplexProperties(entity);
+
+ if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
+ {
+#>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+ public <#=code.Escape(entity)#>()
+ {
+<#
+ foreach (var edmProperty in propertiesWithDefaultValues)
+ {
+#>
+ this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
+<#
+ }
+
+ foreach (var navigationProperty in collectionNavigationProperties)
+ {
+#>
+ this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
+<#
+ }
+
+ foreach (var complexProperty in complexProperties)
+ {
+#>
+ this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
+<#
+ }
+#>
+ }
+
+<#
+ }
+
+ var simpleProperties = typeMapper.GetSimpleProperties(entity);
+ if (simpleProperties.Any())
+ {
+ foreach (var edmProperty in simpleProperties)
+ {
+#>
+ <#=codeStringGenerator.Property(edmProperty)#>
+<#
+ }
+ }
+
+ if (complexProperties.Any())
+ {
+#>
+
+<#
+ foreach(var complexProperty in complexProperties)
+ {
+#>
+ <#=codeStringGenerator.Property(complexProperty)#>
+<#
+ }
+ }
+
+ var navigationProperties = typeMapper.GetNavigationProperties(entity);
+ if (navigationProperties.Any())
+ {
+#>
+
+<#
+ foreach (var navigationProperty in navigationProperties)
+ {
+ if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
+ {
+#>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+<#
+ }
+#>
+ <#=codeStringGenerator.NavigationProperty(navigationProperty)#>
+<#
+ }
+ }
+#>
+}
+<#
+ EndNamespace(code);
+}
+
+foreach (var complex in typeMapper.GetItemsToGenerate(itemCollection))
+{
+ fileManager.StartNewFile(complex.Name + ".cs");
+ BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
+<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
+{
+<#
+ var complexProperties = typeMapper.GetComplexProperties(complex);
+ var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
+
+ if (propertiesWithDefaultValues.Any() || complexProperties.Any())
+ {
+#>
+ public <#=code.Escape(complex)#>()
+ {
+<#
+ foreach (var edmProperty in propertiesWithDefaultValues)
+ {
+#>
+ this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
+<#
+ }
+
+ foreach (var complexProperty in complexProperties)
+ {
+#>
+ this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
+<#
+ }
+#>
+ }
+
+<#
+ }
+
+ var simpleProperties = typeMapper.GetSimpleProperties(complex);
+ if (simpleProperties.Any())
+ {
+ foreach(var edmProperty in simpleProperties)
+ {
+#>
+ <#=codeStringGenerator.Property(edmProperty)#>
+<#
+ }
+ }
+
+ if (complexProperties.Any())
+ {
+#>
+
+<#
+ foreach(var edmProperty in complexProperties)
+ {
+#>
+ <#=codeStringGenerator.Property(edmProperty)#>
+<#
+ }
+ }
+#>
+}
+<#
+ EndNamespace(code);
+}
+
+foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
+{
+ fileManager.StartNewFile(enumType.Name + ".cs");
+ BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
+<#
+ if (typeMapper.EnumIsFlags(enumType))
+ {
+#>
+[Flags]
+<#
+ }
+#>
+<#=codeStringGenerator.EnumOpening(enumType)#>
+{
+<#
+ var foundOne = false;
+
+ foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
+ {
+ foundOne = true;
+#>
+ <#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
+<#
+ }
+
+ if (foundOne)
+ {
+ this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
+ }
+#>
+}
+<#
+ EndNamespace(code);
+}
+
+fileManager.Process();
+
+#>
+<#+
+
+public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
+{
+ fileManager.StartHeader();
+#>
+//------------------------------------------------------------------------------
+//
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
+//
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
+// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
+//
+//------------------------------------------------------------------------------
+<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
+<#+
+ fileManager.EndBlock();
+}
+
+public void BeginNamespace(CodeGenerationTools code)
+{
+ var codeNamespace = code.VsNamespaceSuggestion();
+ if (!String.IsNullOrEmpty(codeNamespace))
+ {
+#>
+namespace <#=code.EscapeNamespace(codeNamespace)#>
+{
+<#+
+ PushIndent(" ");
+ }
+}
+
+public void EndNamespace(CodeGenerationTools code)
+{
+ if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
+ {
+ PopIndent();
+#>
+}
+<#+
+ }
+}
+
+public const string TemplateId = "CSharp_DbContext_Types_EF6";
+
+public class CodeStringGenerator
+{
+ private readonly CodeGenerationTools _code;
+ private readonly TypeMapper _typeMapper;
+ private readonly MetadataTools _ef;
+
+ public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
+ {
+ ArgumentNotNull(code, "code");
+ ArgumentNotNull(typeMapper, "typeMapper");
+ ArgumentNotNull(ef, "ef");
+
+ _code = code;
+ _typeMapper = typeMapper;
+ _ef = ef;
+ }
+
+ public string Property(EdmProperty edmProperty)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2} {{ {3}get; {4}set; }}",
+ Accessibility.ForProperty(edmProperty),
+ _typeMapper.GetTypeName(edmProperty.TypeUsage),
+ _code.Escape(edmProperty),
+ _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
+ _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
+ }
+
+ public string NavigationProperty(NavigationProperty navProp)
+ {
+ var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2} {{ {3}get; {4}set; }}",
+ AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
+ navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
+ _code.Escape(navProp),
+ _code.SpaceAfter(Accessibility.ForGetter(navProp)),
+ _code.SpaceAfter(Accessibility.ForSetter(navProp)));
+ }
+
+ public string AccessibilityAndVirtual(string accessibility)
+ {
+ return accessibility + (accessibility != "private" ? " virtual" : "");
+ }
+
+ public string EntityClassOpening(EntityType entity)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1}partial class {2}{3}",
+ Accessibility.ForType(entity),
+ _code.SpaceAfter(_code.AbstractOption(entity)),
+ _code.Escape(entity),
+ _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
+ }
+
+ public string EnumOpening(SimpleType enumType)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} enum {1} : {2}",
+ Accessibility.ForType(enumType),
+ _code.Escape(enumType),
+ _code.Escape(_typeMapper.UnderlyingClrType(enumType)));
+ }
+
+ public void WriteFunctionParameters(EdmFunction edmFunction, Action writeParameter)
+ {
+ var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+ foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
+ {
+ var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
+ var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
+ var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
+ writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
+ }
+ }
+
+ public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} IQueryable<{1}> {2}({3})",
+ AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+ _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+ _code.Escape(edmFunction),
+ string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
+ }
+
+ public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
+ _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+ edmFunction.NamespaceName,
+ edmFunction.Name,
+ string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
+ _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
+ }
+
+ public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+ var returnType = _typeMapper.GetReturnType(edmFunction);
+
+ var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
+ if (includeMergeOption)
+ {
+ paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
+ }
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} {1} {2}({3})",
+ AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+ returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+ _code.Escape(edmFunction),
+ paramList);
+ }
+
+ public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+ {
+ var parameters = _typeMapper.GetParameters(edmFunction);
+ var returnType = _typeMapper.GetReturnType(edmFunction);
+
+ var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
+ if (includeMergeOption)
+ {
+ callParams = ", mergeOption" + callParams;
+ }
+
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
+ returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+ edmFunction.Name,
+ callParams);
+ }
+
+ public string DbSet(EntitySet entitySet)
+ {
+ return string.Format(
+ CultureInfo.InvariantCulture,
+ "{0} virtual DbSet<{1}> {2} {{ get; set; }}",
+ Accessibility.ForReadOnlyProperty(entitySet),
+ _typeMapper.GetTypeName(entitySet.ElementType),
+ _code.Escape(entitySet));
+ }
+
+ public string UsingDirectives(bool inHeader, bool includeCollections = true)
+ {
+ return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
+ ? string.Format(
+ CultureInfo.InvariantCulture,
+ "{0}using System;{1}" +
+ "{2}",
+ inHeader ? Environment.NewLine : "",
+ includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
+ inHeader ? "" : Environment.NewLine)
+ : "";
+ }
+}
+
+public class TypeMapper
+{
+ private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
+
+ private readonly System.Collections.IList _errors;
+ private readonly CodeGenerationTools _code;
+ private readonly MetadataTools _ef;
+
+ public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
+ {
+ ArgumentNotNull(code, "code");
+ ArgumentNotNull(ef, "ef");
+ ArgumentNotNull(errors, "errors");
+
+ _code = code;
+ _ef = ef;
+ _errors = errors;
+ }
+
+ public static string FixNamespaces(string typeName)
+ {
+ return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
+ }
+
+ public string GetTypeName(TypeUsage typeUsage)
+ {
+ return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
+ }
+
+ public string GetTypeName(EdmType edmType)
+ {
+ return GetTypeName(edmType, isNullable: null, modelNamespace: null);
+ }
+
+ public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
+ {
+ return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
+ }
+
+ public string GetTypeName(EdmType edmType, string modelNamespace)
+ {
+ return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
+ }
+
+ public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
+ {
+ if (edmType == null)
+ {
+ return null;
+ }
+
+ var collectionType = edmType as CollectionType;
+ if (collectionType != null)
+ {
+ return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
+ }
+
+ var typeName = _code.Escape(edmType.MetadataProperties
+ .Where(p => p.Name == ExternalTypeNameAttributeName)
+ .Select(p => (string)p.Value)
+ .FirstOrDefault())
+ ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
+ _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
+ _code.Escape(edmType));
+
+ if (edmType is StructuralType)
+ {
+ return typeName;
+ }
+
+ if (edmType is SimpleType)
+ {
+ var clrType = UnderlyingClrType(edmType);
+ if (!IsEnumType(edmType))
+ {
+ typeName = _code.Escape(clrType);
+ }
+
+ typeName = FixNamespaces(typeName);
+
+ return clrType.IsValueType && isNullable == true ?
+ String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
+ typeName;
+ }
+
+ throw new ArgumentException("edmType");
+ }
+
+ public Type UnderlyingClrType(EdmType edmType)
+ {
+ ArgumentNotNull(edmType, "edmType");
+
+ var primitiveType = edmType as PrimitiveType;
+ if (primitiveType != null)
+ {
+ return primitiveType.ClrEquivalentType;
+ }
+
+ if (IsEnumType(edmType))
+ {
+ return GetEnumUnderlyingType(edmType).ClrEquivalentType;
+ }
+
+ return typeof(object);
+ }
+
+ public object GetEnumMemberValue(MetadataItem enumMember)
+ {
+ ArgumentNotNull(enumMember, "enumMember");
+
+ var valueProperty = enumMember.GetType().GetProperty("Value");
+ return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
+ }
+
+ public string GetEnumMemberName(MetadataItem enumMember)
+ {
+ ArgumentNotNull(enumMember, "enumMember");
+
+ var nameProperty = enumMember.GetType().GetProperty("Name");
+ return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
+ }
+
+ public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ var membersProperty = enumType.GetType().GetProperty("Members");
+ return membersProperty != null
+ ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
+ : Enumerable.Empty();
+ }
+
+ public bool EnumIsFlags(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
+ return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
+ }
+
+ public bool IsEnumType(GlobalItem edmType)
+ {
+ ArgumentNotNull(edmType, "edmType");
+
+ return edmType.GetType().Name == "EnumType";
+ }
+
+ public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
+ {
+ ArgumentNotNull(enumType, "enumType");
+
+ return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
+ }
+
+ public string CreateLiteral(object value)
+ {
+ if (value == null || value.GetType() != typeof(TimeSpan))
+ {
+ return _code.CreateLiteral(value);
+ }
+
+ return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
+ }
+
+ public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable types, string sourceFile)
+ {
+ ArgumentNotNull(types, "types");
+ ArgumentNotNull(sourceFile, "sourceFile");
+
+ var hash = new HashSet(StringComparer.InvariantCultureIgnoreCase);
+ if (types.Any(item => !hash.Add(item)))
+ {
+ _errors.Add(
+ new CompilerError(sourceFile, -1, -1, "6023",
+ String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
+ return false;
+ }
+ return true;
+ }
+
+ public IEnumerable GetEnumItemsToGenerate(IEnumerable itemCollection)
+ {
+ return GetItemsToGenerate(itemCollection)
+ .Where(e => IsEnumType(e));
+ }
+
+ public IEnumerable GetItemsToGenerate(IEnumerable itemCollection) where T: EdmType
+ {
+ return itemCollection
+ .OfType()
+ .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
+ .OrderBy(i => i.Name);
+ }
+
+ public IEnumerable GetAllGlobalItems(IEnumerable itemCollection)
+ {
+ return itemCollection
+ .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
+ .Select(g => GetGlobalItemName(g));
+ }
+
+ public string GetGlobalItemName(GlobalItem item)
+ {
+ if (item is EdmType)
+ {
+ return ((EdmType)item).Name;
+ }
+ else
+ {
+ return ((EntityContainer)item).Name;
+ }
+ }
+
+ public IEnumerable GetSimpleProperties(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+ }
+
+ public IEnumerable GetSimpleProperties(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+ }
+
+ public IEnumerable GetComplexProperties(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+ }
+
+ public IEnumerable GetComplexProperties(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+ }
+
+ public IEnumerable GetPropertiesWithDefaultValues(EntityType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+ }
+
+ public IEnumerable GetPropertiesWithDefaultValues(ComplexType type)
+ {
+ return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+ }
+
+ public IEnumerable GetNavigationProperties(EntityType type)
+ {
+ return type.NavigationProperties.Where(np => np.DeclaringType == type);
+ }
+
+ public IEnumerable GetCollectionNavigationProperties(EntityType type)
+ {
+ return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+ }
+
+ public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
+ {
+ ArgumentNotNull(edmFunction, "edmFunction");
+
+ var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
+ return returnParamsProperty == null
+ ? edmFunction.ReturnParameter
+ : ((IEnumerable)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
+ }
+
+ public bool IsComposable(EdmFunction edmFunction)
+ {
+ ArgumentNotNull(edmFunction, "edmFunction");
+
+ var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
+ return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
+ }
+
+ public IEnumerable GetParameters(EdmFunction edmFunction)
+ {
+ return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+ }
+
+ public TypeUsage GetReturnType(EdmFunction edmFunction)
+ {
+ var returnParam = GetReturnParameter(edmFunction);
+ return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
+ }
+
+ public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
+ {
+ var returnType = GetReturnType(edmFunction);
+ return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
+ }
+}
+
+public static void ArgumentNotNull(T arg, string name) where T : class
+{
+ if (arg == null)
+ {
+ throw new ArgumentNullException(name);
+ }
+}
+#>
\ No newline at end of file
diff --git a/BucketInfo.cs b/BucketInfo.cs
new file mode 100644
index 0000000..e601221
--- /dev/null
+++ b/BucketInfo.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class BucketInfo
+ {
+ public int BucketNo { get; set; }
+ public string DID { get; set; }
+ public Nullable StartTime { get; set; }
+ public Nullable EndTime { get; set; }
+ public Nullable Used { get; set; }
+ public string UserAccount { get; set; }
+ }
+}
diff --git a/BucketShelf.cs b/BucketShelf.cs
new file mode 100644
index 0000000..e9a7c23
--- /dev/null
+++ b/BucketShelf.cs
@@ -0,0 +1,32 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class BucketShelf
+ {
+ public Nullable BucketNo { get; set; }
+ public Nullable ShelfID { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public string Station { get; set; }
+ public string DID { get; set; }
+ public Nullable TotalBuckets { get; set; }
+ public Nullable DevideNo { get; set; }
+ public Nullable XPos { get; set; }
+ public Nullable YPos { get; set; }
+ public Nullable State { get; set; }
+ public Nullable OnShelfTime { get; set; }
+ public string UserAccount { get; set; }
+ }
+}
diff --git a/BucketShelfHistory.cs b/BucketShelfHistory.cs
new file mode 100644
index 0000000..bc52971
--- /dev/null
+++ b/BucketShelfHistory.cs
@@ -0,0 +1,32 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class BucketShelfHistory
+ {
+ public Nullable BucketNo { get; set; }
+ public Nullable ShelfID { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public string Station { get; set; }
+ public string DID { get; set; }
+ public Nullable TotalBuckets { get; set; }
+ public Nullable DevideNo { get; set; }
+ public Nullable XPos { get; set; }
+ public Nullable YPos { get; set; }
+ public Nullable State { get; set; }
+ public Nullable OnShelfTime { get; set; }
+ public string UserAccount { get; set; }
+ }
+}
diff --git a/BucketShelfQueue.cs b/BucketShelfQueue.cs
new file mode 100644
index 0000000..14f1be3
--- /dev/null
+++ b/BucketShelfQueue.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class BucketShelfQueue
+ {
+ public Nullable BucketNo { get; set; }
+ public Nullable ShelfID { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public Nullable TotalBuckets { get; set; }
+ public Nullable DevideNo { get; set; }
+ public Nullable XPos { get; set; }
+ public Nullable YPos { get; set; }
+ public Nullable State { get; set; }
+ public Nullable Updated { get; set; }
+ }
+}
diff --git a/BucketShelfQueueHistory.cs b/BucketShelfQueueHistory.cs
new file mode 100644
index 0000000..f0fe1a0
--- /dev/null
+++ b/BucketShelfQueueHistory.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class BucketShelfQueueHistory
+ {
+ public Nullable BucketNo { get; set; }
+ public Nullable ShelfID { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public Nullable TotalBuckets { get; set; }
+ public Nullable DevideNo { get; set; }
+ public Nullable XPos { get; set; }
+ public Nullable YPos { get; set; }
+ public Nullable State { get; set; }
+ public Nullable Created { get; set; }
+ }
+}
diff --git a/CHEMICAL_QUEUE.cs b/CHEMICAL_QUEUE.cs
new file mode 100644
index 0000000..cbc1893
--- /dev/null
+++ b/CHEMICAL_QUEUE.cs
@@ -0,0 +1,27 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class CHEMICAL_QUEUE
+ {
+ public string tmp_field { get; set; }
+ public string ID_NO { get; set; }
+ public Nullable STEP_NO { get; set; }
+ public string CREATE_DATE { get; set; }
+ public string CREATE_TIME { get; set; }
+ public string FIRST_KEY { get; set; }
+ public string SECOND_KEY { get; set; }
+ public Nullable PRIORITY { get; set; }
+ public int ReDye { get; set; }
+ }
+}
diff --git a/CleanDevice.cs b/CleanDevice.cs
new file mode 100644
index 0000000..0874fd9
--- /dev/null
+++ b/CleanDevice.cs
@@ -0,0 +1,21 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class CleanDevice
+ {
+ public string ID { get; set; }
+ public Nullable State { get; set; }
+ public Nullable Enabled { get; set; }
+ }
+}
diff --git a/Customize.cs b/Customize.cs
new file mode 100644
index 0000000..de06d1d
--- /dev/null
+++ b/Customize.cs
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class Customize
+ {
+ public int AutoKey { get; set; }
+ public string StoppageReasons { get; set; }
+ public string Inefficiencies { get; set; }
+ public string Company { get; set; }
+ public string Shifts { get; set; }
+ }
+}
diff --git a/DYESTUFF_QUEUE.cs b/DYESTUFF_QUEUE.cs
new file mode 100644
index 0000000..2f35fc3
--- /dev/null
+++ b/DYESTUFF_QUEUE.cs
@@ -0,0 +1,27 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DYESTUFF_QUEUE
+ {
+ public string tmp_field { get; set; }
+ public string ID_NO { get; set; }
+ public Nullable STEP_NO { get; set; }
+ public string CREATE_DATE { get; set; }
+ public string CREATE_TIME { get; set; }
+ public string FIRST_KEY { get; set; }
+ public string SECOND_KEY { get; set; }
+ public Nullable PRIORITY { get; set; }
+ public int ReDye { get; set; }
+ }
+}
diff --git a/Delays.cs b/Delays.cs
new file mode 100644
index 0000000..9367b69
--- /dev/null
+++ b/Delays.cs
@@ -0,0 +1,28 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class Delays
+ {
+ public int ID { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public string Machine { get; set; }
+ public string Name { get; set; }
+ public int Number { get; set; }
+ public System.DateTime StartTime { get; set; }
+ public System.DateTime EndTime { get; set; }
+ public double Duration { get; set; }
+ public string Shift { get; set; }
+ }
+}
diff --git a/DispenserEvent.cs b/DispenserEvent.cs
new file mode 100644
index 0000000..5cbc8b4
--- /dev/null
+++ b/DispenserEvent.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DispenserEvent
+ {
+ public int EventID { get; set; }
+ public Nullable EventType { get; set; }
+ public string Dispenser { get; set; }
+ public string Dyelot { get; set; }
+ public Nullable ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public Nullable Code { get; set; }
+ public string Description { get; set; }
+ public string Description_BIG { get; set; }
+ public string Description_GB { get; set; }
+ public Nullable CreateDate { get; set; }
+ public Nullable ConfirmDate { get; set; }
+ public Nullable FinishDate { get; set; }
+ public string Shift { get; set; }
+ public string UserAccount { get; set; }
+ }
+}
diff --git a/DispenserLifeStatus.cs b/DispenserLifeStatus.cs
new file mode 100644
index 0000000..ba2c683
--- /dev/null
+++ b/DispenserLifeStatus.cs
@@ -0,0 +1,21 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DispenserLifeStatus
+ {
+ public string Dispenser { get; set; }
+ public Nullable HeartBeat { get; set; }
+ public Nullable UpdateDate { get; set; }
+ }
+}
diff --git a/DispenserUtilization.cs b/DispenserUtilization.cs
new file mode 100644
index 0000000..1fb2ab9
--- /dev/null
+++ b/DispenserUtilization.cs
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DispenserUtilization
+ {
+ public string Dispenser { get; set; }
+ public Nullable UtilDate { get; set; }
+ public Nullable UtilTimes { get; set; }
+ public string UserAccount { get; set; }
+ }
+}
diff --git a/Dispensers.cs b/Dispensers.cs
new file mode 100644
index 0000000..29fb23f
--- /dev/null
+++ b/Dispensers.cs
@@ -0,0 +1,34 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class Dispensers
+ {
+ public string Name { get; set; }
+ public string Description { get; set; }
+ public string Device { get; set; }
+ public string Dyelot { get; set; }
+ public Nullable ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public string Station { get; set; }
+ public Nullable State { get; set; }
+ public string Status { get; set; }
+ public Nullable Automatic { get; set; }
+ public Nullable Enabled { get; set; }
+ public Nullable HeartBeat { get; set; }
+ public Nullable CheckPeriod { get; set; }
+ public Nullable UpdateDate { get; set; }
+ public Nullable CreateDate { get; set; }
+ public string UserAccount { get; set; }
+ }
+}
diff --git a/DyelotBucketSummary.cs b/DyelotBucketSummary.cs
new file mode 100644
index 0000000..8aa79ee
--- /dev/null
+++ b/DyelotBucketSummary.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DyelotBucketSummary
+ {
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public Nullable TotalBuckets { get; set; }
+ public Nullable Final { get; set; }
+ public Nullable Created { get; set; }
+ }
+}
diff --git a/DyelotBuckets.cs b/DyelotBuckets.cs
new file mode 100644
index 0000000..7f8e40e
--- /dev/null
+++ b/DyelotBuckets.cs
@@ -0,0 +1,28 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DyelotBuckets
+ {
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public Nullable DevideNo { get; set; }
+ public string ProductCode { get; set; }
+ public Nullable BucketNo { get; set; }
+ public string DID { get; set; }
+ public Nullable Final { get; set; }
+ public Nullable Dissolved { get; set; }
+ public Nullable Created { get; set; }
+ }
+}
diff --git a/DyelotBucketsHistory.cs b/DyelotBucketsHistory.cs
new file mode 100644
index 0000000..4ada755
--- /dev/null
+++ b/DyelotBucketsHistory.cs
@@ -0,0 +1,28 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DyelotBucketsHistory
+ {
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public Nullable DevideNo { get; set; }
+ public string ProductCode { get; set; }
+ public Nullable BucketNo { get; set; }
+ public string DID { get; set; }
+ public Nullable Final { get; set; }
+ public Nullable Dissolved { get; set; }
+ public Nullable Created { get; set; }
+ }
+}
diff --git a/DyelotDetail.cs b/DyelotDetail.cs
new file mode 100644
index 0000000..da8ab7a
--- /dev/null
+++ b/DyelotDetail.cs
@@ -0,0 +1,40 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DyelotDetail
+ {
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public string Station { get; set; }
+ public string ProductCode { get; set; }
+ public string ProductName { get; set; }
+ public int ProductType { get; set; }
+ public Nullable Grams { get; set; }
+ public Nullable Created { get; set; }
+ public Nullable SN { get; set; }
+ public Nullable DispenseTime { get; set; }
+ public Nullable DispenseGrams { get; set; }
+ public Nullable CurrDispGrams { get; set; }
+ public Nullable LADispenseResult { get; set; }
+ public Nullable Error { get; set; }
+ public string UserAccount { get; set; }
+ public string Volume { get; set; }
+ public Nullable CurrDispTime { get; set; }
+ public string CurrVolume { get; set; }
+ public string RemainVolume { get; set; }
+ public Nullable FinalPickup { get; set; }
+ public Nullable LFManual { get; set; }
+ }
+}
diff --git a/DyelotDslvQueue.cs b/DyelotDslvQueue.cs
new file mode 100644
index 0000000..d55449b
--- /dev/null
+++ b/DyelotDslvQueue.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DyelotDslvQueue
+ {
+ public Nullable TankNo { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public Nullable TotalBuckets { get; set; }
+ public Nullable DivideNo { get; set; }
+ public Nullable State { get; set; }
+ public Nullable ShelfID { get; set; }
+ public Nullable SchDispenseTime { get; set; }
+ public Nullable BucketNo { get; set; }
+ public Nullable Updated { get; set; }
+ }
+}
diff --git a/DyelotDslvQueueHistory.cs b/DyelotDslvQueueHistory.cs
new file mode 100644
index 0000000..73be26f
--- /dev/null
+++ b/DyelotDslvQueueHistory.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DyelotDslvQueueHistory
+ {
+ public Nullable TankNo { get; set; }
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StepNumber { get; set; }
+ public Nullable TotalBuckets { get; set; }
+ public Nullable DivideNo { get; set; }
+ public Nullable State { get; set; }
+ public Nullable ShelfID { get; set; }
+ public Nullable SchDispenseTime { get; set; }
+ public Nullable BucketNo { get; set; }
+ public Nullable Created { get; set; }
+ }
+}
diff --git a/DyelotHead.cs b/DyelotHead.cs
new file mode 100644
index 0000000..71ce40e
--- /dev/null
+++ b/DyelotHead.cs
@@ -0,0 +1,65 @@
+//------------------------------------------------------------------------------
+//
+// 此代码已从模板生成。
+//
+// 手动更改此文件可能导致应用程序出现意外的行为。
+// 如果重新生成代码,将覆盖对此文件的手动更改。
+//
+//------------------------------------------------------------------------------
+
+namespace Audit
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class DyelotHead
+ {
+ public string Dyelot { get; set; }
+ public int ReDye { get; set; }
+ public Nullable StartTime { get; set; }
+ public Nullable EndTime { get; set; }
+ public Nullable CreationTime { get; set; }
+ public string TotalVolume { get; set; }
+ public Nullable DispenseTimes { get; set; }
+ public Nullable CurrDispTime { get; set; }
+ public string CurrTotalVolume { get; set; }
+ public Nullable State { get; set; }
+ public Nullable Sequence { get; set; }
+ public Nullable Color { get; set; }
+ public Nullable PickUp { get; set; }
+ public Nullable GramsYard { get; set; }
+ public Nullable TotalLength { get; set; }
+ public Nullable FabricWidth { get; set; }
+ public string UserAccount { get; set; }
+ public string RefTotalVolume { get; set; }
+ public string RestVolume { get; set; }
+ public string LFDefine { get; set; }
+ public string Machine { get; set; }
+ public Nullable Blocked { get; set; }
+ public Nullable