From 092c12cfb951fb7cbf206e9382d755f0110cd786 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 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=96=87=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 | 442 +++ 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, 12937 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..5faf3d1 --- /dev/null +++ b/Audit.csproj @@ -0,0 +1,442 @@ + + + + + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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].[Volume] AS [Volume], + [WaitChemical].[ActWeight] AS [ActWeight], + [WaitChemical].[FuzhuWeight] AS [FuzhuWeight], + [WaitChemical].[DispenseTime] AS [DispenseTime] + FROM [dbo].[WaitChemical] AS [WaitChemical] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BatchDyeingCentral.edmx.diagram b/BatchDyeingCentral.edmx.diagram new file mode 100644 index 0000000..c7e2678 --- /dev/null +++ b/BatchDyeingCentral.edmx.diagram @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 Industry { get; set; } + public string Volume { get; set; } + public Nullable StandardTime { get; set; } + public Nullable LFArt { get; set; } + public string RemainVolume { get; set; } + public Nullable FinalPickUp { get; set; } + public Nullable LFWasher { get; set; } + public string ActualTotalVolume { get; set; } + public Nullable ActualTotalLength { get; set; } + public Nullable UsedPickup { get; set; } + public string RemainPadderVol { get; set; } + public Nullable ExecuteTime { get; set; } + public string RealAdd1 { get; set; } + public string RealAdd2 { get; set; } + public string RealAdd3 { get; set; } + public string RealAdd4 { get; set; } + public string RealAdd5 { get; set; } + public string PromptAdd1 { get; set; } + public string PromptAdd2 { get; set; } + public string PromptAdd3 { get; set; } + public string PromptAdd4 { get; set; } + public string PromptAdd5 { get; set; } + public Nullable StartButton { get; set; } + public Nullable EndButton { get; set; } + public string MergerVol { get; set; } + } +} diff --git a/DyelotHistories.cs b/DyelotHistories.cs new file mode 100644 index 0000000..a8e5be0 --- /dev/null +++ b/DyelotHistories.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class DyelotHistories + { + public string Dyelot { get; set; } + public int ReDye { get; set; } + public byte[] History { get; set; } + } +} diff --git a/Dyelots.cs b/Dyelots.cs new file mode 100644 index 0000000..16e6482 --- /dev/null +++ b/Dyelots.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Dyelots + { + public int ID { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable Industry { get; set; } + public string Machine { get; set; } + public string DispenseMachine { get; set; } + public Nullable StartTime { get; set; } + public Nullable EndTime { get; set; } + public Nullable StandardTime { get; set; } + public Nullable TotalShot { get; set; } + public Nullable State { get; set; } + public Nullable Blocked { get; set; } + public string Program { get; set; } + public Nullable Color { get; set; } + public Nullable CreationTime { get; set; } + public string Batch { get; set; } + public string OrderNo { get; set; } + public Nullable TotalWeight { get; set; } + public string LiquidRatio { get; set; } + public string TotalVolume { get; set; } + public Nullable AcidQty { get; set; } + public Nullable ActualAcidQty { get; set; } + public Nullable Sequence { get; set; } + public Nullable DispenseMode { get; set; } + public Nullable DyeDissolve { get; set; } + public Nullable CheDissolve { get; set; } + public Nullable TotalBuckets { get; set; } + public Nullable SpcTotalBuckets { get; set; } + public Nullable DissolveMethod { get; set; } + public string ReferenceDyelot { get; set; } + public Nullable Final { get; set; } + public Nullable Shade { get; set; } + public string UserAccount { get; set; } + public string FabricName { get; set; } + public string ColorName { get; set; } + public string CustomerName { get; set; } + public string CUSTOMER_CODE { get; set; } + public string FABRIC_CODE { get; set; } + public Nullable GRAMS_YARD { get; set; } + public Nullable NeedDissolving { get; set; } + public Nullable EarliestStartTime { get; set; } + public Nullable Committed { get; set; } + public string Parameters { get; set; } + public string Notes { get; set; } + public Nullable SummarizeResult { get; set; } + public string ProgramsUsed { get; set; } + public string ColorNo { get; set; } + public Nullable ModifyDT { get; set; } + public Nullable CreateDT { get; set; } + public Nullable Yard { get; set; } + public string SheetNo { get; set; } + public Nullable AlarmTime { get; set; } + public string ExRead { get; set; } + public string FactoryTicketNo { get; set; } + public string DyeingBatch { get; set; } + public string EOCAlarms { get; set; } + public Nullable RunTime { get; set; } + public Nullable ProcessTime { get; set; } + public Nullable NormalTime { get; set; } + public Nullable SleepTime { get; set; } + public Nullable DelayTime { get; set; } + public string EOCDelays { get; set; } + public Nullable DyelotStartShift { get; set; } + public Nullable DyelotEndShift { get; set; } + public short DyeDissolving { get; set; } + } +} diff --git a/DyelotsBatch.cs b/DyelotsBatch.cs new file mode 100644 index 0000000..4cdd438 --- /dev/null +++ b/DyelotsBatch.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class DyelotsBatch + { + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public string Station { get; set; } + public Nullable ShotNo { get; set; } + public string ProductCode { get; set; } + public Nullable SN { get; set; } + public Nullable Grams { get; set; } + public Nullable DispenseStartTime { get; set; } + public Nullable DispenseEndTime { get; set; } + public Nullable DispenseGrams { get; set; } + public Nullable LADispenseResult { get; set; } + public Nullable DyeWeightTime { get; set; } + public string Process { get; set; } + public string FinalProcess { get; set; } + public Nullable DispenseWater { get; set; } + public Nullable DrainWater { get; set; } + public Nullable DissolveTemperature { get; set; } + public Nullable SchDispenseTime { get; set; } + public string UserAccount { get; set; } + } +} diff --git a/DyelotsBulkedRecipe.cs b/DyelotsBulkedRecipe.cs new file mode 100644 index 0000000..5eea25f --- /dev/null +++ b/DyelotsBulkedRecipe.cs @@ -0,0 +1,82 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class DyelotsBulkedRecipe + { + public int ID { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public string Station { get; set; } + public Nullable DevideNo { get; set; } + public Nullable ShotNo { get; set; } + public string ProductCode { get; set; } + public string ProductName { get; set; } + public Nullable ProductType { get; set; } + public string ProductLot { get; set; } + public Nullable ProductClass { get; set; } + public Nullable SN { get; set; } + public string Amount { get; set; } + public Nullable Grams { get; set; } + public Nullable Created { get; set; } + public Nullable DispenseStartTime { get; set; } + public Nullable DispenseEndTime { get; set; } + public Nullable DispenseTime { get; set; } + public Nullable DispenseGrams { get; set; } + public Nullable DispenseResult { get; set; } + public Nullable LADispenseResult { get; set; } + public string Volume { get; set; } + public Nullable HostRead { get; set; } + public string State { get; set; } + public Nullable NeedDispense { get; set; } + public Nullable MixTankNo { get; set; } + public Nullable DyeWeightTime { get; set; } + public string Process { get; set; } + public string FinalProcess { get; set; } + public string Dispenser { get; set; } + public Nullable TankNo { get; set; } + public Nullable Error { get; set; } + public Nullable BucketNo { get; set; } + public string DID { get; set; } + public Nullable StepDevideNo { get; set; } + public Nullable StepTotalBuckets { get; set; } + public string ReferenceDyelot { get; set; } + public Nullable DispenseWater { get; set; } + public Nullable DrainWater { get; set; } + public Nullable DissolveTemperature { get; set; } + public Nullable SchDispenseTime { get; set; } + public string UserAccount { get; set; } + public Nullable TargetGrams { get; set; } + public Nullable ActualGrams { get; set; } + public Nullable FinishTime { get; set; } + public string Tagged { get; set; } + public Nullable TotalBuckets { get; set; } + public Nullable Final { get; set; } + public Nullable DissolveManual { get; set; } + public Nullable Concentration { get; set; } + public Nullable DeductTotalBuckets { get; set; } + public Nullable DeductBuckets { get; set; } + public Nullable Kilograms { get; set; } + public Nullable DKilograms { get; set; } + public Nullable DyelotID { get; set; } + public Nullable MixTemperature { get; set; } + public Nullable MixVolume { get; set; } + public Nullable MixTime { get; set; } + public Nullable MixWater { get; set; } + public Nullable RoWater { get; set; } + public string Notes { get; set; } + public Nullable ProductIndex { get; set; } + public double GRAVITY { get; set; } + } +} diff --git a/DyelotsBulkedRecipeHistory.cs b/DyelotsBulkedRecipeHistory.cs new file mode 100644 index 0000000..c597341 --- /dev/null +++ b/DyelotsBulkedRecipeHistory.cs @@ -0,0 +1,68 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class DyelotsBulkedRecipeHistory + { + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public string Station { get; set; } + public Nullable DevideNo { get; set; } + public Nullable ShotNo { get; set; } + public string ProductCode { get; set; } + public string ProductName { get; set; } + public Nullable ProductType { get; set; } + public string ProductLot { get; set; } + public Nullable ProductClass { get; set; } + public Nullable SN { get; set; } + public string Amount { get; set; } + public Nullable Grams { get; set; } + public Nullable Created { get; set; } + public Nullable DispenseStartTime { get; set; } + public Nullable DispenseEndTime { get; set; } + public Nullable DispenseTime { get; set; } + public Nullable DispenseGrams { get; set; } + public Nullable DispenseResult { get; set; } + public Nullable LADispenseResult { get; set; } + public string Volume { get; set; } + public Nullable HostRead { get; set; } + public string State { get; set; } + public Nullable NeedDispense { get; set; } + public Nullable MixTankNo { get; set; } + public Nullable DyeWeightTime { get; set; } + public string Process { get; set; } + public string FinalProcess { get; set; } + public string Dispenser { get; set; } + public Nullable TankNo { get; set; } + public Nullable Error { get; set; } + public Nullable BucketNo { get; set; } + public string DID { get; set; } + public Nullable StepDevideNo { get; set; } + public Nullable StepTotalBuckets { get; set; } + public string ReferenceDyelot { get; set; } + public Nullable DispenseWater { get; set; } + public Nullable DrainWater { get; set; } + public Nullable DissolveTemperature { get; set; } + public Nullable SchDispenseTime { get; set; } + public Nullable FinishTime { get; set; } + public string UserAccount { get; set; } + public Nullable Updated { get; set; } + public string Tagged { get; set; } + public Nullable TotalBuckets { get; set; } + public Nullable Final { get; set; } + public Nullable DissolveManual { get; set; } + public Nullable DeductTotalBuckets { get; set; } + public Nullable DeductBuckets { get; set; } + } +} diff --git a/DyelotsByShift.cs b/DyelotsByShift.cs new file mode 100644 index 0000000..99ecf12 --- /dev/null +++ b/DyelotsByShift.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class DyelotsByShift + { + public int ID { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public string Machine { get; set; } + public System.DateTime StartTime { get; set; } + public System.DateTime EndTime { get; set; } + public double Duration { get; set; } + public string Shift { get; set; } + public string SingleShift { get; set; } + } +} diff --git a/DyelotsHistory.cs b/DyelotsHistory.cs new file mode 100644 index 0000000..81d5b06 --- /dev/null +++ b/DyelotsHistory.cs @@ -0,0 +1,52 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class DyelotsHistory + { + public int ID { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable Industry { get; set; } + public string Machine { get; set; } + public string DispenseMachine { get; set; } + public Nullable StartTime { get; set; } + public Nullable EndTime { get; set; } + public Nullable StandardTime { get; set; } + public Nullable TotalShot { get; set; } + public Nullable State { get; set; } + public Nullable Blocked { get; set; } + public string Program { get; set; } + public Nullable Color { get; set; } + public Nullable CreationTime { get; set; } + public string Batch { get; set; } + public string OrderNo { get; set; } + public Nullable TotalWeight { get; set; } + public string LiquidRatio { get; set; } + public string TotalVolume { get; set; } + public Nullable AcidQty { get; set; } + public Nullable ActualAcidQty { get; set; } + public Nullable Sequence { get; set; } + public Nullable DispenseMode { get; set; } + public Nullable DyeDissolve { get; set; } + public Nullable CheDissolve { get; set; } + public Nullable TotalBuckets { get; set; } + public Nullable SpcTotalBuckets { get; set; } + public Nullable DissolveMethod { get; set; } + public string ReferenceDyelot { get; set; } + public Nullable Final { get; set; } + public Nullable Shade { get; set; } + public string UserAccount { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/DyelotsInAuto.cs b/DyelotsInAuto.cs new file mode 100644 index 0000000..b513991 --- /dev/null +++ b/DyelotsInAuto.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class DyelotsInAuto + { + public string Machine { get; set; } + public string Dyelot { get; set; } + public Nullable ReDye { get; set; } + public Nullable StepNumber { get; set; } + public Nullable DyeState { get; set; } + public Nullable SchDispenseTime { get; set; } + public Nullable IsCheck { get; set; } + public Nullable Shade { get; set; } + } +} diff --git a/DyelotsInAutoHistory.cs b/DyelotsInAutoHistory.cs new file mode 100644 index 0000000..790ffac --- /dev/null +++ b/DyelotsInAutoHistory.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class DyelotsInAutoHistory + { + public string Machine { get; set; } + public string Dyelot { get; set; } + public Nullable ReDye { get; set; } + public Nullable StepNumber { get; set; } + public Nullable DyeState { get; set; } + public Nullable SchDispenseTime { get; set; } + public Nullable IsCheck { get; set; } + public Nullable Shade { get; set; } + } +} diff --git a/EventList.cs b/EventList.cs new file mode 100644 index 0000000..eb5e535 --- /dev/null +++ b/EventList.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class EventList + { + 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; } + } +} diff --git a/JOBTKT.cs b/JOBTKT.cs new file mode 100644 index 0000000..6969bc9 --- /dev/null +++ b/JOBTKT.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class JOBTKT + { + public string tmp_field { get; set; } + public string IDNO { get; set; } + public Nullable FNDATE { get; set; } + public string FIRST_KEY { get; set; } + public string SECOND_KEY { get; set; } + public int ReDye { get; set; } + } +} diff --git a/LA571Tanks.cs b/LA571Tanks.cs new file mode 100644 index 0000000..5fabb0f --- /dev/null +++ b/LA571Tanks.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class LA571Tanks + { + public string Name { get; set; } + public string Station { get; set; } + public Nullable Tank { get; set; } + public Nullable Volume { get; set; } + public Nullable State { get; set; } + } +} diff --git a/LabDyeDslvQueue.cs b/LabDyeDslvQueue.cs new file mode 100644 index 0000000..5abc801 --- /dev/null +++ b/LabDyeDslvQueue.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class LabDyeDslvQueue + { + public Nullable TankNo { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public Nullable State { get; set; } + public Nullable ShelfID { get; set; } + public Nullable DistID { get; set; } + public Nullable SchDispenseTime { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/LabDyeDslvQueueHistory.cs b/LabDyeDslvQueueHistory.cs new file mode 100644 index 0000000..d85119b --- /dev/null +++ b/LabDyeDslvQueueHistory.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class LabDyeDslvQueueHistory + { + public Nullable TankNo { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public Nullable State { get; set; } + public Nullable ShelfID { get; set; } + public Nullable DistID { get; set; } + public Nullable SchDispenseTime { get; set; } + public Nullable Created { get; set; } + } +} diff --git a/MachineState.cs b/MachineState.cs new file mode 100644 index 0000000..097a9b5 --- /dev/null +++ b/MachineState.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class MachineState + { + public string Machine { get; set; } + public string DispenseDyelot { get; set; } + public Nullable DispenseReDye { get; set; } + public Nullable ChemicalCallOff { get; set; } + public Nullable ChemicalState { get; set; } + public Nullable ChemicalTank { get; set; } + public Nullable ChemicalTankSize { get; set; } + public string ChemicalDispenser { get; set; } + public Nullable ChemicalError { get; set; } + public Nullable ChemicalTargetSelect { get; set; } + public Nullable DyeCallOff { get; set; } + public Nullable DyeState { get; set; } + public Nullable DyeTank { get; set; } + public Nullable DyeTankSize { get; set; } + public string DyeDispenser { get; set; } + public Nullable DyeError { get; set; } + public Nullable PowderCallOff { get; set; } + public Nullable PowderState { get; set; } + public Nullable PowderTank { get; set; } + public Nullable PowderTankSize { get; set; } + public string PowderDispenser { get; set; } + public Nullable PowderError { get; set; } + public Nullable HostRead { get; set; } + } +} diff --git a/MachineStateHistory.cs b/MachineStateHistory.cs new file mode 100644 index 0000000..72104b0 --- /dev/null +++ b/MachineStateHistory.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class MachineStateHistory + { + public string Machine { get; set; } + public string DispenseDyelot { get; set; } + public Nullable DispenseReDye { get; set; } + public Nullable ChemicalCallOff { get; set; } + public Nullable ChemicalState { get; set; } + public Nullable ChemicalTank { get; set; } + public Nullable ChemicalTankSize { get; set; } + public string ChemicalDispenser { get; set; } + public Nullable ChemicalError { get; set; } + public Nullable ChemicalTargetSelect { get; set; } + public Nullable DyeCallOff { get; set; } + public Nullable DyeState { get; set; } + public Nullable DyeTank { get; set; } + public Nullable DyeTankSize { get; set; } + public string DyeDispenser { get; set; } + public Nullable DyeError { get; set; } + public Nullable PowderCallOff { get; set; } + public Nullable PowderState { get; set; } + public Nullable PowderTank { get; set; } + public Nullable PowderTankSize { get; set; } + public string PowderDispenser { get; set; } + public Nullable PowderError { get; set; } + public Nullable HostRead { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/Machines.cs b/Machines.cs new file mode 100644 index 0000000..5cf99be --- /dev/null +++ b/Machines.cs @@ -0,0 +1,115 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Machines + { + public string Name { get; set; } + public string DispenseDyelot { get; set; } + public Nullable DispenseReDye { get; set; } + public string RescheduleGroup { get; set; } + public string Connect { get; set; } + public Nullable ChemicalCallOff { get; set; } + public Nullable ChemicalState { get; set; } + public Nullable ChemicalTank { get; set; } + public Nullable ChemicalTankSize { get; set; } + public Nullable ChemicalEnabled { get; set; } + public string ChemicalStatus { get; set; } + public string ChemicalDispenser { get; set; } + public Nullable ChemicalError { get; set; } + public Nullable ChemicalDistribute { get; set; } + public string ChemicalStation { get; set; } + public Nullable ChemicalDevideNo { get; set; } + public Nullable ChemicalDispensedTime { get; set; } + public Nullable ChemicalDefaultTank { get; set; } + public Nullable ChemicalDissolving { get; set; } + public Nullable ChemicalResp { get; set; } + public Nullable ChemicalCallOff2 { get; set; } + public Nullable ChemicalState2 { get; set; } + public Nullable ChemicalTank2 { get; set; } + public string ChemicalStatus2 { get; set; } + public Nullable ChemicalResp2 { get; set; } + public Nullable ChemicalTargetSelect { get; set; } + public string ChemicalTargetMachine { get; set; } + public Nullable DyeCallOff { get; set; } + public Nullable DyeState { get; set; } + public Nullable DyeTank { get; set; } + public Nullable DyeTankSize { get; set; } + public Nullable DyeEnabled { get; set; } + public string DyeStatus { get; set; } + public string DyeDispenser { get; set; } + public Nullable DyeError { get; set; } + public Nullable DyeDistribute { get; set; } + public string DyeStation { get; set; } + public Nullable DyeDevideNo { get; set; } + public Nullable DyeDispensedTime { get; set; } + public Nullable DyeDefaultTank { get; set; } + public Nullable DyeResp { get; set; } + public string DyeDispenseDyelot { get; set; } + public Nullable DyeDispenseReDye { get; set; } + public Nullable DyeDissolving { get; set; } + public Nullable PowderCallOff { get; set; } + public Nullable PowderState { get; set; } + public Nullable PowderTank { get; set; } + public Nullable PowderTankSize { get; set; } + public Nullable PowderEnabled { get; set; } + public string PowderStatus { get; set; } + public string PowderDispenser { get; set; } + public Nullable PowderError { get; set; } + public string PowderStation { get; set; } + public Nullable PowderDevideNo { get; set; } + public Nullable PowderDispensedTime { get; set; } + public Nullable PowderDefaultTank { get; set; } + public Nullable PowderResp { get; set; } + public Nullable HostRead { get; set; } + public string OnSystem { get; set; } + public string SystemID { get; set; } + public Nullable SchDispenseTime { get; set; } + public string UserAccount { get; set; } + public Nullable AutoMode { get; set; } + public Nullable UseOnScheduling { get; set; } + public string CheDispenseDyelot { get; set; } + public Nullable CheDispenseReDye { get; set; } + public Nullable SampleDye { get; set; } + public string name1 { get; set; } + public string Parameters { get; set; } + public string ProgramGroup { get; set; } + public string ReportGroup { get; set; } + public string PortAddress { get; set; } + public Nullable Interrupt { get; set; } + public Nullable NetworkNumber { get; set; } + public string SpecificMachineMimic { get; set; } + public Nullable OutOfService { get; set; } + public Nullable IsGhost { get; set; } + public Nullable ManualDownloadOnly { get; set; } + public string LogicArtPort { get; set; } + public Nullable GastonLoggedOn { get; set; } + public Nullable DEnabled { get; set; } + public Nullable DLookAhead { get; set; } + public Nullable LogicArtUnlocked { get; set; } + public Nullable MaximumGradient { get; set; } + public string LoggedOffReason { get; set; } + public string LoggedOffNotes { get; set; } + public Nullable AutoDispense { get; set; } + public Nullable AllowRemoteReschedule { get; set; } + public Nullable CorrectionsAbove { get; set; } + public Nullable Is161 { get; set; } + public Nullable Locked { get; set; } + public Nullable AutoDownloadParams { get; set; } + public Nullable NoAutoDownloadMessages { get; set; } + public string TonelloIP { get; set; } + public string Test { get; set; } + public string MainTemperature { get; set; } + public Nullable CallType { get; set; } + } +} diff --git a/MachinesHistory.cs b/MachinesHistory.cs new file mode 100644 index 0000000..d19478b --- /dev/null +++ b/MachinesHistory.cs @@ -0,0 +1,46 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class MachinesHistory + { + public string Machine { get; set; } + public string DispenseDyelot { get; set; } + public Nullable DispenseReDye { get; set; } + public Nullable ChemicalCallOff { get; set; } + public Nullable ChemicalState { get; set; } + public Nullable ChemicalTank { get; set; } + public Nullable ChemicalTankSize { get; set; } + public string ChemicalDispenser { get; set; } + public Nullable ChemicalError { get; set; } + public Nullable ChemicalCallOff2 { get; set; } + public Nullable ChemicalState2 { get; set; } + public Nullable ChemicalTank2 { get; set; } + public Nullable DyeCallOff { get; set; } + public Nullable DyeState { get; set; } + public Nullable DyeTank { get; set; } + public Nullable DyeTankSize { get; set; } + public string DyeDispenser { get; set; } + public Nullable DyeError { get; set; } + public Nullable PowderCallOff { get; set; } + public Nullable PowderState { get; set; } + public Nullable PowderTank { get; set; } + public Nullable PowderTankSize { get; set; } + public string PowderDispenser { get; set; } + public Nullable PowderError { get; set; } + public Nullable HostRead { get; set; } + public string DyeDispenseDyelot { get; set; } + public Nullable DyeDispenseReDye { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/MainWindow.xaml b/MainWindow.xaml new file mode 100644 index 0000000..473f31a --- /dev/null +++ b/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs new file mode 100644 index 0000000..0557da1 --- /dev/null +++ b/MainWindow.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Audit +{ + /// + /// MainWindow.xaml 的交互逻辑 + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/ManualWeightQueue.cs b/ManualWeightQueue.cs new file mode 100644 index 0000000..db0f49d --- /dev/null +++ b/ManualWeightQueue.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class ManualWeightQueue + { + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public Nullable State { get; set; } + public Nullable CallTime { get; set; } + public Nullable Module { get; set; } + public string ModuleName { get; set; } + public string Area { get; set; } + public Nullable EndTime { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/ManualWeightQueueHistory.cs b/ManualWeightQueueHistory.cs new file mode 100644 index 0000000..1fc318b --- /dev/null +++ b/ManualWeightQueueHistory.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class ManualWeightQueueHistory + { + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public Nullable State { get; set; } + public Nullable CallTime { get; set; } + public Nullable Module { get; set; } + public string ModuleName { get; set; } + public string Area { get; set; } + public Nullable EndTime { get; set; } + public Nullable Created { get; set; } + } +} diff --git a/POWDER_QUEUE.cs b/POWDER_QUEUE.cs new file mode 100644 index 0000000..0a6ef0d --- /dev/null +++ b/POWDER_QUEUE.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class POWDER_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/PartsStatus.cs b/PartsStatus.cs new file mode 100644 index 0000000..bc68935 --- /dev/null +++ b/PartsStatus.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class PartsStatus + { + public string CUST_CODE { get; set; } + public string Dispenser { get; set; } + public string PartsCode { get; set; } + public string PartsName { get; set; } + public Nullable PartsType { get; set; } + public string Description { get; set; } + public Nullable FactoryValue { get; set; } + public Nullable UsedCount { get; set; } + public Nullable RunningTime { get; set; } + public Nullable ResetDate { get; set; } + public Nullable WarnDate { get; set; } + public Nullable UpdateDate { get; set; } + public Nullable CreateDate { get; set; } + public string UserAccount { get; set; } + } +} diff --git a/PartsStatusHistory.cs b/PartsStatusHistory.cs new file mode 100644 index 0000000..87a4764 --- /dev/null +++ b/PartsStatusHistory.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class PartsStatusHistory + { + public string CUST_CODE { get; set; } + public string Dispenser { get; set; } + public string PartsCode { get; set; } + public string PartsName { get; set; } + public Nullable PartsType { get; set; } + public string Description { get; set; } + public Nullable FactoryValue { get; set; } + public Nullable UsedCount { get; set; } + public Nullable RunningTime { get; set; } + public Nullable ResetDate { get; set; } + public Nullable WarnDate { get; set; } + public Nullable UpdateDate { get; set; } + public Nullable CreateDate { get; set; } + public string UserAccount { get; set; } + } +} diff --git a/PipeFill.cs b/PipeFill.cs new file mode 100644 index 0000000..8782601 --- /dev/null +++ b/PipeFill.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class PipeFill + { + public string ProductCode { get; set; } + public string ProductName { get; set; } + public string Dispenser { get; set; } + public Nullable No { get; set; } + public Nullable Qty { get; set; } + public Nullable StartTime { get; set; } + public Nullable EndTime { get; set; } + public Nullable AlarmTime { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/PipeHistory.cs b/PipeHistory.cs new file mode 100644 index 0000000..975afe6 --- /dev/null +++ b/PipeHistory.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class PipeHistory + { + public string ProductCode { get; set; } + public string ProductName { get; set; } + public Nullable ProductType { get; set; } + public string Dispenser { get; set; } + public Nullable No { get; set; } + public Nullable Qty { get; set; } + public Nullable StartTime { get; set; } + public Nullable EndTime { get; set; } + public Nullable AlarmTime { get; set; } + public Nullable Created { get; set; } + } +} diff --git a/Pipes.cs b/Pipes.cs new file mode 100644 index 0000000..35b7a4b --- /dev/null +++ b/Pipes.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Pipes + { + public string ProductCode { get; set; } + public string ProductName { get; set; } + public Nullable ProductType { get; set; } + public string Dispenser { get; set; } + public Nullable Enabled { get; set; } + public Nullable No { get; set; } + public Nullable MinLimit { get; set; } + public Nullable MaxLimit { get; set; } + public Nullable MinAction { get; set; } + public Nullable MaxAction { get; set; } + public Nullable Conc { get; set; } + public double Gravity { get; set; } + public string Alarm { get; set; } + } +} diff --git a/Product.cs b/Product.cs new file mode 100644 index 0000000..ee04255 --- /dev/null +++ b/Product.cs @@ -0,0 +1,78 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Product + { + public string ProductCode { get; set; } + public string ProductName { get; set; } + public Nullable Price { get; set; } + public Nullable Deduct { get; set; } + public Nullable FullWeight { get; set; } + public Nullable LampPosition { get; set; } + public string TablePosition { get; set; } + public string AREA { get; set; } + public Nullable SafetyStock { get; set; } + public Nullable ProductUnit { get; set; } + public Nullable ProductType { get; set; } + public Nullable ProductClass { get; set; } + public Nullable CurrentStock { get; set; } + public string ProductLot { get; set; } + public Nullable RplDate { get; set; } + public Nullable UsedDate { get; set; } + public string CuMonth { get; set; } + public Nullable LaStock { get; set; } + public Nullable ThStock { get; set; } + public Nullable ThUsed { get; set; } + public Nullable Color { get; set; } + public Nullable LastTime { get; set; } + public Nullable CalTime { get; set; } + public Nullable BackflowTime { get; set; } + public Nullable Tol_G { get; set; } + public Nullable Tol_P { get; set; } + public Nullable Alarm { get; set; } + public Nullable Change_Bucket { get; set; } + public Nullable Small_Volume_by_manual { get; set; } + public Nullable Target_Weight { get; set; } + public Nullable Pre_Weight { get; set; } + public Nullable One_Sec { get; set; } + public Nullable GetscalTime { get; set; } + public Nullable DelayOpenValve { get; set; } + public string ValveMap { get; set; } + public string PumpMap { get; set; } + public Nullable Includepump { get; set; } + public Nullable Once_minimum_weight { get; set; } + public Nullable Once_minimum_max_weight { get; set; } + public Nullable Once_minimum_time { get; set; } + public string Res_S1 { get; set; } + public string Res_S2 { get; set; } + public string Res_S3 { get; set; } + public string Res_S4 { get; set; } + public Nullable Res_I1 { get; set; } + public Nullable Res_I2 { get; set; } + public Nullable Res_I3 { get; set; } + public Nullable Res_I4 { get; set; } + public Nullable Res_F1 { get; set; } + public Nullable Res_F2 { get; set; } + public Nullable Res_F3 { get; set; } + public Nullable Res_F4 { get; set; } + public string Batch_NO { get; set; } + public Nullable Concentration { get; set; } + public Nullable Pump { get; set; } + public Nullable PRODUCT_KIND { get; set; } + public string SUPPLIER { get; set; } + public Nullable PRODUCT_MODIFY_DATE { get; set; } + public double GRAVITY { get; set; } + public string UserAccount { get; set; } + } +} diff --git a/ProductInventory.cs b/ProductInventory.cs new file mode 100644 index 0000000..b2d469f --- /dev/null +++ b/ProductInventory.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class ProductInventory + { + public string ProductCode { get; set; } + public Nullable Quantity { get; set; } + public Nullable Price { get; set; } + public Nullable CreateDate { get; set; } + } +} diff --git a/ProductUsed.cs b/ProductUsed.cs new file mode 100644 index 0000000..f0336c1 --- /dev/null +++ b/ProductUsed.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class ProductUsed + { + public string ProductCode { get; set; } + public Nullable UsedQty { get; set; } + public Nullable CreateDate { get; set; } + } +} diff --git a/ProgramGroups.cs b/ProgramGroups.cs new file mode 100644 index 0000000..baacda1 --- /dev/null +++ b/ProgramGroups.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class ProgramGroups + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public ProgramGroups() + { + this.Programs = new HashSet(); + } + + public string Name { get; set; } + public string UserPrompts { get; set; } + public byte[] TypeLibrary { get; set; } + public string Sections { get; set; } + public Nullable MaximumPrograms { get; set; } + public Nullable OutOfService { get; set; } + public string DyelotParameterCommands { get; set; } + public string CommandHelp { get; set; } + public string UsesProgramsFromGroup { get; set; } + public Nullable MaximumGradient { get; set; } + public Nullable QQMinutes { get; set; } + public Nullable MessageMinutes { get; set; } + public string Inefficiencies { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection Programs { get; set; } + } +} diff --git a/Programs.cs b/Programs.cs new file mode 100644 index 0000000..c2166b4 --- /dev/null +++ b/Programs.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Programs + { + public string ProgramGroup { get; set; } + public int ProgramNumber { get; set; } + public string Name { get; set; } + public string Steps { get; set; } + public string Notes { get; set; } + public Nullable ModifiedTime { get; set; } + public Nullable StandardTime { get; set; } + + public virtual ProgramGroups ProgramGroups { get; set; } + } +} diff --git a/ProgramsUsed.cs b/ProgramsUsed.cs new file mode 100644 index 0000000..0509daf --- /dev/null +++ b/ProgramsUsed.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class ProgramsUsed + { + public int ID { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public string Program { get; set; } + public string Name { get; set; } + public string Steps { get; set; } + public Nullable StepsNoBpCrc { get; set; } + public Nullable ComputedTime { get; set; } + public Nullable MaxTemperature { get; set; } + public string Machine { get; set; } + public System.DateTime StartTime { get; set; } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..78fb081 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Audit")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Audit")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +//若要开始生成可本地化的应用程序,请设置 +//.csproj 文件中的 CultureYouAreCodingWith +//例如,如果您在源文件中使用的是美国英语, +//使用的是美国英语,请将 设置为 en-US。 然后取消 +//对以下 NeutralResourceLanguage 特性的注释。 更新 +//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //主题特定资源词典所处位置 + //(未在页面中找到资源时使用, + //或应用程序资源字典中找到时使用) + ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 + //(未在页面中找到资源时使用, + //、应用程序或任何主题专用资源字典中找到时使用) +)] + + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..0b10eaa --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace Audit.Properties +{ + + + /// + /// 强类型资源类,用于查找本地化字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的缓存 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Audit.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..426f145 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Audit.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/REMOTETERMINAL.cs b/REMOTETERMINAL.cs new file mode 100644 index 0000000..8fcb8d4 --- /dev/null +++ b/REMOTETERMINAL.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class REMOTETERMINAL + { + public string tmp_field { get; set; } + public string IDNO { get; set; } + public Nullable FNDATE { get; set; } + public string IDTYPE { get; set; } + public string FIRST_KEY { get; set; } + public string SECOND_KEY { get; set; } + public int ReDye { get; set; } + } +} diff --git a/RFIDRecordQueue.cs b/RFIDRecordQueue.cs new file mode 100644 index 0000000..a93ed4b --- /dev/null +++ b/RFIDRecordQueue.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class RFIDRecordQueue + { + public Nullable Station { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public string Machine { get; set; } + public Nullable DevideNo { get; set; } + public Nullable TotalBuckets { get; set; } + public Nullable State { get; set; } + public Nullable BucketNo { get; set; } + public string DID { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/RFIDRecordQueueHistory.cs b/RFIDRecordQueueHistory.cs new file mode 100644 index 0000000..576b4b1 --- /dev/null +++ b/RFIDRecordQueueHistory.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class RFIDRecordQueueHistory + { + public Nullable Station { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public string Machine { get; set; } + public Nullable DevideNo { get; set; } + public Nullable TotalBuckets { get; set; } + public Nullable State { get; set; } + public Nullable BucketNo { get; set; } + public string DID { get; set; } + public Nullable Created { get; set; } + } +} diff --git a/RecipeDeduct.cs b/RecipeDeduct.cs new file mode 100644 index 0000000..c55c202 --- /dev/null +++ b/RecipeDeduct.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class RecipeDeduct + { + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public string Station { get; set; } + public Nullable ShotNo { get; set; } + public string ProductCode { get; set; } + public Nullable DeductTime { get; set; } + public Nullable DeductGrams { get; set; } + public Nullable BucketNo { get; set; } + public string DID { get; set; } + public string UserAccount { get; set; } + } +} diff --git a/RecipeDeductHistory.cs b/RecipeDeductHistory.cs new file mode 100644 index 0000000..2dfad1c --- /dev/null +++ b/RecipeDeductHistory.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class RecipeDeductHistory + { + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public string Station { get; set; } + public Nullable ShotNo { get; set; } + public string ProductCode { get; set; } + public Nullable DeductTime { get; set; } + public Nullable DeductGrams { get; set; } + public Nullable BucketNo { get; set; } + public string DID { get; set; } + public string UserAccount { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/SampleDyeDslvQueue.cs b/SampleDyeDslvQueue.cs new file mode 100644 index 0000000..7507bc7 --- /dev/null +++ b/SampleDyeDslvQueue.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class SampleDyeDslvQueue + { + public Nullable TankNo { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public Nullable State { get; set; } + public Nullable PassAuto { get; set; } + public Nullable ShelfID { get; set; } + public string Machine { get; set; } + public Nullable SchDispenseTime { get; set; } + public Nullable Updated { get; set; } + } +} diff --git a/SampleDyeDslvQueueHistory.cs b/SampleDyeDslvQueueHistory.cs new file mode 100644 index 0000000..8500ae2 --- /dev/null +++ b/SampleDyeDslvQueueHistory.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class SampleDyeDslvQueueHistory + { + public Nullable TankNo { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public Nullable State { get; set; } + public Nullable PassAuto { get; set; } + public Nullable ShelfID { get; set; } + public string Machine { get; set; } + public Nullable SchDispenseTime { get; set; } + public Nullable Created { get; set; } + } +} diff --git a/SchedulingLog.cs b/SchedulingLog.cs new file mode 100644 index 0000000..c48634a --- /dev/null +++ b/SchedulingLog.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class SchedulingLog + { + public int ID { get; set; } + public string Dyelot { get; set; } + public int Redye { get; set; } + public string Machine { get; set; } + public System.DateTime CallTime { get; set; } + public Nullable EndTime { get; set; } + public Nullable State { get; set; } + public string Status { get; set; } + } +} diff --git a/Shelf.cs b/Shelf.cs new file mode 100644 index 0000000..315609c --- /dev/null +++ b/Shelf.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Shelf + { + public int ShelfID { get; set; } + public Nullable MaxLayer { get; set; } + public Nullable MaxPosition { get; set; } + } +} diff --git a/StepVisits.cs b/StepVisits.cs new file mode 100644 index 0000000..d45fc48 --- /dev/null +++ b/StepVisits.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class StepVisits + { + public int ID { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public string Machine { get; set; } + public Nullable OverallStepNumber { get; set; } + public string XX { get; set; } + public string Parameter1 { get; set; } + public string Parameter2 { get; set; } + public string Parameter3 { get; set; } + public string Parameter4 { get; set; } + public string Parameter5 { get; set; } + public string Command { get; set; } + public string Parameters { get; set; } + public string Notes { get; set; } + public System.DateTime StartTime { get; set; } + public System.DateTime EndTime { get; set; } + public double Duration { get; set; } + public Nullable PlannedDuration { get; set; } + public Nullable OverRun { get; set; } + public Nullable TemperatureAfter { get; set; } + public string ProgramNumber { get; set; } + public Nullable StepNumber { get; set; } + public Nullable StartTemperature { get; set; } + public Nullable EndTemperature { get; set; } + } +} diff --git a/Steps.cs b/Steps.cs new file mode 100644 index 0000000..a6f0391 --- /dev/null +++ b/Steps.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Steps + { + public int ID { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public string Machine { get; set; } + public Nullable OverallStepNumber { get; set; } + public string XX { get; set; } + public string ParameterValues { get; set; } + public string Command { get; set; } + public string Parameters { get; set; } + public string Notes { get; set; } + public Nullable PlannedDuration { get; set; } + public Nullable ActualDuration { get; set; } + public Nullable OverRun { get; set; } + public Nullable TemperatureAfter { get; set; } + public string ProgramNumber { get; set; } + public Nullable StepNumber { get; set; } + } +} diff --git a/Stoppages.cs b/Stoppages.cs new file mode 100644 index 0000000..c9f0bb3 --- /dev/null +++ b/Stoppages.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Stoppages + { + public int AutoKey { get; set; } + public string Machine { get; set; } + public string Reason { get; set; } + public System.DateTime StartTime { get; set; } + public Nullable EndTime { get; set; } + public string Notes { get; set; } + public Nullable Duration { get; set; } + public string Shift { get; set; } + public string SingleShift { get; set; } + } +} diff --git a/TEMPCHEMICALTKT.cs b/TEMPCHEMICALTKT.cs new file mode 100644 index 0000000..62dc02d --- /dev/null +++ b/TEMPCHEMICALTKT.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class TEMPCHEMICALTKT + { + public string tmp_field { get; set; } + public string IDNO { get; set; } + public Nullable FNDATE { get; set; } + public string IDTYPE { get; set; } + public string FIRST_KEY { get; set; } + public string SECOND_KEY { get; set; } + public int ReDye { get; set; } + } +} diff --git a/TEMPDYESTUFFTKT.cs b/TEMPDYESTUFFTKT.cs new file mode 100644 index 0000000..e3c4e6d --- /dev/null +++ b/TEMPDYESTUFFTKT.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class TEMPDYESTUFFTKT + { + public string tmp_field { get; set; } + public string IDNO { get; set; } + public Nullable FNDATE { get; set; } + public string IDTYPE { get; set; } + public string FIRST_KEY { get; set; } + public string SECOND_KEY { get; set; } + public int ReDye { get; set; } + } +} diff --git a/TEMPPOWDER.cs b/TEMPPOWDER.cs new file mode 100644 index 0000000..ca60caa --- /dev/null +++ b/TEMPPOWDER.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class TEMPPOWDER + { + public string tmp_field { get; set; } + public string IDNO { get; set; } + public Nullable FNDATE { get; set; } + public string IDTYPE { get; set; } + public string FIRST_KEY { get; set; } + public string SECOND_KEY { get; set; } + public int ReDye { get; set; } + } +} diff --git a/TICKET_DETAIL.cs b/TICKET_DETAIL.cs new file mode 100644 index 0000000..1330fea --- /dev/null +++ b/TICKET_DETAIL.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class TICKET_DETAIL + { + public string ID_NO { get; set; } + public Nullable STEP_NO { get; set; } + public string PRODUCT_CODE { get; set; } + public string PRODUCT_TYPE { get; set; } + public Nullable TARGET_WT { get; set; } + public Nullable ACTUAL_WT { get; set; } + public string UNIT { get; set; } + public string COMP_DATE { get; set; } + public string COMP_TIME { get; set; } + public Nullable TRANSFER_STATE { get; set; } + public string ERROR_CODE { get; set; } + public string MACHINE { get; set; } + public string TANK_NO { get; set; } + public string ID_TYPE { get; set; } + public string PRODUCT_LOT { get; set; } + public string RECIPE_CODE { get; set; } + public Nullable LR { get; set; } + public string RECIPE_TYPE { get; set; } + public string CONC { get; set; } + public string CONCUNIT { get; set; } + public string REMARK { get; set; } + public string ADJUST { get; set; } + public Nullable PRICE { get; set; } + public Nullable RES_DOUBLE1 { get; set; } + public Nullable RES_DOUBLE2 { get; set; } + public Nullable RES_DOUBLE3 { get; set; } + public Nullable RES_DOUBLE4 { get; set; } + public string RES_STRING1 { get; set; } + public string RES_STRING2 { get; set; } + public string RES_STRING3 { get; set; } + public string RES_STRING4 { get; set; } + public string REWEIGHT { get; set; } + public Nullable Redye { get; set; } + public Nullable DyeWeightTime { get; set; } + public string UserAccount { get; set; } + public string Batch_NO { get; set; } + public Nullable lldmxid { get; set; } + public string Station { get; set; } + public string UserCode { get; set; } + public Nullable FABRIC_WEIGHT { get; set; } + public Nullable VOLUME { get; set; } + public Nullable RECORD_ORDER { get; set; } + public string Process { get; set; } + public double GRAVITY { get; set; } + public Nullable CurrentStock { get; set; } + } +} diff --git a/TagShelf.cs b/TagShelf.cs new file mode 100644 index 0000000..3361d93 --- /dev/null +++ b/TagShelf.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class TagShelf + { + public Nullable BucketNo { get; set; } + public string Dyelot { get; set; } + public string Machines { get; set; } + public Nullable TagManagerNo { get; set; } + public int ReDye { get; set; } + public Nullable StepNumber { get; set; } + public string DID { get; set; } + public Nullable TotalBuckets { get; set; } + public Nullable DevideNo { get; set; } + public Nullable OnShelfTime { get; set; } + } +} diff --git a/Ticket.Context.cs b/Ticket.Context.cs new file mode 100644 index 0000000..f0d80a9 --- /dev/null +++ b/Ticket.Context.cs @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Data.Entity; + using System.Data.Entity.Infrastructure; + + public partial class TicketEntities : DbContext + { + public TicketEntities() + : base("name=TicketEntities") + { + } + + protected override void OnModelCreating(DbModelBuilder modelBuilder) + { + throw new UnintentionalCodeFirstException(); + } + + public virtual DbSet Product { get; set; } + public virtual DbSet ProductInventory { get; set; } + public virtual DbSet ProductUsed { get; set; } + public virtual DbSet CHEMICAL_QUEUE { get; set; } + public virtual DbSet DYESTUFF_QUEUE { get; set; } + public virtual DbSet JOBTKT { get; set; } + public virtual DbSet POWDER_QUEUE { get; set; } + public virtual DbSet REMOTETERMINAL { get; set; } + public virtual DbSet TEMPCHEMICALTKT { get; set; } + public virtual DbSet TEMPDYESTUFFTKT { get; set; } + public virtual DbSet TEMPPOWDER { get; set; } + public virtual DbSet TICKET_DETAIL { get; set; } + public virtual DbSet TicketSerial { get; set; } + public virtual DbSet UserAccount { get; set; } + } +} diff --git a/Ticket.Context.tt b/Ticket.Context.tt new file mode 100644 index 0000000..dce4902 --- /dev/null +++ b/Ticket.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 = @"Ticket.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/Ticket.Designer.cs b/Ticket.Designer.cs new file mode 100644 index 0000000..ae071f0 --- /dev/null +++ b/Ticket.Designer.cs @@ -0,0 +1,10 @@ +// 为模型“D:\Visual Studio\Audit\Ticket.edmx”启用了 T4 代码生成。 +// 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值 +// 更改为“旧的 ObjectContext”。当在设计器中打开该模型时,此属性会出现在 +// “属性”窗口中。 + +// 如果没有生成任何上下文和实体类,可能是因为您创建了空模型但是 +// 尚未选择要使用的实体框架版本。要为您的模型生成一个上下文类和实体 +// 类,请在设计器中打开该模型,右键单击设计器图面,然后 +// 选择“从数据库更新模型...”、“从模型生成数据库...”或“添加代码生成 +// 项...”。 \ No newline at end of file diff --git a/Ticket.cs b/Ticket.cs new file mode 100644 index 0000000..69c6b92 --- /dev/null +++ b/Ticket.cs @@ -0,0 +1,9 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + diff --git a/Ticket.edmx b/Ticket.edmx new file mode 100644 index 0000000..aac76cf --- /dev/null +++ b/Ticket.edmx @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT + [CHEMICAL_QUEUE].[tmp_field] AS [tmp_field], + [CHEMICAL_QUEUE].[ID_NO] AS [ID_NO], + [CHEMICAL_QUEUE].[STEP_NO] AS [STEP_NO], + [CHEMICAL_QUEUE].[CREATE_DATE] AS [CREATE_DATE], + [CHEMICAL_QUEUE].[CREATE_TIME] AS [CREATE_TIME], + [CHEMICAL_QUEUE].[FIRST_KEY] AS [FIRST_KEY], + [CHEMICAL_QUEUE].[SECOND_KEY] AS [SECOND_KEY], + [CHEMICAL_QUEUE].[PRIORITY] AS [PRIORITY], + [CHEMICAL_QUEUE].[ReDye] AS [ReDye] + FROM [dbo].[CHEMICAL_QUEUE] AS [CHEMICAL_QUEUE] + + + SELECT + [DYESTUFF_QUEUE].[tmp_field] AS [tmp_field], + [DYESTUFF_QUEUE].[ID_NO] AS [ID_NO], + [DYESTUFF_QUEUE].[STEP_NO] AS [STEP_NO], + [DYESTUFF_QUEUE].[CREATE_DATE] AS [CREATE_DATE], + [DYESTUFF_QUEUE].[CREATE_TIME] AS [CREATE_TIME], + [DYESTUFF_QUEUE].[FIRST_KEY] AS [FIRST_KEY], + [DYESTUFF_QUEUE].[SECOND_KEY] AS [SECOND_KEY], + [DYESTUFF_QUEUE].[PRIORITY] AS [PRIORITY], + [DYESTUFF_QUEUE].[ReDye] AS [ReDye] + FROM [dbo].[DYESTUFF_QUEUE] AS [DYESTUFF_QUEUE] + + + SELECT + [JOBTKT].[tmp_field] AS [tmp_field], + [JOBTKT].[IDNO] AS [IDNO], + [JOBTKT].[FNDATE] AS [FNDATE], + [JOBTKT].[FIRST_KEY] AS [FIRST_KEY], + [JOBTKT].[SECOND_KEY] AS [SECOND_KEY], + [JOBTKT].[ReDye] AS [ReDye] + FROM [dbo].[JOBTKT] AS [JOBTKT] + + + SELECT + [POWDER_QUEUE].[tmp_field] AS [tmp_field], + [POWDER_QUEUE].[ID_NO] AS [ID_NO], + [POWDER_QUEUE].[STEP_NO] AS [STEP_NO], + [POWDER_QUEUE].[CREATE_DATE] AS [CREATE_DATE], + [POWDER_QUEUE].[CREATE_TIME] AS [CREATE_TIME], + [POWDER_QUEUE].[FIRST_KEY] AS [FIRST_KEY], + [POWDER_QUEUE].[SECOND_KEY] AS [SECOND_KEY], + [POWDER_QUEUE].[PRIORITY] AS [PRIORITY], + [POWDER_QUEUE].[ReDye] AS [ReDye] + FROM [dbo].[POWDER_QUEUE] AS [POWDER_QUEUE] + + + SELECT + [REMOTETERMINAL].[tmp_field] AS [tmp_field], + [REMOTETERMINAL].[IDNO] AS [IDNO], + [REMOTETERMINAL].[FNDATE] AS [FNDATE], + [REMOTETERMINAL].[IDTYPE] AS [IDTYPE], + [REMOTETERMINAL].[FIRST_KEY] AS [FIRST_KEY], + [REMOTETERMINAL].[SECOND_KEY] AS [SECOND_KEY], + [REMOTETERMINAL].[ReDye] AS [ReDye] + FROM [dbo].[REMOTETERMINAL] AS [REMOTETERMINAL] + + + SELECT + [TEMPCHEMICALTKT].[tmp_field] AS [tmp_field], + [TEMPCHEMICALTKT].[IDNO] AS [IDNO], + [TEMPCHEMICALTKT].[FNDATE] AS [FNDATE], + [TEMPCHEMICALTKT].[IDTYPE] AS [IDTYPE], + [TEMPCHEMICALTKT].[FIRST_KEY] AS [FIRST_KEY], + [TEMPCHEMICALTKT].[SECOND_KEY] AS [SECOND_KEY], + [TEMPCHEMICALTKT].[ReDye] AS [ReDye] + FROM [dbo].[TEMPCHEMICALTKT] AS [TEMPCHEMICALTKT] + + + SELECT + [TEMPDYESTUFFTKT].[tmp_field] AS [tmp_field], + [TEMPDYESTUFFTKT].[IDNO] AS [IDNO], + [TEMPDYESTUFFTKT].[FNDATE] AS [FNDATE], + [TEMPDYESTUFFTKT].[IDTYPE] AS [IDTYPE], + [TEMPDYESTUFFTKT].[FIRST_KEY] AS [FIRST_KEY], + [TEMPDYESTUFFTKT].[SECOND_KEY] AS [SECOND_KEY], + [TEMPDYESTUFFTKT].[ReDye] AS [ReDye] + FROM [dbo].[TEMPDYESTUFFTKT] AS [TEMPDYESTUFFTKT] + + + SELECT + [TEMPPOWDER].[tmp_field] AS [tmp_field], + [TEMPPOWDER].[IDNO] AS [IDNO], + [TEMPPOWDER].[FNDATE] AS [FNDATE], + [TEMPPOWDER].[IDTYPE] AS [IDTYPE], + [TEMPPOWDER].[FIRST_KEY] AS [FIRST_KEY], + [TEMPPOWDER].[SECOND_KEY] AS [SECOND_KEY], + [TEMPPOWDER].[ReDye] AS [ReDye] + FROM [dbo].[TEMPPOWDER] AS [TEMPPOWDER] + + + SELECT + [TICKET_DETAIL].[ID_NO] AS [ID_NO], + [TICKET_DETAIL].[STEP_NO] AS [STEP_NO], + [TICKET_DETAIL].[PRODUCT_CODE] AS [PRODUCT_CODE], + [TICKET_DETAIL].[PRODUCT_TYPE] AS [PRODUCT_TYPE], + [TICKET_DETAIL].[TARGET_WT] AS [TARGET_WT], + [TICKET_DETAIL].[ACTUAL_WT] AS [ACTUAL_WT], + [TICKET_DETAIL].[UNIT] AS [UNIT], + [TICKET_DETAIL].[COMP_DATE] AS [COMP_DATE], + [TICKET_DETAIL].[COMP_TIME] AS [COMP_TIME], + [TICKET_DETAIL].[TRANSFER_STATE] AS [TRANSFER_STATE], + [TICKET_DETAIL].[ERROR_CODE] AS [ERROR_CODE], + [TICKET_DETAIL].[MACHINE] AS [MACHINE], + [TICKET_DETAIL].[TANK_NO] AS [TANK_NO], + [TICKET_DETAIL].[ID_TYPE] AS [ID_TYPE], + [TICKET_DETAIL].[PRODUCT_LOT] AS [PRODUCT_LOT], + [TICKET_DETAIL].[RECIPE_CODE] AS [RECIPE_CODE], + [TICKET_DETAIL].[LR] AS [LR], + [TICKET_DETAIL].[RECIPE_TYPE] AS [RECIPE_TYPE], + [TICKET_DETAIL].[CONC] AS [CONC], + [TICKET_DETAIL].[CONCUNIT] AS [CONCUNIT], + [TICKET_DETAIL].[REMARK] AS [REMARK], + [TICKET_DETAIL].[ADJUST] AS [ADJUST], + [TICKET_DETAIL].[PRICE] AS [PRICE], + [TICKET_DETAIL].[RES_DOUBLE1] AS [RES_DOUBLE1], + [TICKET_DETAIL].[RES_DOUBLE2] AS [RES_DOUBLE2], + [TICKET_DETAIL].[RES_DOUBLE3] AS [RES_DOUBLE3], + [TICKET_DETAIL].[RES_DOUBLE4] AS [RES_DOUBLE4], + [TICKET_DETAIL].[RES_STRING1] AS [RES_STRING1], + [TICKET_DETAIL].[RES_STRING2] AS [RES_STRING2], + [TICKET_DETAIL].[RES_STRING3] AS [RES_STRING3], + [TICKET_DETAIL].[RES_STRING4] AS [RES_STRING4], + [TICKET_DETAIL].[REWEIGHT] AS [REWEIGHT], + [TICKET_DETAIL].[Redye] AS [Redye], + [TICKET_DETAIL].[DyeWeightTime] AS [DyeWeightTime], + [TICKET_DETAIL].[UserAccount] AS [UserAccount], + [TICKET_DETAIL].[Batch_NO] AS [Batch_NO], + [TICKET_DETAIL].[lldmxid] AS [lldmxid], + [TICKET_DETAIL].[Station] AS [Station], + [TICKET_DETAIL].[UserCode] AS [UserCode], + [TICKET_DETAIL].[FABRIC_WEIGHT] AS [FABRIC_WEIGHT], + [TICKET_DETAIL].[VOLUME] AS [VOLUME], + [TICKET_DETAIL].[RECORD_ORDER] AS [RECORD_ORDER], + [TICKET_DETAIL].[Process] AS [Process], + [TICKET_DETAIL].[GRAVITY] AS [GRAVITY], + [TICKET_DETAIL].[CurrentStock] AS [CurrentStock] + FROM [dbo].[TICKET_DETAIL] AS [TICKET_DETAIL] + + + SELECT + [TicketSerial].[tmp_field] AS [tmp_field], + [TicketSerial].[ID_NO] AS [ID_NO], + [TicketSerial].[REDYE_NOW] AS [REDYE_NOW] + FROM [dbo].[TicketSerial] AS [TicketSerial] + + + SELECT + [UserAccount].[tmp_field] AS [tmp_field], + [UserAccount].[UserCode] AS [UserCode], + [UserAccount].[PassWord] AS [PassWord], + [UserAccount].[JobTicket] AS [JobTicket], + [UserAccount].[Report] AS [Report], + [UserAccount].[PathSetup] AS [PathSetup], + [UserAccount].[UserSetup] AS [UserSetup], + [UserAccount].[GROUP_CODE] AS [GROUP_CODE] + FROM [dbo].[UserAccount] AS [UserAccount] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Ticket.edmx.diagram b/Ticket.edmx.diagram new file mode 100644 index 0000000..5aefbd2 --- /dev/null +++ b/Ticket.edmx.diagram @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Ticket.tt b/Ticket.tt new file mode 100644 index 0000000..7199bed --- /dev/null +++ b/Ticket.tt @@ -0,0 +1,733 @@ +<#@ template language="C#" debug="false" hostspecific="true"#> +<#@ include file="EF6.Utility.CS.ttinclude"#><#@ + output extension=".cs"#><# + +const string inputFile = @"Ticket.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/TicketSerial.cs b/TicketSerial.cs new file mode 100644 index 0000000..457be95 --- /dev/null +++ b/TicketSerial.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class TicketSerial + { + public string tmp_field { get; set; } + public string ID_NO { get; set; } + public int REDYE_NOW { get; set; } + } +} diff --git a/UserAccount.cs b/UserAccount.cs new file mode 100644 index 0000000..b2efd05 --- /dev/null +++ b/UserAccount.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class UserAccount + { + public string tmp_field { get; set; } + public string UserCode { get; set; } + public string PassWord { get; set; } + public Nullable JobTicket { get; set; } + public Nullable Report { get; set; } + public Nullable PathSetup { get; set; } + public Nullable UserSetup { get; set; } + public string GROUP_CODE { get; set; } + } +} diff --git a/UserGroup.cs b/UserGroup.cs new file mode 100644 index 0000000..b7fff8f --- /dev/null +++ b/UserGroup.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class UserGroup + { + public string Name { get; set; } + public string password { get; set; } + public Nullable Permission { get; set; } + public string User_Group { get; set; } + } +} diff --git a/Users.cs b/Users.cs new file mode 100644 index 0000000..1a155da --- /dev/null +++ b/Users.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class Users + { + public string Name { get; set; } + public string Xml { get; set; } + } +} diff --git a/ViewModel/MainViewModel.cs b/ViewModel/MainViewModel.cs new file mode 100644 index 0000000..14f8f0d --- /dev/null +++ b/ViewModel/MainViewModel.cs @@ -0,0 +1,34 @@ +using GalaSoft.MvvmLight; + +namespace Audit.ViewModel +{ + /// + /// This class contains properties that the main View can data bind to. + /// + /// Use the mvvminpc snippet to add bindable properties to this ViewModel. + /// + /// + /// You can also use Blend to data bind with the tool's support. + /// + /// + /// See http://www.galasoft.ch/mvvm + /// + /// + public class MainViewModel : ViewModelBase + { + /// + /// Initializes a new instance of the MainViewModel class. + /// + public MainViewModel() + { + ////if (IsInDesignMode) + ////{ + //// // Code runs in Blend --> create design time data. + ////} + ////else + ////{ + //// // Code runs "for real" + ////} + } + } +} \ No newline at end of file diff --git a/ViewModel/ViewModelLocator.cs b/ViewModel/ViewModelLocator.cs new file mode 100644 index 0000000..3fc91e7 --- /dev/null +++ b/ViewModel/ViewModelLocator.cs @@ -0,0 +1,61 @@ +/* + In App.xaml: + + + + + In the View: + DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}" + + You can also use Blend to do all this with the tool's support. + See http://www.galasoft.ch/mvvm +*/ + +using GalaSoft.MvvmLight; +using GalaSoft.MvvmLight.Ioc; +using Microsoft.Practices.ServiceLocation; + +namespace Audit.ViewModel +{ + /// + /// This class contains static references to all the view models in the + /// application and provides an entry point for the bindings. + /// + public class ViewModelLocator + { + /// + /// Initializes a new instance of the ViewModelLocator class. + /// + public ViewModelLocator() + { + ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); + + ////if (ViewModelBase.IsInDesignModeStatic) + ////{ + //// // Create design time view services and models + //// SimpleIoc.Default.Register(); + ////} + ////else + ////{ + //// // Create run time view services and models + //// SimpleIoc.Default.Register(); + ////} + + SimpleIoc.Default.Register(); + } + + public MainViewModel Main + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static void Cleanup() + { + // TODO Clear the ViewModels + } + } +} \ No newline at end of file diff --git a/WaitChemical.cs b/WaitChemical.cs new file mode 100644 index 0000000..d52f7ca --- /dev/null +++ b/WaitChemical.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class WaitChemical + { + public int ID { get; set; } + public string Machine { get; set; } + public string Dyelot { get; set; } + public int ReDye { get; set; } + public int StepNumber { get; set; } + public System.DateTime CreationTime { get; set; } + public Nullable ProductType { get; set; } + public string ProductCode { get; set; } + public string ProductName { get; set; } + public double Weight { get; set; } + public Nullable State { get; set; } + public Nullable Volume { get; set; } + public Nullable ActWeight { get; set; } + public Nullable FuzhuWeight { get; set; } + public Nullable DispenseTime { get; set; } + } +} diff --git a/packages.config b/packages.config new file mode 100644 index 0000000..8c82799 --- /dev/null +++ b/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/record.cs b/record.cs new file mode 100644 index 0000000..1d855ac --- /dev/null +++ b/record.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 此代码已从模板生成。 +// +// 手动更改此文件可能导致应用程序出现意外的行为。 +// 如果重新生成代码,将覆盖对此文件的手动更改。 +// +//------------------------------------------------------------------------------ + +namespace Audit +{ + using System; + using System.Collections.Generic; + + public partial class record + { + public int ID { get; set; } + public string record1 { get; set; } + public Nullable time { get; set; } + } +} From 507541d138acf07c5710f602dc52978270010fe1 Mon Sep 17 00:00:00 2001 From: sc <2401809606@qq.com> Date: Thu, 13 Jan 2022 22:20:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=20'Audit.csproj'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Audit.csproj | 442 --------------------------------------------------- 1 file changed, 442 deletions(-) delete mode 100644 Audit.csproj diff --git a/Audit.csproj b/Audit.csproj deleted file mode 100644 index 5faf3d1..0000000 --- a/Audit.csproj +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - 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