diff --git a/App.config b/App.config index 26df152..3e8cf76 100644 --- a/App.config +++ b/App.config @@ -24,13 +24,14 @@ + diff --git a/App.xaml b/App.xaml index d51fbec..f38e254 100644 --- a/App.xaml +++ b/App.xaml @@ -1,4 +1,4 @@ - + diff --git a/App.xaml.cs b/App.xaml.cs index c245e59..1b7dcbf 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -1,4 +1,5 @@ -using System; +using MahApps.Metro.Controls; +using System; using System.Collections.Generic; using System.Configuration; using System.Data; @@ -7,9 +8,11 @@ using System.IO; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; +using System.Threading; using System.Threading.Tasks; using System.Windows; + namespace Audit { /// @@ -20,26 +23,55 @@ namespace Audit /// /// App.xaml 的交互逻辑 /// - System.Threading.Mutex mutex; - /// - ///检查应用进程,防止重复启动。 - /// + public App() + { + this.Startup += new StartupEventHandler(App_Startup); + this.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException); + } + + System.Threading.Mutex mutex; + void App_Startup(object sender, StartupEventArgs e) + { + bool ret; + mutex = new System.Threading.Mutex(true, "ElectronicNeedleTherapySystem", out ret); + if (!ret) { - this.Startup += new StartupEventHandler(App_Startup); + MessageBox.Show("SC:审计管理已启动"); + Environment.Exit(0); } + } - void App_Startup(object sender, StartupEventArgs e) - { - bool ret; - mutex = new System.Threading.Mutex(true, "ElectronicNeedleTherapySystem", out ret); + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + //UI线程的异常捕捉 + this.DispatcherUnhandledException += App_DispatcherUnhandledException; + } - if (!ret) + private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) + { + + e.Handled = true; + if (e.Exception.InnerException == null) { - MessageBox.Show("SC:审计管理已启动"); - Environment.Exit(0); + MessageBox.Show("(1)发生了一个错误!请联系开发人员!" + Environment.NewLine + + "(2)错误源:" + e.Exception.Source + Environment.NewLine + + "(3)详细信息:" + e.Exception.Message + Environment.NewLine + // + "(4)报错区域:" + e.Exception.StackTrace + ); + } + else + { + MessageBox.Show("(1)发生了一个错误!请联系开发人员!" + Environment.NewLine + + "(2)错误源:" + e.Exception.InnerException.Source + Environment.NewLine + + "(3)错误信息:" + e.Exception.Message + Environment.NewLine + + "(4)详细信息:" + e.Exception.InnerException.Message + Environment.NewLine + // + "(5)报错区域:" + e.Exception.InnerException.StackTrace + ); } - } + + } } -} +} \ No newline at end of file diff --git a/Audit.csproj b/Audit.csproj index 89e4732..243c80d 100644 --- a/Audit.csproj +++ b/Audit.csproj @@ -18,7 +18,7 @@ false - publish\ + C:\Users\尚彩-沈忱\Desktop\ true Disk false @@ -166,15 +166,30 @@ + + + + + + + + + + + MachinesView.xaml + + + PipesView.xaml + QueryView.xaml @@ -193,6 +208,9 @@ Set_up_Sql.xaml + + user.xaml + MSBuild:Compile Designer @@ -209,6 +227,14 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -233,6 +259,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + diff --git a/ConvertMoels/ConsumptionConvert.cs b/ConvertMoels/ConsumptionConvert.cs new file mode 100644 index 0000000..300d603 --- /dev/null +++ b/ConvertMoels/ConsumptionConvert.cs @@ -0,0 +1,46 @@ +using Audit.View; +using Models; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +/// +/// 统计消耗量变换器 +/// 输入:原料代码、时间区间 +/// 输出:消耗总量(KG) +/// +namespace Audit.ConvertMoels +{ + internal class ConsumptionConvert : IValueConverter + { + private DyelotsBulkedRecipe dyelotsBulkedRecipe = new DyelotsBulkedRecipe(); + // public static string Code = null; + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (string.IsNullOrWhiteSpace(StatisticsView.query_start)) StatisticsView.query_start = DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");//默认开始时间当前日期前30天 + if (string.IsNullOrWhiteSpace(StatisticsView.query_end)) StatisticsView.query_end = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");//默认结束时间当前日期后一天 + dyelotsBulkedRecipe.ProductCode = System.Convert.ToString(value);//传递原料代码 + dyelotsBulkedRecipe.DispenseStartTime = System.Convert.ToDateTime(StatisticsView.query_start);//传递开始时间 + dyelotsBulkedRecipe.DispenseEndTime = System.Convert.ToDateTime(StatisticsView.query_end);//传递结束时间 + float sum_grams = (float)new DyelotsBulkedRecipeProvider().SelectCode(dyelotsBulkedRecipe).Sum(x => x.DispenseGrams);//查询并返回统计结果 + if (sum_grams == 0)//统计结果为0返回空非0返回实际值 + { + return null; + } + else + { + float sum = sum_grams / 1000;//计算 + return sum.ToString("#0.00");//返回总成本两位小数(元) + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/ConvertMoels/DeviationConvert.cs b/ConvertMoels/DeviationConvert.cs index 8dc99bb..934f487 100644 --- a/ConvertMoels/DeviationConvert.cs +++ b/ConvertMoels/DeviationConvert.cs @@ -12,11 +12,11 @@ namespace Audit.ConvertMoels { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { - string a = System.Convert.ToString(values[0]); - string b = System.Convert.ToString(values[1]); + string a = System.Convert.ToString(values[0]);//转换数组1的信息 + string b = System.Convert.ToString(values[1]);//转换数组2的信息 if (a != "" && b != "") { - string c = (System.Convert.ToSingle(b) - System.Convert.ToSingle(a)).ToString("0.0"); + string c = (System.Convert.ToSingle(b) - System.Convert.ToSingle(a)).ToString("0.0");//计算值1和2的差值并返回字符串 //string c = "0"; return c; } diff --git a/ConvertMoels/GramsSumConvert.cs b/ConvertMoels/GramsSumConvert.cs new file mode 100644 index 0000000..f4f26e9 --- /dev/null +++ b/ConvertMoels/GramsSumConvert.cs @@ -0,0 +1,47 @@ +using Audit.View; +using Models; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +/// +/// 统计成本变换器 +/// 输入:原料代码、原料价格、时间区间 +/// 输出:总成本 +/// +namespace Audit.ConvertMoels +{ + internal class GramsSumConvert : IMultiValueConverter + { + private DyelotsBulkedRecipe dyelotsBulkedRecipe = new DyelotsBulkedRecipe(); + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + string productcode = System.Convert.ToString(values[0]);//转换数组1的信息原料代码 + float price = System.Convert.ToSingle(values[1]);//转换数组2的信息单价 + if (string.IsNullOrWhiteSpace(StatisticsView.query_start)) StatisticsView.query_start = DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");//默认开始时间当前日期前30天 + if (string.IsNullOrWhiteSpace(StatisticsView.query_end)) StatisticsView.query_end = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");//默认结束时间当前日期后一天 + dyelotsBulkedRecipe.ProductCode = System.Convert.ToString(productcode);//传递原料代码 + dyelotsBulkedRecipe.DispenseStartTime = System.Convert.ToDateTime(StatisticsView.query_start);//传递开始时间 + dyelotsBulkedRecipe.DispenseEndTime = System.Convert.ToDateTime(StatisticsView.query_end);//传递结束时间 + float sum_grams = (float)new DyelotsBulkedRecipeProvider().SelectCode(dyelotsBulkedRecipe).Sum(x => x.DispenseGrams);//查询并返回统计结果 + if (sum_grams > 0 && price > 0) + { + float sum = (sum_grams * price) / 1000;//计算 + return sum.ToString("#0.00");//返回总成本两位小数(元) + } + else + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/ConvertMoels/MachinesDyelotsNumberConvert.cs b/ConvertMoels/MachinesDyelotsNumberConvert.cs new file mode 100644 index 0000000..9bcfa28 --- /dev/null +++ b/ConvertMoels/MachinesDyelotsNumberConvert.cs @@ -0,0 +1,58 @@ +using Audit.View; +using Models; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +/// +/// 统计机台单料数变换器 +/// 输入:原料代码、机台代码、时间区间 +/// 输出:机台料单数 +/// +namespace Audit.ConvertMoels +{ + internal class MachinesDyelotsNumberConvert : IValueConverter + { + private Dyelots dyelots = new Dyelots(); + private DyelotsBulkedRecipe dyelotsBulkedRecipe = new DyelotsBulkedRecipe(); + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + string machines = System.Convert.ToString(value);//转换机台号 + if (string.IsNullOrWhiteSpace(StatisticsView.query_start)) StatisticsView.query_start = DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");//默认开始时间当前日期前30天 + if (string.IsNullOrWhiteSpace(StatisticsView.query_end)) StatisticsView.query_end = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");//默认结束时间当前日期后一天 + dyelots.Machine = System.Convert.ToString(machines);//传递机台 + //dyelots.StartTime = System.Convert.ToString(machines); + //float sum_grams = (float)new DyelotsBulkedRecipeProvider().SelectCode(dyelotsBulkedRecipe).Sum(x => x.DispenseGrams);//查询并返回统计结果 + if (string.IsNullOrWhiteSpace(StatisticsView.DataGridStatistics_ProductCode))//原料代码名有效返回数据,无效返回空 + { + return null; + } + else + { + dyelotsBulkedRecipe.Dispenser = System.Convert.ToString(machines);//传递机台 + dyelotsBulkedRecipe.ProductCode = StatisticsView.DataGridStatistics_ProductCode; + dyelotsBulkedRecipe.DispenseStartTime = System.Convert.ToDateTime(StatisticsView.query_start); + dyelotsBulkedRecipe.DispenseEndTime = System.Convert.ToDateTime(StatisticsView.query_end); + float Machines_Number = (float)new DyelotsBulkedRecipeProvider().SelectMachineSUM(dyelotsBulkedRecipe).Count(t => t.ReDye == 0);//查询并返回统计结果 + if (Machines_Number == 0) + { + return null; + } + else + { + return Machines_Number; + } + } + + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + } +} diff --git a/ConvertMoels/MachinesGramsSumConvert.cs b/ConvertMoels/MachinesGramsSumConvert.cs new file mode 100644 index 0000000..ca223a0 --- /dev/null +++ b/ConvertMoels/MachinesGramsSumConvert.cs @@ -0,0 +1,57 @@ +using Audit.View; +using Models; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +/// +/// 统计机台消耗变换器 +/// 输入:原料代码、机台代码、时间区间 +/// 输出:机台消耗 +/// +namespace Audit.ConvertMoels +{ + internal class MachinesGramsSumConvert : IValueConverter + { + private Dyelots dyelots = new Dyelots(); + private DyelotsBulkedRecipe dyelotsBulkedRecipe = new DyelotsBulkedRecipe(); + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + string machines = System.Convert.ToString(value);//转换机台号 + if (string.IsNullOrWhiteSpace(StatisticsView.query_start)) StatisticsView.query_start = DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");//默认开始时间当前日期前30天 + if (string.IsNullOrWhiteSpace(StatisticsView.query_end)) StatisticsView.query_end = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");//默认结束时间当前日期后一天 + if (string.IsNullOrWhiteSpace(StatisticsView.DataGridStatistics_ProductCode))//原料代码名有效返回数据,无效返回空 + { + return null; + } + else + { + dyelotsBulkedRecipe.Dispenser = System.Convert.ToString(machines);//传递机台 + dyelotsBulkedRecipe.ProductCode = StatisticsView.DataGridStatistics_ProductCode; + dyelotsBulkedRecipe.DispenseStartTime = System.Convert.ToDateTime(StatisticsView.query_start); + dyelotsBulkedRecipe.DispenseEndTime = System.Convert.ToDateTime(StatisticsView.query_end); + float Machines_sum = (float)new DyelotsBulkedRecipeProvider().SelectMachineSUM(dyelotsBulkedRecipe).Sum(x => x.DispenseGrams);//查询并返回统计结果 + if (Machines_sum == 0) + { + return null; + } + else + { + string Machines_grams_sum = (Machines_sum / 1000).ToString("#0.00"); + return Machines_grams_sum; + } + } + + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + } +} diff --git a/ConvertMoels/ProductTypeSQLConvert.cs b/ConvertMoels/ProductTypeSQLConvert.cs index 7b47e92..3823969 100644 --- a/ConvertMoels/ProductTypeSQLConvert.cs +++ b/ConvertMoels/ProductTypeSQLConvert.cs @@ -19,7 +19,7 @@ namespace Audit.ConvertMoels public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string ProductType = System.Convert.ToString(value); - if (ProductType == "0")//类型0:染料,1:助剂,2:粉体助剂,其它:未知 + if (ProductType == "0")//类型0:染料,1:助剂,2:粉体助剂,3:液体染料,其它:未知 { return "染料"; } @@ -37,7 +37,14 @@ namespace Audit.ConvertMoels } else { - return "未知类型"; + if (ProductType == "3") + { + return "液体染料"; + } + else + { + return "未知类型"; + } } } } diff --git a/ConvertMoels/StatenConvert.cs b/ConvertMoels/StatenConvert.cs new file mode 100644 index 0000000..c24c943 --- /dev/null +++ b/ConvertMoels/StatenConvert.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; +using System.Windows.Input; +using System.Windows.Controls; + +/// +/// 运行状态变换器 +/// 输入:状态码 +/// 输出:状态文字 +/// +namespace Audit.ConvertMoels +{ + internal class StatenConvert : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if (value == null) + { + return null; + } + else + { + string Staten = null; + string i = value.ToString(); + + if (i == "101") Staten = "准备就绪"; + if (i == "102") Staten = "计量输送"; + if (i == "201") Staten = "自动状态"; + if (i == "202") Staten = "转入排队"; + if (i == "203") Staten = "等待命令"; + if (i == "301") Staten = "工单完成"; + if (i == "309") Staten = "输送异常"; + + return Staten; + } + } + + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + + } +} diff --git a/ConvertMoels/StatenERRConvert.cs b/ConvertMoels/StatenERRConvert.cs new file mode 100644 index 0000000..48e0420 --- /dev/null +++ b/ConvertMoels/StatenERRConvert.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; +using System.Windows.Input; +using System.Windows.Controls; + +namespace Audit.ConvertMoels +{ + internal class StatenERRConvert : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if (value == null) + { + return null; + } + else + { + if (value.ToString() == "309") + { + return "red";//零返回红色 + } + else + { + return "black";//非零返回黑色 + } + } + } + + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/ConvertMoels/SumSQLConvert.cs b/ConvertMoels/SumSQLConvert.cs new file mode 100644 index 0000000..504db26 --- /dev/null +++ b/ConvertMoels/SumSQLConvert.cs @@ -0,0 +1,25 @@ +using Audit.View; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Audit.ConvertMoels +{ + internal class SumSQLConvert : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + string a = StatisticsView.query_start; + string b = StatisticsView.query_end; + return null; + } + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + } +} diff --git a/MainWindow.xaml b/MainWindow.xaml index 97f99fd..d92f27c 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -4,13 +4,16 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Audit" + xmlns:ConvertMoels="clr-namespace:Audit.ConvertMoels" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="Audit.MainWindow" mc:Ignorable="d" Background="#FFF5F5F5" Title="SUNLIGHT" Height="900" Width="1280" WindowStartupLocation="CenterScreen"> + + + - - - - + + + + + + @@ -120,6 +172,11 @@ + + + + + \ No newline at end of file diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index e4894e7..45782c9 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -15,6 +15,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using System.Windows.Threading; namespace Audit { @@ -29,15 +30,17 @@ namespace Audit public MainWindow() { InitializeComponent(); - } - - private void TimePicker_SelectedDateTimeChanged(object sender, RoutedPropertyChangedEventArgs e) - { + this.RadioButtonk1.Visibility = Visibility.Collapsed;//隐藏管理 + this.RadioButtonk12.Visibility = Visibility.Collapsed;//隐藏设置 + CountDown();//执行循环方法 } private void Exit(object sender, RoutedEventArgs e) { - Application.Current.Shutdown();//关闭全部窗口 + if (user_t > 0)//判断登录状态 + user_t = 0;//登录倒计时清除 + else + Application.Current.Shutdown();//关闭全部窗口 } private void Help(object sender, RoutedEventArgs e) @@ -45,6 +48,60 @@ namespace Audit Windows.help help = new Windows.help(); help.ShowDialog();//实例化并置顶打开信息窗口 } + private void User(object sender, RoutedEventArgs e) + { + Windows.user user = new Windows.user(); + user.ShowDialog();//实例化并置顶打开用户窗口 + } + + private void Set_up(object sender, RoutedEventArgs e) + { + Windows.Set_up_Sql set = new Windows.Set_up_Sql(); + set.ShowDialog();//实例化并置顶打开设置窗口 + } + + public static int user_t = 0; + public static string user_n = null; + + public void DisTimer_Tick(object sender, EventArgs e)//循环事件 + { + if (string.IsNullOrEmpty(user_n)) + { + + } + else + { + if (user_t > 0) + { + this.RadioButtonk1.Visibility = Visibility.Visible;//显示管理 + this.RadioButtonk12.Visibility = Visibility.Visible;//显示设置 + user_time.Text = user_n + ":" + user_t.ToString();//前端计时显示 + user_t--;//计时减一 + } + else + { + container.Content = new QueryView();//打开查询 + this.RadioButtonk1.Visibility = Visibility.Collapsed;//隐藏管理 + this.RadioButtonk12.Visibility = Visibility.Collapsed;//隐藏设置 + this.RadioButtonk2.Visibility = Visibility.Collapsed; + this.RadioButtonk21.Visibility = Visibility.Collapsed; + this.RadioButtonk22.Visibility = Visibility.Collapsed; + this.RadioButtonk23.Visibility = Visibility.Collapsed; + this.RadioButtonk24.Visibility = Visibility.Collapsed;//隐藏管理副目录 + user_n = null;//状态清空 + user_time.Text = null;//前端计数显示空 + } + } + } + + private DispatcherTimer disTimer = new DispatcherTimer();//循环功能 + public void CountDown() + { + //设置定时器 + disTimer.Tick += new EventHandler(DisTimer_Tick);//每一秒执行的方法 + disTimer.Interval = new TimeSpan(10000000); //时间间隔为一秒。 + disTimer.Start();//计时开始 + } private void RadioButton_Checked(object sender, RoutedEventArgs e) { @@ -52,12 +109,83 @@ namespace Audit if (string.IsNullOrEmpty(button.Content.ToString())) return; switch (button.Content.ToString()) { - case "查询": container.Content = new QueryView(); break; - case "原料": container.Content = new StuffView(); break; - case "统计": container.Content = new StatisticsView(); break; + case "查询": + container.Content = new QueryView(); + this.RadioButtonk2.Visibility = Visibility.Collapsed; + this.RadioButtonk21.Visibility = Visibility.Collapsed; + this.RadioButtonk22.Visibility = Visibility.Collapsed; + this.RadioButtonk23.Visibility = Visibility.Collapsed; + this.RadioButtonk24.Visibility = Visibility.Collapsed; + break; + case "统计": + container.Content = new StatisticsView(); + this.RadioButtonk2.Visibility = Visibility.Collapsed; + this.RadioButtonk21.Visibility = Visibility.Collapsed; + this.RadioButtonk22.Visibility = Visibility.Collapsed; + this.RadioButtonk23.Visibility = Visibility.Collapsed; + this.RadioButtonk24.Visibility = Visibility.Collapsed; + break; + case "管理": + this.RadioButtonk2.Visibility = Visibility.Visible; + this.RadioButtonk21.Visibility = Visibility.Visible; + this.RadioButtonk22.Visibility = Visibility.Visible; + this.RadioButtonk23.Visibility = Visibility.Visible; + this.RadioButtonk24.Visibility = Visibility.Visible; + break; default: break; } } + + private void RadioButton_Checked2(object sender, RoutedEventArgs e) + { + if (!(sender is RadioButton button)) return; + if (string.IsNullOrEmpty(button.Content.ToString())) return; + switch (button.Content.ToString()) + { + case "-": + this.RadioButtonk2.Visibility = Visibility.Collapsed; + this.RadioButtonk21.Visibility = Visibility.Collapsed; + this.RadioButtonk22.Visibility = Visibility.Collapsed; + this.RadioButtonk23.Visibility = Visibility.Collapsed; + this.RadioButtonk24.Visibility = Visibility.Collapsed; + break; + case "原料管理": + container.Content = new StuffView(); + this.RadioButtonk2.Visibility = Visibility.Collapsed; + this.RadioButtonk21.Visibility = Visibility.Collapsed; + this.RadioButtonk22.Visibility = Visibility.Collapsed; + this.RadioButtonk23.Visibility = Visibility.Collapsed; + this.RadioButtonk24.Visibility = Visibility.Collapsed; + break; + case "染机管理": + container.Content = new View.MachinesView(); + this.RadioButtonk2.Visibility = Visibility.Collapsed; + this.RadioButtonk21.Visibility = Visibility.Collapsed; + this.RadioButtonk22.Visibility = Visibility.Collapsed; + this.RadioButtonk23.Visibility = Visibility.Collapsed; + this.RadioButtonk24.Visibility = Visibility.Collapsed; + break; + case "设备管理": + + this.RadioButtonk2.Visibility = Visibility.Collapsed; + this.RadioButtonk21.Visibility = Visibility.Collapsed; + this.RadioButtonk22.Visibility = Visibility.Collapsed; + this.RadioButtonk23.Visibility = Visibility.Collapsed; + this.RadioButtonk24.Visibility = Visibility.Collapsed; + break; + case "输送原料": + container.Content = new PipesView(); + this.RadioButtonk2.Visibility = Visibility.Collapsed; + this.RadioButtonk21.Visibility = Visibility.Collapsed; + this.RadioButtonk22.Visibility = Visibility.Collapsed; + this.RadioButtonk23.Visibility = Visibility.Collapsed; + this.RadioButtonk24.Visibility = Visibility.Collapsed; + break; + default: + break; + } + } + } } diff --git a/Models/App.Config b/Models/App.Config index 89b21ce..3e888b9 100644 --- a/Models/App.Config +++ b/Models/App.Config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/Models/AuxDslvQueue.cs b/Models/AuxDslvQueue.cs deleted file mode 100644 index b9bddbc..0000000 --- a/Models/AuxDslvQueue.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/AuxDslvQueueHistory.cs b/Models/AuxDslvQueueHistory.cs deleted file mode 100644 index 42287b5..0000000 --- a/Models/AuxDslvQueueHistory.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/BucketCrane.cs b/Models/BucketCrane.cs deleted file mode 100644 index 1a6f8ce..0000000 --- a/Models/BucketCrane.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class BucketCrane - { - public string Dyelot { get; set; } - public Nullable ReDye { get; set; } - public Nullable StepNumber { get; set; } - public Nullable DevideNo { get; set; } - public Nullable BucketNo { get; set; } - public string DID { get; set; } - public Nullable State { get; set; } - public Nullable Updated { get; set; } - } -} diff --git a/Models/BucketCraneHistory.cs b/Models/BucketCraneHistory.cs deleted file mode 100644 index 5647989..0000000 --- a/Models/BucketCraneHistory.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class BucketCraneHistory - { - public string Dyelot { get; set; } - public Nullable ReDye { get; set; } - public Nullable StepNumber { get; set; } - public Nullable DevideNo { get; set; } - public Nullable BucketNo { get; set; } - public string DID { get; set; } - public Nullable State { get; set; } - public Nullable Created { get; set; } - } -} diff --git a/Models/BucketInfo.cs b/Models/BucketInfo.cs deleted file mode 100644 index 31b47a6..0000000 --- a/Models/BucketInfo.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/BucketShelf.cs b/Models/BucketShelf.cs deleted file mode 100644 index dfb20a6..0000000 --- a/Models/BucketShelf.cs +++ /dev/null @@ -1,35 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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; } - public Nullable Locked { get; set; } - public string ProductCode { get; set; } - public string OriginDyelot { get; set; } - } -} diff --git a/Models/BucketShelfHistory.cs b/Models/BucketShelfHistory.cs deleted file mode 100644 index 492014a..0000000 --- a/Models/BucketShelfHistory.cs +++ /dev/null @@ -1,35 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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; } - public Nullable Locked { get; set; } - public string ProductCode { get; set; } - public string OriginDyelot { get; set; } - } -} diff --git a/Models/BucketShelfQueue.cs b/Models/BucketShelfQueue.cs deleted file mode 100644 index bad4ada..0000000 --- a/Models/BucketShelfQueue.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/BucketShelfQueueHistory.cs b/Models/BucketShelfQueueHistory.cs deleted file mode 100644 index 5585f7e..0000000 --- a/Models/BucketShelfQueueHistory.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/CleanDevice.cs b/Models/CleanDevice.cs deleted file mode 100644 index 59e91a5..0000000 --- a/Models/CleanDevice.cs +++ /dev/null @@ -1,21 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DBRDetail.cs b/Models/DBRDetail.cs deleted file mode 100644 index 6b5a017..0000000 --- a/Models/DBRDetail.cs +++ /dev/null @@ -1,40 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class DBRDetail - { - public long ID { get; set; } - public string Dyelot { get; set; } - public int Redye { get; set; } - public int StepNumber { get; set; } - public string ProductCode { get; set; } - public string ProductName { get; set; } - public Nullable Grams { get; set; } - public Nullable DispenseGrams { get; set; } - public Nullable Buckets { get; set; } - public System.DateTime DispenseStartTime { get; set; } - public Nullable DispenseEndTime { get; set; } - public Nullable DispenseSeconds { get; set; } - public Nullable ProductStartTime { get; set; } - public Nullable ProductEndTime { get; set; } - public Nullable ProductSeconds { get; set; } - public Nullable LDXGrams { get; set; } - public Nullable LDXBuckets { get; set; } - public Nullable IsDeduct { get; set; } - public Nullable DeductBox { get; set; } - public string BoxNo { get; set; } - public Nullable DispenseResult { get; set; } - public Nullable BucketWeight { get; set; } - } -} diff --git a/Models/DispenserEvent.cs b/Models/DispenserEvent.cs deleted file mode 100644 index e40815b..0000000 --- a/Models/DispenserEvent.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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 Device { 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/Models/DispenserLifeStatus.cs b/Models/DispenserLifeStatus.cs deleted file mode 100644 index c6d890d..0000000 --- a/Models/DispenserLifeStatus.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class DispenserLifeStatus - { - public string Dispenser { get; set; } - public string Device { get; set; } - public Nullable HeartBeat { get; set; } - public Nullable LifeTime { get; set; } - public Nullable UpdateDate { get; set; } - public Nullable Created { get; set; } - } -} diff --git a/Models/DispenserUtilization.cs b/Models/DispenserUtilization.cs deleted file mode 100644 index 17dbf31..0000000 --- a/Models/DispenserUtilization.cs +++ /dev/null @@ -1,27 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class DispenserUtilization - { - public string Dispenser { get; set; } - public string Device { get; set; } - public string Dyelot { get; set; } - public Nullable ReDye { get; set; } - public Nullable StepNumber { get; set; } - public Nullable UtilStartDate { get; set; } - public Nullable UtilEndDate { get; set; } - public Nullable UtilTimes { get; set; } - public string UserAccount { get; set; } - } -} diff --git a/Models/Dispensers.cs b/Models/Dispensers.cs deleted file mode 100644 index 1db2963..0000000 --- a/Models/Dispensers.cs +++ /dev/null @@ -1,37 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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 string Action { get; set; } - public string ProductCode { get; set; } - public Nullable SN { 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/Models/DissolveArt.cs b/Models/DissolveArt.cs deleted file mode 100644 index ee2dec3..0000000 --- a/Models/DissolveArt.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class DissolveArt - { - public string Name { get; set; } - public Nullable ProductClass { get; set; } - public Nullable LiquidRatio { get; set; } - public Nullable MinWeight { get; set; } - public Nullable MaxWeight { get; set; } - public Nullable DissolveTemperature { get; set; } - public Nullable UseLiquidDye { get; set; } - public Nullable UseChemical { get; set; } - public string Process { get; set; } - public Nullable TankSize { get; set; } - public Nullable Created { get; set; } - } -} diff --git a/Models/DissolveArtHistory.cs b/Models/DissolveArtHistory.cs deleted file mode 100644 index 9bb1e32..0000000 --- a/Models/DissolveArtHistory.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class DissolveArtHistory - { - public string Name { get; set; } - public Nullable ProductClass { get; set; } - public Nullable LiquidRatio { get; set; } - public Nullable MinWeight { get; set; } - public Nullable MaxWeight { get; set; } - public Nullable DissolveTemperature { get; set; } - public Nullable UseLiquidDye { get; set; } - public Nullable UseChemical { get; set; } - public string Process { get; set; } - public Nullable TankSize { get; set; } - public Nullable Updated { get; set; } - } -} diff --git a/Models/DyelotBucketSummary.cs b/Models/DyelotBucketSummary.cs deleted file mode 100644 index 865adac..0000000 --- a/Models/DyelotBucketSummary.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotBuckets.cs b/Models/DyelotBuckets.cs deleted file mode 100644 index daf3396..0000000 --- a/Models/DyelotBuckets.cs +++ /dev/null @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotBucketsHistory.cs b/Models/DyelotBucketsHistory.cs deleted file mode 100644 index 33962e1..0000000 --- a/Models/DyelotBucketsHistory.cs +++ /dev/null @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotDetail.cs b/Models/DyelotDetail.cs deleted file mode 100644 index 5d7df35..0000000 --- a/Models/DyelotDetail.cs +++ /dev/null @@ -1,40 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotDslvQueue.cs b/Models/DyelotDslvQueue.cs deleted file mode 100644 index c6c63f6..0000000 --- a/Models/DyelotDslvQueue.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotDslvQueueHistory.cs b/Models/DyelotDslvQueueHistory.cs deleted file mode 100644 index 9b28807..0000000 --- a/Models/DyelotDslvQueueHistory.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotHead.cs b/Models/DyelotHead.cs deleted file mode 100644 index 306f5e4..0000000 --- a/Models/DyelotHead.cs +++ /dev/null @@ -1,65 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/Dyelots.cs b/Models/Dyelots.cs index 985faf0..cb39751 100644 --- a/Models/Dyelots.cs +++ b/Models/Dyelots.cs @@ -17,51 +17,12 @@ namespace Models 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 Nullable OnSchedule { get; set; } - public Nullable DyeStep { get; set; } - public Nullable PowderBlocked { get; set; } - public Nullable PowderOnSchedule { get; set; } - public Nullable PowderStep { get; set; } - public string DispensedVolume { get; set; } - public Nullable Times { get; set; } public string UserAccount { get; set; } - public string FabricName { get; set; } - public string ColorNo { 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 ModifyDT { get; set; } - public Nullable CreateDT { get; set; } } } diff --git a/Models/DyelotsBatch.cs b/Models/DyelotsBatch.cs deleted file mode 100644 index 8a93f75..0000000 --- a/Models/DyelotsBatch.cs +++ /dev/null @@ -1,38 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotsBulkedRecipe.cs b/Models/DyelotsBulkedRecipe.cs index e5c07b1..dd6e446 100644 --- a/Models/DyelotsBulkedRecipe.cs +++ b/Models/DyelotsBulkedRecipe.cs @@ -19,14 +19,11 @@ namespace Models 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; } @@ -35,51 +32,9 @@ namespace Models 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 Flow { get; set; } - public Nullable CallTime { get; set; } - public Nullable BreakGrams { get; set; } - public Nullable RecoveryAction { get; set; } - public Nullable SmallDye { get; set; } - public string PrepareTank { get; set; } - public Nullable DeductBox { get; set; } - public Nullable Shade { get; set; } - public string stuffid { get; set; } - public string tfname { get; set; } - public string tftips { get; set; } - public string program { get; set; } - public Nullable dosage { get; set; } - public string groupid { get; set; } } } diff --git a/Models/DyelotsBulkedRecipeHistory.cs b/Models/DyelotsBulkedRecipeHistory.cs deleted file mode 100644 index f3a5ecc..0000000 --- a/Models/DyelotsBulkedRecipeHistory.cs +++ /dev/null @@ -1,68 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotsBulkedRecipeProvider.cs b/Models/DyelotsBulkedRecipeProvider.cs index 34d1b7b..547bf6c 100644 --- a/Models/DyelotsBulkedRecipeProvider.cs +++ b/Models/DyelotsBulkedRecipeProvider.cs @@ -31,9 +31,23 @@ namespace Models return db.DyelotsBulkedRecipe.SqlQuery(sqlselect).ToList(); } - public List Select()//查询前300条 + public List SelectCode(DyelotsBulkedRecipe t)//以单号查询消耗 { - return db.DyelotsBulkedRecipe.SqlQuery("select TOP (300) * from DyelotsBulkedRecipe").ToList();//查询前300条 + string sqlselect = "select * from DyelotsBulkedRecipe Where ProductCode = " + "'" + t.ProductCode.ToString() + + "' and Created > '" + t.DispenseStartTime + "' and Created < '" + t.DispenseEndTime + "'"; + return db.DyelotsBulkedRecipe.SqlQuery(sqlselect).ToList(); + } + + public List SelectMachineSUM(DyelotsBulkedRecipe t)//以机台查询消耗 + { + string sqlselect = "SELECT * FROM [BatchDyeingCentral].[dbo].[DyelotsBulkedRecipe] where Dyelot in (SELECT dyelot FROM [BatchDyeingCentral].[dbo].[Dyelots] where Machine = '" + + t.Dispenser.ToString() + "') and Created > '" + t.DispenseStartTime.ToString() + "' and Created < '" + t.DispenseEndTime.ToString() +"' and ProductCode = '" + t.ProductCode.ToString() + "'"; + return db.DyelotsBulkedRecipe.SqlQuery(sqlselect).ToList(); + } + + public List Select()//查询前500条 + { + return db.DyelotsBulkedRecipe.SqlQuery("select TOP (500) * from DyelotsBulkedRecipe").ToList();//查询前500条 } public int Update(DyelotsBulkedRecipe t) { diff --git a/Models/DyelotsHistory.cs b/Models/DyelotsHistory.cs deleted file mode 100644 index 78aa62f..0000000 --- a/Models/DyelotsHistory.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotsInAuto.cs b/Models/DyelotsInAuto.cs deleted file mode 100644 index 6d8f4be..0000000 --- a/Models/DyelotsInAuto.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotsInAutoHistory.cs b/Models/DyelotsInAutoHistory.cs deleted file mode 100644 index a6e412f..0000000 --- a/Models/DyelotsInAutoHistory.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/DyelotsProvider.cs b/Models/DyelotsProvider.cs index 1992bc0..eeebb7e 100644 --- a/Models/DyelotsProvider.cs +++ b/Models/DyelotsProvider.cs @@ -32,7 +32,7 @@ namespace Models public List Select() { - string sqlselect= "select TOP (300) * from Dyelots Where CreationTime > '" + DateTime.Now.ToString("yyyy-MM-dd") + "'"; + string sqlselect= "select * from Dyelots Where CreationTime > '" + DateTime.Now.ToString("yyyy-MM-dd") + "'"; return db.Dyelots.SqlQuery(sqlselect).ToList(); } @@ -55,6 +55,7 @@ namespace Models + "' and CreationTime > '" + t.StartTime.ToString() + "' and Machine = '" + t.Machine.ToString() + "'"; return db.Dyelots.SqlQuery(sqlselect).ToList(); } + public int Update(Dyelots t) { throw new NotImplementedException(); diff --git a/Models/EventList.cs b/Models/EventList.cs deleted file mode 100644 index c16e6a4..0000000 --- a/Models/EventList.cs +++ /dev/null @@ -1,23 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/LA571Tanks.cs b/Models/LA571Tanks.cs deleted file mode 100644 index 7069018..0000000 --- a/Models/LA571Tanks.cs +++ /dev/null @@ -1,23 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/LabDyeDslvQueue.cs b/Models/LabDyeDslvQueue.cs deleted file mode 100644 index c5bac6b..0000000 --- a/Models/LabDyeDslvQueue.cs +++ /dev/null @@ -1,27 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/LabDyeDslvQueueHistory.cs b/Models/LabDyeDslvQueueHistory.cs deleted file mode 100644 index c974e48..0000000 --- a/Models/LabDyeDslvQueueHistory.cs +++ /dev/null @@ -1,27 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/MachineState.cs b/Models/MachineState.cs deleted file mode 100644 index 5d43a0f..0000000 --- a/Models/MachineState.cs +++ /dev/null @@ -1,41 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/MachineStateHistory.cs b/Models/MachineStateHistory.cs deleted file mode 100644 index 2aa5f5a..0000000 --- a/Models/MachineStateHistory.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/Machines.cs b/Models/Machines.cs index ea78431..cd5dd3f 100644 --- a/Models/Machines.cs +++ b/Models/Machines.cs @@ -78,11 +78,5 @@ namespace Models 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 OnDevice { get; set; } - public string PwdDispenseDyelot { get; set; } - public Nullable PwdDispenseReDye { get; set; } } } diff --git a/Models/MachinesHistory.cs b/Models/MachinesHistory.cs deleted file mode 100644 index 4f601b8..0000000 --- a/Models/MachinesHistory.cs +++ /dev/null @@ -1,50 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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 string CheDispenseDyelot { get; set; } - public Nullable CheDispenseReDye { get; set; } - public string PwdDispenseDyelot { get; set; } - public Nullable PwdDispenseReDye { get; set; } - public Nullable Updated { get; set; } - } -} diff --git a/Models/MachinesHistoryOld.cs b/Models/MachinesHistoryOld.cs deleted file mode 100644 index 2cf3521..0000000 --- a/Models/MachinesHistoryOld.cs +++ /dev/null @@ -1,46 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class MachinesHistoryOld - { - 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/Models/MachinesProvider.cs b/Models/MachinesProvider.cs index 543d20f..6f361a4 100644 --- a/Models/MachinesProvider.cs +++ b/Models/MachinesProvider.cs @@ -12,26 +12,114 @@ namespace Models public int Delete(Machines t) { - throw new NotImplementedException(); + if (t == null) return 0; + var model = db.Machines.ToList().FirstOrDefault(item => t.Name == item.Name.Trim()); + if (model == null) return 0; + db.Machines.Remove(model); + int count = db.SaveChanges(); + return count; } public int Insert(Machines t) { - throw new NotImplementedException(); + if (t == null) return 0; + if (String.IsNullOrEmpty(t.Name)) return 0; + db.Machines.Add(t); + int count = db.SaveChanges(); + return count; } public List Select() { - throw new NotImplementedException(); + return db.Machines.SqlQuery("select * from Machines").ToList();//查询机台 } public List Selectsql(Machines t) { - throw new NotImplementedException(); + string sqlselect = "select * from Machines Where Name = " + "'" + t.Name.ToString() + "'"; + return db.Machines.SqlQuery(sqlselect).ToList(); } - public int Update(Machines t) + public int Update(Machines t)//更新信息 { - throw new NotImplementedException(); + if (t == null) return 0; + var model = db.Machines.ToList().FirstOrDefault(item => item.Name.Trim() == t.Name); + if (model == null) return 0; + model.DispenseDyelot = t.DispenseDyelot; + model.DyeDispenseDyelot = t.DyeDispenseDyelot; + model.ChemicalStation = t.ChemicalStation; + model.DyeStation = t.DyeStation; + model.PowderStation = t.PowderStation; + model.ChemicalDispenser = t.ChemicalDispenser; + model.DyeDispenser = t.DyeDispenser; + model.PowderDispenser = t.PowderDispenser; + model.ChemicalCallOff = t.ChemicalCallOff; + model.ChemicalCallOff2 = t.ChemicalCallOff2; + model.ChemicalState = t.ChemicalState; + model.ChemicalState2 = t.ChemicalState2; + model.DyeCallOff = t.DyeCallOff; + model.DyeState = t.DyeState; + model.PowderCallOff = t.PowderCallOff; + model.PowderState = t.PowderState; + model.ChemicalEnabled = t.ChemicalEnabled; + model.DyeEnabled = t.DyeEnabled; + model.PowderEnabled = t.PowderEnabled; + int count = db.SaveChanges(); + return count; + } + + public int Update1(Machines t) + { + if (t == null) return 0; + var model = db.Machines.ToList().FirstOrDefault(item => item.Name.Trim() == t.Name); + if (model == null) return 0; + model.DispenseDyelot = t.DispenseDyelot; + model.DyeDispenseDyelot = t.DyeDispenseDyelot; + model.ChemicalStation = t.ChemicalStation; + model.ChemicalCallOff = t.ChemicalCallOff; + model.ChemicalCallOff2 = t.ChemicalCallOff2; + model.ChemicalState = t.ChemicalState; + model.ChemicalState2 = t.ChemicalState2; + model.DyeCallOff = t.DyeCallOff; + model.DyeState = t.DyeState; + model.PowderCallOff = t.PowderCallOff; + model.PowderState = t.PowderState; + int count = db.SaveChanges(); + return count; + } + + public int Update2(Machines t) + { + if (t == null) return 0; + var model = db.Machines.ToList().FirstOrDefault(item => item.Name.Trim() == t.Name); + if (model == null) return 0; + model.ChemicalCallOff = t.ChemicalCallOff; + model.ChemicalCallOff2 = t.ChemicalCallOff2; + model.ChemicalState = t.ChemicalState; + model.ChemicalState2 = t.ChemicalState2; + int count = db.SaveChanges(); + return count; + } + + public int Update3(Machines t) + { + if (t == null) return 0; + var model = db.Machines.ToList().FirstOrDefault(item => item.Name.Trim() == t.Name); + if (model == null) return 0; + model.DyeCallOff = t.DyeCallOff; + model.DyeState = t.DyeState; + int count = db.SaveChanges(); + return count; + } + + public int Update4(Machines t) + { + if (t == null) return 0; + var model = db.Machines.ToList().FirstOrDefault(item => item.Name.Trim() == t.Name); + if (model == null) return 0; + model.PowderCallOff = t.PowderCallOff; + model.PowderState = t.PowderState; + int count = db.SaveChanges(); + return count; } } } diff --git a/Models/ManualWeightQueue.cs b/Models/ManualWeightQueue.cs deleted file mode 100644 index e33da63..0000000 --- a/Models/ManualWeightQueue.cs +++ /dev/null @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/ManualWeightQueueHistory.cs b/Models/ManualWeightQueueHistory.cs deleted file mode 100644 index e6ad04d..0000000 --- a/Models/ManualWeightQueueHistory.cs +++ /dev/null @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/Models.csproj b/Models/Models.csproj index bae1196..648db0f 100644 --- a/Models/Models.csproj +++ b/Models/Models.csproj @@ -86,198 +86,28 @@ - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - SQL_BD.tt - - SQL_BD.tt - SQL_BD.tt - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - SQL_BD.tt - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - SQL_BD.tt + SQL_Ti.tt - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - - - SQL_BD.tt - True True @@ -308,9 +138,6 @@ True SQL_Ti.edmx - - SQL_BD.tt - SQL_Ti.tt @@ -322,10 +149,6 @@ - - EntityModelCodeGenerator - SQL_Ti.Designer.cs - EntityModelCodeGenerator SQL_BD.Designer.cs @@ -333,6 +156,10 @@ SQL_BD.edmx + + EntityModelCodeGenerator + SQL_Ti.Designer.cs + SQL_Ti.edmx diff --git a/Models/PartsStatus.cs b/Models/PartsStatus.cs deleted file mode 100644 index b800173..0000000 --- a/Models/PartsStatus.cs +++ /dev/null @@ -1,33 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class PartsStatus - { - public string CUST_CODE { get; set; } - public string Dispenser { get; set; } - public string Device { 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/Models/PartsStatusHistory.cs b/Models/PartsStatusHistory.cs deleted file mode 100644 index 1eff9d8..0000000 --- a/Models/PartsStatusHistory.cs +++ /dev/null @@ -1,33 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class PartsStatusHistory - { - public string CUST_CODE { get; set; } - public string Dispenser { get; set; } - public string Device { 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/Models/PipeRefill.cs b/Models/PipeRefill.cs deleted file mode 100644 index 8569eba..0000000 --- a/Models/PipeRefill.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class PipeRefill - { - public string ProductCode { get; set; } - public string ProductName { get; set; } - public Nullable ProductType { get; set; } - public string ProductLot { get; set; } - public string Dispenser { get; set; } - public Nullable No { get; set; } - public Nullable Qty { get; set; } - public Nullable Percentage { get; set; } - public Nullable RefillTime { get; set; } - public Nullable AlarmTime { get; set; } - public Nullable Updated { get; set; } - } -} diff --git a/Models/PipeRefillHistory.cs b/Models/PipeRefillHistory.cs deleted file mode 100644 index 132d4a5..0000000 --- a/Models/PipeRefillHistory.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class PipeRefillHistory - { - public string ProductCode { get; set; } - public string ProductName { get; set; } - public Nullable ProductType { get; set; } - public string ProductLot { get; set; } - public string Dispenser { get; set; } - public Nullable No { get; set; } - public Nullable Qty { get; set; } - public Nullable Percentage { get; set; } - public Nullable RefillTime { get; set; } - public Nullable AlarmTime { get; set; } - public Nullable Created { get; set; } - } -} diff --git a/Models/Pipes.cs b/Models/Pipes.cs index 03956fb..8859b54 100644 --- a/Models/Pipes.cs +++ b/Models/Pipes.cs @@ -16,8 +16,6 @@ namespace Models { public string ProductCode { get; set; } public string ProductName { get; set; } - public Nullable ProductType { get; set; } - public string ProductLot { get; set; } public string Dispenser { get; set; } public Nullable Enabled { get; set; } public Nullable No { get; set; } diff --git a/Models/PipesProvider.cs b/Models/PipesProvider.cs new file mode 100644 index 0000000..2ee5659 --- /dev/null +++ b/Models/PipesProvider.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Models +{ + public class PipesProvider : IProvider + { + private readonly BatchDyeingCentralEntities db = new BatchDyeingCentralEntities(); + + public int Delete(Pipes t) + { + if (t == null) return 0; + var model = db.Pipes.ToList().FirstOrDefault(item => t.ProductCode == item.ProductCode); + if (model == null) return 0; + db.Pipes.Remove(model); + int count = db.SaveChanges(); + return count; + } + + public int Insert(Pipes t) + { + if (t == null) return 0; + if (String.IsNullOrEmpty(t.ProductCode)) return 0; + db.Pipes.Add(t); + int count = db.SaveChanges(); + return count; + } + + public List Select() + { + string sqlselect = "select * from Pipes "; + return db.Pipes.SqlQuery(sqlselect).ToList(); + } + + public List Selectsql(Pipes t) + { + throw new NotImplementedException(); + } + + public int Update(Pipes t) + { + throw new NotImplementedException(); + } + + } +} diff --git a/Models/Product.cs b/Models/Product.cs index 89c7c77..5ee4662 100644 --- a/Models/Product.cs +++ b/Models/Product.cs @@ -16,63 +16,29 @@ namespace Models { 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 Nullable Color { get; set; } public string ProductLot { get; set; } + public Nullable FullWeight { get; set; } + public Nullable ProductUnit { get; set; } + public Nullable SafetyStock { get; set; } + public Nullable Price { get; set; } + public Nullable CurrentStock { get; set; } + public Nullable Deduct { 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 LampPosition { get; set; } + public string TablePosition { get; set; } + public string Area { get; set; } public Nullable Concentration { get; set; } + public string Batch_NO { 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/Models/ProductLocation.cs b/Models/ProductLocation.cs deleted file mode 100644 index 2ab6fe3..0000000 --- a/Models/ProductLocation.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class ProductLocation - { - public string ProductCode { get; set; } - public string ProductName { get; set; } - public string Type { get; set; } - public string Dispenser { get; set; } - public Nullable Position { get; set; } - public string TablePosition { get; set; } - public Nullable StockDate { get; set; } - public Nullable StockUsage { get; set; } - public Nullable StockOnHand { get; set; } - public string Alarm { get; set; } - public Nullable AlarmTime { get; set; } - public Nullable Enabled { get; set; } - } -} diff --git a/Models/ProductLocationHistory.cs b/Models/ProductLocationHistory.cs deleted file mode 100644 index f2136bc..0000000 --- a/Models/ProductLocationHistory.cs +++ /dev/null @@ -1,31 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class ProductLocationHistory - { - public string ProductCode { get; set; } - public string ProductName { get; set; } - public string Type { get; set; } - public string Dispenser { get; set; } - public Nullable Position { get; set; } - public string TablePosition { get; set; } - public Nullable StockDate { get; set; } - public Nullable StockUsage { get; set; } - public Nullable StockOnHand { get; set; } - public string Alarm { get; set; } - public Nullable AlarmTime { get; set; } - public Nullable Enabled { get; set; } - public Nullable Updated { get; set; } - } -} diff --git a/Models/ProductProvider.cs b/Models/ProductProvider.cs index 8665b59..4542460 100644 --- a/Models/ProductProvider.cs +++ b/Models/ProductProvider.cs @@ -12,7 +12,7 @@ namespace Models public int Delete(Product t)//删除 { if (t == null) return 0; - var model = db.Product.ToList().FirstOrDefault(item => t.ProductCode == item.ProductCode); + var model = db.Product.ToList().FirstOrDefault(item => t.ProductCode == item.ProductCode.Trim()); if (model == null) return 0; db.Product.Remove(model); int count = db.SaveChanges(); @@ -24,12 +24,13 @@ namespace Models if (t == null) return 0; if (String.IsNullOrEmpty(t.ProductCode)) return 0; db.Product.Add(t); - int counti = db.SaveChanges(); - return counti; + int count = db.SaveChanges(); + return count; } public List Select() { + //var c = db.Product.SqlQuery("select * from Product").ToList(); return db.Product.SqlQuery("select * from Product").ToList();//查询 } @@ -47,13 +48,30 @@ namespace Models return db.Product.SqlQuery("select * from Product where ProductType = 2").ToList();//类型2查询 } + public List Selects3() + { + return db.Product.SqlQuery("select * from Product where ProductType = 3").ToList();//类型2查询 + } + public List Selectsql(Product t) { - throw new NotImplementedException(); + string sqlselect = "select * from Product Where ProductCode = " + "'" + t.ProductCode.ToString() + "'"; + return db.Product.SqlQuery(sqlselect).ToList(); } public int Update(Product t) { - throw new NotImplementedException(); + if (t == null) return 0; + var model = db.Product.ToList().FirstOrDefault(item => item.ProductCode.Trim() == t.ProductCode); + if (model == null) return 0; + model.Color = t.Color; + model.Price = t.Price; + model.SUPPLIER = t.SUPPLIER; + model.ProductName = t.ProductName; + model.GRAVITY = t.GRAVITY; + model.Concentration = t.Concentration; + model.ProductType = t.ProductType; + int count = db.SaveChanges(); + return count; } } } diff --git a/Models/RFIDRecordQueue.cs b/Models/RFIDRecordQueue.cs deleted file mode 100644 index 0614fbb..0000000 --- a/Models/RFIDRecordQueue.cs +++ /dev/null @@ -1,32 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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 string Source { get; set; } - public string Dest { get; set; } - public string ProductCode { get; set; } - public Nullable Updated { get; set; } - } -} diff --git a/Models/RFIDRecordQueueHistory.cs b/Models/RFIDRecordQueueHistory.cs deleted file mode 100644 index 1bc3460..0000000 --- a/Models/RFIDRecordQueueHistory.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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 string ProductCode { get; set; } - public Nullable Created { get; set; } - } -} diff --git a/Models/RecipeDeduct.cs b/Models/RecipeDeduct.cs deleted file mode 100644 index e02ae03..0000000 --- a/Models/RecipeDeduct.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/RecipeDeductHistory.cs b/Models/RecipeDeductHistory.cs deleted file mode 100644 index 5c8b0e3..0000000 --- a/Models/RecipeDeductHistory.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/RecipeDetail.cs b/Models/RecipeDetail.cs deleted file mode 100644 index ab33476..0000000 --- a/Models/RecipeDetail.cs +++ /dev/null @@ -1,24 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class RecipeDetail - { - public string RcpCode { get; set; } - public string ProductCode { get; set; } - public string ProductName { get; set; } - public Nullable Conc { get; set; } - public Nullable HostRead { get; set; } - public Nullable Created { get; set; } - } -} diff --git a/Models/Recipes.cs b/Models/Recipes.cs deleted file mode 100644 index 8abf68b..0000000 --- a/Models/Recipes.cs +++ /dev/null @@ -1,22 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class Recipes - { - public string RcpCode { get; set; } - public string RcpName { get; set; } - public string Unit { get; set; } - public Nullable Created { get; set; } - } -} diff --git a/Models/SQL_BD.Context.cs b/Models/SQL_BD.Context.cs index 98162d8..732bd41 100644 --- a/Models/SQL_BD.Context.cs +++ b/Models/SQL_BD.Context.cs @@ -25,67 +25,9 @@ namespace Models throw new UnintentionalCodeFirstException(); } - public virtual DbSet DBRDetail { get; set; } - public virtual DbSet DyelotHead { get; set; } public virtual DbSet Dyelots { get; set; } public virtual DbSet DyelotsBulkedRecipe { get; set; } public virtual DbSet Machines { get; set; } - public virtual DbSet MachineState { get; set; } - public virtual DbSet SchedulingLog { get; set; } - public virtual DbSet AuxDslvQueue { get; set; } - public virtual DbSet AuxDslvQueueHistory { get; set; } - public virtual DbSet BucketCrane { get; set; } - public virtual DbSet BucketCraneHistory { 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 DissolveArt { get; set; } - public virtual DbSet DissolveArtHistory { 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 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 MachinesHistoryOld { 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 PipeRefill { get; set; } - public virtual DbSet PipeRefillHistory { get; set; } public virtual DbSet Pipes { get; set; } - public virtual DbSet ProductLocation { get; set; } - public virtual DbSet ProductLocationHistory { get; set; } - public virtual DbSet RecipeDeduct { get; set; } - public virtual DbSet RecipeDeductHistory { get; set; } - public virtual DbSet RecipeDetail { get; set; } - public virtual DbSet Recipes { 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 ScheduledDyelot { get; set; } - public virtual DbSet ScheduledDyelotHistory { get; set; } - public virtual DbSet Shelf { get; set; } - public virtual DbSet TagShelf { get; set; } } } diff --git a/Models/SQL_BD.edmx b/Models/SQL_BD.edmx index cb392cd..afc308a 100644 --- a/Models/SQL_BD.edmx +++ b/Models/SQL_BD.edmx @@ -4,5241 +4,531 @@ - - - - - - - - - - - - - - - - - - - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + - - - + + + + + + + + + - - + - - + - - + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - + + - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - +警告 6002: 表/视图“BatchDyeingCentral.dbo.Pipes”未定义主键。已推断出该键,并将定义创建为只读的表/视图。--> + - - - + + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - + + + + + + SELECT + [Pipes].[ProductCode] AS [ProductCode], + [Pipes].[ProductName] AS [ProductName], + [Pipes].[ProductType] AS [ProductType], + [Pipes].[ProductLot] AS [ProductLot], + [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 - [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 - [BucketCrane].[Dyelot] AS [Dyelot], - [BucketCrane].[ReDye] AS [ReDye], - [BucketCrane].[StepNumber] AS [StepNumber], - [BucketCrane].[DevideNo] AS [DevideNo], - [BucketCrane].[BucketNo] AS [BucketNo], - [BucketCrane].[DID] AS [DID], - [BucketCrane].[State] AS [State], - [BucketCrane].[Updated] AS [Updated] - FROM [dbo].[BucketCrane] AS [BucketCrane] - - - SELECT - [BucketCraneHistory].[Dyelot] AS [Dyelot], - [BucketCraneHistory].[ReDye] AS [ReDye], - [BucketCraneHistory].[StepNumber] AS [StepNumber], - [BucketCraneHistory].[DevideNo] AS [DevideNo], - [BucketCraneHistory].[BucketNo] AS [BucketNo], - [BucketCraneHistory].[DID] AS [DID], - [BucketCraneHistory].[State] AS [State], - [BucketCraneHistory].[Created] AS [Created] - FROM [dbo].[BucketCraneHistory] AS [BucketCraneHistory] - - - 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], - [BucketShelf].[Locked] AS [Locked], - [BucketShelf].[ProductCode] AS [ProductCode], - [BucketShelf].[OriginDyelot] AS [OriginDyelot] - 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], - [BucketShelfHistory].[Locked] AS [Locked], - [BucketShelfHistory].[ProductCode] AS [ProductCode], - [BucketShelfHistory].[OriginDyelot] AS [OriginDyelot] - 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].[Device] AS [Device], - [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].[Device] AS [Device], - [DispenserLifeStatus].[HeartBeat] AS [HeartBeat], - [DispenserLifeStatus].[LifeTime] AS [LifeTime], - [DispenserLifeStatus].[UpdateDate] AS [UpdateDate], - [DispenserLifeStatus].[Created] AS [Created] - 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].[Action] AS [Action], - [Dispensers].[ProductCode] AS [ProductCode], - [Dispensers].[SN] AS [SN], - [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].[Device] AS [Device], - [DispenserUtilization].[Dyelot] AS [Dyelot], - [DispenserUtilization].[ReDye] AS [ReDye], - [DispenserUtilization].[StepNumber] AS [StepNumber], - [DispenserUtilization].[UtilStartDate] AS [UtilStartDate], - [DispenserUtilization].[UtilEndDate] AS [UtilEndDate], - [DispenserUtilization].[UtilTimes] AS [UtilTimes], - [DispenserUtilization].[UserAccount] AS [UserAccount] - FROM [dbo].[DispenserUtilization] AS [DispenserUtilization] - - - SELECT - [DissolveArt].[Name] AS [Name], - [DissolveArt].[ProductClass] AS [ProductClass], - [DissolveArt].[LiquidRatio] AS [LiquidRatio], - [DissolveArt].[MinWeight] AS [MinWeight], - [DissolveArt].[MaxWeight] AS [MaxWeight], - [DissolveArt].[DissolveTemperature] AS [DissolveTemperature], - [DissolveArt].[UseLiquidDye] AS [UseLiquidDye], - [DissolveArt].[UseChemical] AS [UseChemical], - [DissolveArt].[Process] AS [Process], - [DissolveArt].[TankSize] AS [TankSize], - [DissolveArt].[Created] AS [Created] - FROM [dbo].[DissolveArt] AS [DissolveArt] - - - SELECT - [DissolveArtHistory].[Name] AS [Name], - [DissolveArtHistory].[ProductClass] AS [ProductClass], - [DissolveArtHistory].[LiquidRatio] AS [LiquidRatio], - [DissolveArtHistory].[MinWeight] AS [MinWeight], - [DissolveArtHistory].[MaxWeight] AS [MaxWeight], - [DissolveArtHistory].[DissolveTemperature] AS [DissolveTemperature], - [DissolveArtHistory].[UseLiquidDye] AS [UseLiquidDye], - [DissolveArtHistory].[UseChemical] AS [UseChemical], - [DissolveArtHistory].[Process] AS [Process], - [DissolveArtHistory].[TankSize] AS [TankSize], - [DissolveArtHistory].[Updated] AS [Updated] - FROM [dbo].[DissolveArtHistory] AS [DissolveArtHistory] - - - 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 - [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].[CheDispenseDyelot] AS [CheDispenseDyelot], - [MachinesHistory].[CheDispenseReDye] AS [CheDispenseReDye], - [MachinesHistory].[PwdDispenseDyelot] AS [PwdDispenseDyelot], - [MachinesHistory].[PwdDispenseReDye] AS [PwdDispenseReDye], - [MachinesHistory].[Updated] AS [Updated] - FROM [dbo].[MachinesHistory] AS [MachinesHistory] - - - SELECT - [MachinesHistoryOld].[Machine] AS [Machine], - [MachinesHistoryOld].[DispenseDyelot] AS [DispenseDyelot], - [MachinesHistoryOld].[DispenseReDye] AS [DispenseReDye], - [MachinesHistoryOld].[ChemicalCallOff] AS [ChemicalCallOff], - [MachinesHistoryOld].[ChemicalState] AS [ChemicalState], - [MachinesHistoryOld].[ChemicalTank] AS [ChemicalTank], - [MachinesHistoryOld].[ChemicalTankSize] AS [ChemicalTankSize], - [MachinesHistoryOld].[ChemicalDispenser] AS [ChemicalDispenser], - [MachinesHistoryOld].[ChemicalError] AS [ChemicalError], - [MachinesHistoryOld].[ChemicalCallOff2] AS [ChemicalCallOff2], - [MachinesHistoryOld].[ChemicalState2] AS [ChemicalState2], - [MachinesHistoryOld].[ChemicalTank2] AS [ChemicalTank2], - [MachinesHistoryOld].[DyeCallOff] AS [DyeCallOff], - [MachinesHistoryOld].[DyeState] AS [DyeState], - [MachinesHistoryOld].[DyeTank] AS [DyeTank], - [MachinesHistoryOld].[DyeTankSize] AS [DyeTankSize], - [MachinesHistoryOld].[DyeDispenser] AS [DyeDispenser], - [MachinesHistoryOld].[DyeError] AS [DyeError], - [MachinesHistoryOld].[PowderCallOff] AS [PowderCallOff], - [MachinesHistoryOld].[PowderState] AS [PowderState], - [MachinesHistoryOld].[PowderTank] AS [PowderTank], - [MachinesHistoryOld].[PowderTankSize] AS [PowderTankSize], - [MachinesHistoryOld].[PowderDispenser] AS [PowderDispenser], - [MachinesHistoryOld].[PowderError] AS [PowderError], - [MachinesHistoryOld].[HostRead] AS [HostRead], - [MachinesHistoryOld].[DyeDispenseDyelot] AS [DyeDispenseDyelot], - [MachinesHistoryOld].[DyeDispenseReDye] AS [DyeDispenseReDye], - [MachinesHistoryOld].[Updated] AS [Updated] - FROM [dbo].[MachinesHistoryOld] AS [MachinesHistoryOld] - - - 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].[Device] AS [Device], - [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].[Device] AS [Device], - [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 - [PipeRefill].[ProductCode] AS [ProductCode], - [PipeRefill].[ProductName] AS [ProductName], - [PipeRefill].[ProductType] AS [ProductType], - [PipeRefill].[ProductLot] AS [ProductLot], - [PipeRefill].[Dispenser] AS [Dispenser], - [PipeRefill].[No] AS [No], - [PipeRefill].[Qty] AS [Qty], - [PipeRefill].[Percentage] AS [Percentage], - [PipeRefill].[RefillTime] AS [RefillTime], - [PipeRefill].[AlarmTime] AS [AlarmTime], - [PipeRefill].[Updated] AS [Updated] - FROM [dbo].[PipeRefill] AS [PipeRefill] - - - SELECT - [PipeRefillHistory].[ProductCode] AS [ProductCode], - [PipeRefillHistory].[ProductName] AS [ProductName], - [PipeRefillHistory].[ProductType] AS [ProductType], - [PipeRefillHistory].[ProductLot] AS [ProductLot], - [PipeRefillHistory].[Dispenser] AS [Dispenser], - [PipeRefillHistory].[No] AS [No], - [PipeRefillHistory].[Qty] AS [Qty], - [PipeRefillHistory].[Percentage] AS [Percentage], - [PipeRefillHistory].[RefillTime] AS [RefillTime], - [PipeRefillHistory].[AlarmTime] AS [AlarmTime], - [PipeRefillHistory].[Created] AS [Created] - FROM [dbo].[PipeRefillHistory] AS [PipeRefillHistory] - - - SELECT - [Pipes].[ProductCode] AS [ProductCode], - [Pipes].[ProductName] AS [ProductName], - [Pipes].[ProductType] AS [ProductType], - [Pipes].[ProductLot] AS [ProductLot], - [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 - [ProductLocation].[ProductCode] AS [ProductCode], - [ProductLocation].[ProductName] AS [ProductName], - [ProductLocation].[Type] AS [Type], - [ProductLocation].[Dispenser] AS [Dispenser], - [ProductLocation].[Position] AS [Position], - [ProductLocation].[TablePosition] AS [TablePosition], - [ProductLocation].[StockDate] AS [StockDate], - [ProductLocation].[StockUsage] AS [StockUsage], - [ProductLocation].[StockOnHand] AS [StockOnHand], - [ProductLocation].[Alarm] AS [Alarm], - [ProductLocation].[AlarmTime] AS [AlarmTime], - [ProductLocation].[Enabled] AS [Enabled] - FROM [dbo].[ProductLocation] AS [ProductLocation] - - - SELECT - [ProductLocationHistory].[ProductCode] AS [ProductCode], - [ProductLocationHistory].[ProductName] AS [ProductName], - [ProductLocationHistory].[Type] AS [Type], - [ProductLocationHistory].[Dispenser] AS [Dispenser], - [ProductLocationHistory].[Position] AS [Position], - [ProductLocationHistory].[TablePosition] AS [TablePosition], - [ProductLocationHistory].[StockDate] AS [StockDate], - [ProductLocationHistory].[StockUsage] AS [StockUsage], - [ProductLocationHistory].[StockOnHand] AS [StockOnHand], - [ProductLocationHistory].[Alarm] AS [Alarm], - [ProductLocationHistory].[AlarmTime] AS [AlarmTime], - [ProductLocationHistory].[Enabled] AS [Enabled], - [ProductLocationHistory].[Updated] AS [Updated] - FROM [dbo].[ProductLocationHistory] AS [ProductLocationHistory] - - - 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 - [RecipeDetail].[RcpCode] AS [RcpCode], - [RecipeDetail].[ProductCode] AS [ProductCode], - [RecipeDetail].[ProductName] AS [ProductName], - [RecipeDetail].[Conc] AS [Conc], - [RecipeDetail].[HostRead] AS [HostRead], - [RecipeDetail].[Created] AS [Created] - FROM [dbo].[RecipeDetail] AS [RecipeDetail] - - - SELECT - [Recipes].[RcpCode] AS [RcpCode], - [Recipes].[RcpName] AS [RcpName], - [Recipes].[Unit] AS [Unit], - [Recipes].[Created] AS [Created] - FROM [dbo].[Recipes] AS [Recipes] - - - 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].[Source] AS [Source], - [RFIDRecordQueue].[Dest] AS [Dest], - [RFIDRecordQueue].[ProductCode] AS [ProductCode], - [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].[ProductCode] AS [ProductCode], - [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 - [ScheduledDyelot].[ID] AS [ID], - [ScheduledDyelot].[Dyelot] AS [Dyelot], - [ScheduledDyelot].[ReDye] AS [ReDye], - [ScheduledDyelot].[StepNumber] AS [StepNumber], - [ScheduledDyelot].[Process] AS [Process], - [ScheduledDyelot].[Dispenser] AS [Dispenser], - [ScheduledDyelot].[Machine] AS [Machine], - [ScheduledDyelot].[TankNo] AS [TankNo], - [ScheduledDyelot].[ScheduledTime] AS [ScheduledTime], - [ScheduledDyelot].[Checked] AS [Checked], - [ScheduledDyelot].[UserAccount] AS [UserAccount] - FROM [dbo].[ScheduledDyelot] AS [ScheduledDyelot] - - - SELECT - [ScheduledDyelotHistory].[ID] AS [ID], - [ScheduledDyelotHistory].[Dyelot] AS [Dyelot], - [ScheduledDyelotHistory].[ReDye] AS [ReDye], - [ScheduledDyelotHistory].[StepNumber] AS [StepNumber], - [ScheduledDyelotHistory].[Process] AS [Process], - [ScheduledDyelotHistory].[Dispenser] AS [Dispenser], - [ScheduledDyelotHistory].[Machine] AS [Machine], - [ScheduledDyelotHistory].[TankNo] AS [TankNo], - [ScheduledDyelotHistory].[ScheduledTime] AS [ScheduledTime], - [ScheduledDyelotHistory].[Checked] AS [Checked], - [ScheduledDyelotHistory].[UserAccount] AS [UserAccount], - [ScheduledDyelotHistory].[Updated] AS [Updated] - FROM [dbo].[ScheduledDyelotHistory] AS [ScheduledDyelotHistory] - - - 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] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - + + + - + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Models/SQL_BD.edmx.diagram b/Models/SQL_BD.edmx.diagram index 4496477..90ec6c9 100644 --- a/Models/SQL_BD.edmx.diagram +++ b/Models/SQL_BD.edmx.diagram @@ -4,69 +4,11 @@ - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/Models/SQL_Ti.Context.cs b/Models/SQL_Ti.Context.cs index 61ba939..d112a38 100644 --- a/Models/SQL_Ti.Context.cs +++ b/Models/SQL_Ti.Context.cs @@ -25,7 +25,7 @@ namespace Models throw new UnintentionalCodeFirstException(); } - public virtual DbSet Product { get; set; } public virtual DbSet UserAccount { get; set; } + public virtual DbSet Product { get; set; } } } diff --git a/Models/SQL_Ti.Designer.cs b/Models/SQL_Ti.Designer.cs index 8c0b759..01f3864 100644 --- a/Models/SQL_Ti.Designer.cs +++ b/Models/SQL_Ti.Designer.cs @@ -1,4 +1,4 @@ -// 为模型“C:\Users\24018\source\repos\Audit_APP\Models\SQL_Ti.edmx”启用了 T4 代码生成。 +// 为模型“C:\Users\尚彩-沈忱\source\repos\Audit_APP\Models\SQL_Ti.edmx”启用了 T4 代码生成。 // 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值 // 更改为“旧的 ObjectContext”。当在设计器中打开该模型时,此属性会出现在 // “属性”窗口中。 diff --git a/Models/SQL_Ti.edmx b/Models/SQL_Ti.edmx index 4778442..1aa2449 100644 --- a/Models/SQL_Ti.edmx +++ b/Models/SQL_Ti.edmx @@ -4,175 +4,38 @@ - - - - - - - + - + - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - + - - - - - - - - - - @@ -188,178 +51,66 @@ - - 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] - + - - + + + + + + + + + + + + + + + + + + - + - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -374,6 +125,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Models/SQL_Ti.edmx.diagram b/Models/SQL_Ti.edmx.diagram index 90363eb..2898f37 100644 --- a/Models/SQL_Ti.edmx.diagram +++ b/Models/SQL_Ti.edmx.diagram @@ -4,9 +4,9 @@ - - - + + + diff --git a/Models/SampleDyeDslvQueue.cs b/Models/SampleDyeDslvQueue.cs deleted file mode 100644 index 55fa023..0000000 --- a/Models/SampleDyeDslvQueue.cs +++ /dev/null @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/SampleDyeDslvQueueHistory.cs b/Models/SampleDyeDslvQueueHistory.cs deleted file mode 100644 index 884a85d..0000000 --- a/Models/SampleDyeDslvQueueHistory.cs +++ /dev/null @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/ScheduledDyelot.cs b/Models/ScheduledDyelot.cs deleted file mode 100644 index 8fa19e3..0000000 --- a/Models/ScheduledDyelot.cs +++ /dev/null @@ -1,29 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class ScheduledDyelot - { - public int ID { get; set; } - public string Dyelot { get; set; } - public int ReDye { get; set; } - public Nullable StepNumber { get; set; } - public string Process { get; set; } - public string Dispenser { get; set; } - public string Machine { get; set; } - public Nullable TankNo { get; set; } - public Nullable ScheduledTime { get; set; } - public string Checked { get; set; } - public string UserAccount { get; set; } - } -} diff --git a/Models/ScheduledDyelotHistory.cs b/Models/ScheduledDyelotHistory.cs deleted file mode 100644 index 60485d4..0000000 --- a/Models/ScheduledDyelotHistory.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - using System; - using System.Collections.Generic; - - public partial class ScheduledDyelotHistory - { - public int ID { get; set; } - public string Dyelot { get; set; } - public int ReDye { get; set; } - public Nullable StepNumber { get; set; } - public string Process { get; set; } - public string Dispenser { get; set; } - public string Machine { get; set; } - public Nullable TankNo { get; set; } - public Nullable ScheduledTime { get; set; } - public string Checked { get; set; } - public string UserAccount { get; set; } - public Nullable Updated { get; set; } - } -} diff --git a/Models/SchedulingLog.cs b/Models/SchedulingLog.cs deleted file mode 100644 index 4d82d8c..0000000 --- a/Models/SchedulingLog.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/Shelf.cs b/Models/Shelf.cs deleted file mode 100644 index faca010..0000000 --- a/Models/Shelf.cs +++ /dev/null @@ -1,21 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/Models/TagShelf.cs b/Models/TagShelf.cs deleted file mode 100644 index f41643f..0000000 --- a/Models/TagShelf.cs +++ /dev/null @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// -//------------------------------------------------------------------------------ - -namespace Models -{ - 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/View/MachinesView.xaml b/View/MachinesView.xaml new file mode 100644 index 0000000..0b6ce76 --- /dev/null +++ b/View/MachinesView.xaml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/View/MachinesView.xaml.cs b/View/MachinesView.xaml.cs new file mode 100644 index 0000000..87e1b1c --- /dev/null +++ b/View/MachinesView.xaml.cs @@ -0,0 +1,246 @@ +using Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +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.View +{ + /// + /// MachinesView.xaml 的交互逻辑 + /// + public partial class MachinesView : UserControl + { + public MachinesView() + { + InitializeComponent(); + } + + private Machines machines = new Machines();//最终存入sql的实体 + private Machines machines_temp = new Machines();//取出自sql的实体缓存 + public static Boolean Button_sql = true; + public static int Buttontype_sql = -1; + + private void DataGridStuff_MouseDoubleClick(object sender, MouseButtonEventArgs e) + { + int rownum = DataGridMachines.SelectedIndex;//获取鼠标选中行并定义变量 + if (rownum != -1)//判断鼠标定位是否有效 + { + string DataGridMachines_Name = (DataGridMachines.Columns[0].GetCellContent(DataGridMachines.Items[rownum]) as TextBlock).Text;//定位第0列, + string DataGridMachines_ChemicalStation = (DataGridMachines.Columns[1].GetCellContent(DataGridMachines.Items[rownum]) as TextBlock).Text;//定位第1列, + string DataGridMachines_ChemicalDispenser = (DataGridMachines.Columns[5].GetCellContent(DataGridMachines.Items[rownum]) as TextBlock).Text;//定位第2列, + string DataGridMachines_Chemicale = (DataGridMachines.Columns[6].GetCellContent(DataGridMachines.Items[rownum]) as TextBlock).Text;//定位第2列, + string DataGridMachines_DyeDispenser = (DataGridMachines.Columns[8].GetCellContent(DataGridMachines.Items[rownum]) as TextBlock).Text;//定位第3列, + string DataGridMachines_Dyee = (DataGridMachines.Columns[9].GetCellContent(DataGridMachines.Items[rownum]) as TextBlock).Text;//定位第3列, + string DataGridMachines_PowderDispenser = (DataGridMachines.Columns[11].GetCellContent(DataGridMachines.Items[rownum]) as TextBlock).Text;//定位第4列, + string DataGridMachines_Powdere = (DataGridMachines.Columns[12].GetCellContent(DataGridMachines.Items[rownum]) as TextBlock).Text;//定位第4列, + name.Text = DataGridMachines_Name.Trim(); + Station.Text = DataGridMachines_ChemicalStation.Trim(); + chemicaldispenser.Text = DataGridMachines_ChemicalDispenser.Trim(); + dyedispenser.Text = DataGridMachines_DyeDispenser.Trim(); + powderdispenser.Text = DataGridMachines_PowderDispenser.Trim(); + if (DataGridMachines_Chemicale == "1") this.chemicaldispenser_operate.Text = "启用"; + else this.chemicaldispenser_operate.Text = "禁用"; + if (DataGridMachines_Dyee == "1") this.dyedispenser_operate.Text = "启用"; + else this.dyedispenser_operate.Text = "禁用"; + if (DataGridMachines_Powdere == "1") this.powderdispenser_operate.Text = "启用"; + else this.powderdispenser_operate.Text = "禁用"; + this.operate.Text =null;//清除附属操作 + machines_temp.Name = DataGridMachines_Name;//写入sql实体缓存 + } + } + + private void Button_Preservation(object sender, RoutedEventArgs e)//存储按钮 + { + int int_operate = 0; + Regex re_char = new Regex(@"^[A-Za-z0-9\s@()()/+!!_-]+$");//校验用正则表达式由数字,26个英文字母,空白字符和@()()/+!!_-组成的字符串 + if (this.operate.Text == "") int_operate = 0;//创建机台 + if (this.operate.Text == "清除工单") int_operate = 1;//附属操作 + if (this.operate.Text == "助剂完成") int_operate = 2; + if (this.operate.Text == "染料完成") int_operate = 3; + if (this.operate.Text == "粉体完成") int_operate = 4; + if (this.operate.Text == "修改信息") int_operate = 5; + if (re_char.IsMatch(this.name.Text) == false) System.Windows.MessageBox.Show("ERR.C0201:无效的机台信息", "错误");//检查机台代码 + else + if (string.IsNullOrEmpty(this.Station.Text)) System.Windows.MessageBox.Show("ERR.C0201-2:无效的机台信息", "错误");//检查机台名称 + else + { + if (int_operate == 0)//创建机台 + { + machines.Name = this.name.Text; + machines.DispenseDyelot = null; + machines.DyeDispenseDyelot = null; + machines.ChemicalStation = this.Station.Text; + machines.DyeStation = this.Station.Text; + machines.PowderStation = this.Station.Text; + machines.ChemicalDispenser = this.chemicaldispenser.Text; + machines.DyeDispenser = this.dyedispenser.Text; + machines.PowderDispenser = this.powderdispenser.Text; + machines.ChemicalCallOff = 0; + machines.ChemicalCallOff2 = 0; + machines.ChemicalState = 101; + machines.ChemicalState2 = 101; + machines.DyeCallOff = 0; + machines.DyeState = 101; + machines.PowderCallOff = 0; + machines.PowderState = 101; + if (this.chemicaldispenser_operate.Text == "启用") machines.ChemicalEnabled = 1; + else machines.ChemicalEnabled = 0; + if (this.dyedispenser_operate.Text == "启用") machines.DyeEnabled = 1; + else machines.DyeEnabled = 0; + if (this.powderdispenser_operate.Text == "启用") machines.PowderEnabled = 1; + else machines.PowderEnabled = 0; + if (new MachinesProvider().Selectsql(machines).Count == 0)//判断数据库设定目标信息是否存在。 + { + var count = new MachinesProvider().Insert(machines);//添加数据库信息 + Button_sql = true; + if (count == 0) MessageBox.Show("ERR.C0210-2:机台创建失败", "错误"); + } + else + { + System.Windows.MessageBox.Show("ERR.C0211:机台已存在终止操作", "错误");//判断执行是否成功 + } + } + + if (int_operate == 1)//清除信息 + { + machines.Name = this.name.Text; + machines.DispenseDyelot = null; + machines.DyeDispenseDyelot = null; + machines.ChemicalCallOff = 0; + machines.ChemicalCallOff2 = 0; + machines.ChemicalState = 101; + machines.ChemicalState2 = 101; + machines.DyeCallOff = 0; + machines.DyeState = 101; + machines.PowderCallOff = 0; + machines.PowderState = 101; + if (new MachinesProvider().Selectsql(machines).Count == 0)//判断数据库设定目标信息是否存在。 + { + System.Windows.MessageBox.Show("ERR.C0202-5:机台信息错误", "错误");//执行是否成功 + } + else + { + var count = new MachinesProvider().Update1(machines);//添加数据库信息。 + Button_sql = true; + if (count == 0) MessageBox.Show("ERR.C0210-2:机台创建失败", "错误"); + } + } + + if (int_operate == 2)//助剂完成 + { + machines.Name = this.name.Text; + machines.ChemicalCallOff = 0; + machines.ChemicalCallOff2 = 0; + machines.ChemicalState = 101; + machines.ChemicalState2 = 101; + if (new MachinesProvider().Selectsql(machines).Count == 0)//判断数据库设定目标信息是否存在。 + { + System.Windows.MessageBox.Show("ERR.C0202-5:机台信息错误", "错误");//执行是否成功 + } + else + { + var count = new MachinesProvider().Update2(machines);//修改数据库信息。 + Button_sql = true; + if (count == 0) System.Windows.MessageBox.Show("ERR.C0210-1:信息修改失败", "错误");//判断执行是否成功 + } + } + + if (int_operate == 3)//染料完成 + { + machines.Name = this.name.Text; + machines.DyeCallOff = 0; + machines.DyeState = 101; + if (new MachinesProvider().Selectsql(machines).Count == 0)//判断数据库设定目标信息是否存在。 + { + System.Windows.MessageBox.Show("ERR.C0202-5:机台信息错误", "错误");//执行是否成功 + } + else + { + var count = new MachinesProvider().Update3(machines);//修改数据库信息。 + Button_sql = true; + if (count == 0) System.Windows.MessageBox.Show("ERR.C0210-1:信息修改失败", "错误");//判断执行是否成功 + } + } + + if (int_operate == 4)//粉体完成 + { + machines.Name = this.name.Text; + machines.PowderCallOff = 0; + machines.PowderState = 101; + if (new MachinesProvider().Selectsql(machines).Count == 0)//判断数据库设定目标信息是否存在。 + { + System.Windows.MessageBox.Show("ERR.C0202-5:机台信息错误", "错误");//执行是否成功 + } + else + { + var count = new MachinesProvider().Update4(machines);//添加数据库信息。 + Button_sql = true; + if (count == 0) System.Windows.MessageBox.Show("ERR.C0210-1:信息修改失败", "错误");//判断执行是否成功 + } + } + + if (int_operate == 5)//修改机台 + { + machines.Name = this.name.Text; + machines.DispenseDyelot = null; + machines.DyeDispenseDyelot = null; + machines.ChemicalStation = this.Station.Text; + machines.DyeStation = this.Station.Text; + machines.PowderStation = this.Station.Text; + machines.ChemicalDispenser = this.chemicaldispenser.Text; + machines.DyeDispenser = this.dyedispenser.Text; + machines.PowderDispenser = this.powderdispenser.Text; + machines.ChemicalCallOff = 0; + machines.ChemicalCallOff2 = 0; + machines.ChemicalState = 101; + machines.ChemicalState2 = 101; + machines.DyeCallOff = 0; + machines.DyeState = 101; + machines.PowderCallOff = 0; + machines.PowderState = 101; + if (this.chemicaldispenser_operate.Text == "启用") machines.ChemicalEnabled = 1; + else machines.ChemicalEnabled = 0; + if (this.dyedispenser_operate.Text == "启用") machines.DyeEnabled = 1; + else machines.DyeEnabled = 0; + if (this.powderdispenser_operate.Text == "启用") machines.PowderEnabled = 1; + else machines.PowderEnabled = 0; + if (new MachinesProvider().Selectsql(machines).Count == 0)//判断数据库设定目标信息是否存在。 + { + System.Windows.MessageBox.Show("ERR.C0202-5:机台信息错误", "错误");//执行是否成功 + } + else + { + var count = new MachinesProvider().Update(machines);//添加数据库信息 + Button_sql = true; + if (count == 0) MessageBox.Show("ERR.C0210-2:机台修改失败", "错误"); + } + } + } + } + + private void Button_Delete(object sender, RoutedEventArgs e)//删除按钮 + { + machines.Name = this.name.Text;//原料代码 + string ShowProductName = "是否删除机台【" + this.name.Text + "】" + this.Station.Text;//获取原料信息并拼接提示字符串 + MessageBoxResult showProductName = System.Windows.MessageBox.Show(ShowProductName, "提示", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.Yes);//弹窗提示是否删除目标原料 + if (showProductName == MessageBoxResult.Yes)//判断是否删除原料 + { + var count = new MachinesProvider().Delete(machines_temp);//删除数据库目标信息。 + if (count == 0) System.Windows.MessageBox.Show("ERR.C0210-2:删除失败", "错误");//判断执行是否成功 + else Button_sql = true; + } + } + } +} diff --git a/View/PipesView.xaml b/View/PipesView.xaml new file mode 100644 index 0000000..2694da7 --- /dev/null +++ b/View/PipesView.xaml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/View/PipesView.xaml.cs b/View/PipesView.xaml.cs new file mode 100644 index 0000000..f43ff80 --- /dev/null +++ b/View/PipesView.xaml.cs @@ -0,0 +1,35 @@ +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.View +{ + /// + /// PipesView.xaml 的交互逻辑 + /// + public partial class PipesView : UserControl + { + public PipesView() + { + InitializeComponent(); + } + + public static Boolean Button_pipessql = true;//全局变量按钮状态 + + private void DataGridStatistics_MouseDoubleClick(object sender, MouseButtonEventArgs e)//数据表双击事件 + { + + } + } +} diff --git a/View/QueryView.xaml b/View/QueryView.xaml index 1b1df9b..ffec07f 100644 --- a/View/QueryView.xaml +++ b/View/QueryView.xaml @@ -6,7 +6,9 @@ xmlns:local="clr-namespace:Audit.View" xmlns:ConvertMoels="clr-namespace:Audit.ConvertMoels" mc:Ignorable="d" DataContext="{Binding Source={StaticResource Locator},Path=Query}" - d:DesignHeight="900" d:DesignWidth="1140"> + d:DesignHeight="900" d:DesignWidth="1140" + Loaded="UserControl_Loaded"> + @@ -19,7 +21,7 @@ - + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public StatisticsView() { - InitializeComponent(); + InitializeComponent(); } + + public static string DataGridStatistics_ProductCode = null; + public static Boolean Button_machines_sql = false; + private void DataGridStatistics_MouseDoubleClick(object sender, MouseButtonEventArgs e)//数据表双击事件 + { + int rownum = DataGridStatistics.SelectedIndex;//获取鼠标选中行并定义变量 + if (rownum != -1)//判断鼠标定位是否有效 + { + /*定位选中行及指定列单元格文本信息*/ + DataGridStatistics_ProductCode = (DataGridStatistics.Columns[0].GetCellContent(DataGridStatistics.Items[rownum]) as TextBlock).Text;//定位第0列,原料代码 + string DataGridStatistics_ProductName = (DataGridStatistics.Columns[1].GetCellContent(DataGridStatistics.Items[rownum]) as TextBlock).Text;//定位第1列,原料名称 + string DataGridStatistics_unit_price = (DataGridStatistics.Columns[2].GetCellContent(DataGridStatistics.Items[rownum]) as TextBlock).Text;//定位第2列,原料名称 + string DataGridStatistics_sum = (DataGridStatistics.Columns[3].GetCellContent(DataGridStatistics.Items[rownum]) as TextBlock).Text;//定位第3列,原料名称 + string DataGridStatistics_total_price = (DataGridStatistics.Columns[4].GetCellContent(DataGridStatistics.Items[rownum]) as TextBlock).Text;//定位第4列,原料名称 + this.productname.Text = DataGridStatistics_ProductName;//填入原料名 + this.productcode.Text = DataGridStatistics_ProductCode;//填入 + this.productsum.Text = DataGridStatistics_sum + "KG";//填入 + Button_machines_sql = true; + } + + } + + public static string query_start = null;//全局变量开始时间 + public static string query_end = null;//全局变量结束时间 + private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面执行 + { + this.query_date_start.Text = DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");//填入当天时间前30天 + this.query_date_end.Text = DateTime.Now.ToString("yyyy-MM-dd");//填入当天时间 + } + + public static int Buttontype_sql = -2;//全局变量原料类型 + public static Boolean Button_sql = true;//全局变量按钮状态 + private void Button_Click(object sender, RoutedEventArgs e) + { + query_start = this.query_date_start.Text;//传递开始时间 + query_end = this.query_date_end.Text;//传递结束时间 + string t =DateTime.Now.ToString("yyyy-MM-dd"); + int query_endT = DateTime.Compare(Convert.ToDateTime(query_end), Convert.ToDateTime(t)); //比较结束时间及当期,小于-1 等于0 大于1 + if (query_endT == 0) query_end = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"); //如果结束时间为空则填入当天时间加1天 + if (query_end == DateTime.Now.ToString("yyyy-MM-dd")) query_end = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"); + int query_TimeCompare = DateTime.Compare(Convert.ToDateTime(query_start), Convert.ToDateTime(query_end)); //比较开始结束时间,小于-1 等于0 大于1 + if (query_TimeCompare == 1)//判断查询时间是否有效,等于1无效 + { + MessageBox.Show("SC:无效查询时间", "错误");//返回无效时间弹窗 + } + else + { + if (this.stuff_ProductType.Text == "染料") Buttontype_sql = 0;//原料类型0。染料,1助剂,2粉体 + if (this.stuff_ProductType.Text == "助剂") Buttontype_sql = 1; + if (this.stuff_ProductType.Text == "粉体助剂") Buttontype_sql = 2; + if (this.stuff_ProductType.Text == "液体染料") Buttontype_sql = 3; + if (this.stuff_ProductType.Text == "全部原料") Buttontype_sql = -1; + Button_sql = true; + } + } + + private void DataGridStatistics_Copy_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + + } + } } diff --git a/View/StuffView.xaml b/View/StuffView.xaml index 3a46f97..c18b293 100644 --- a/View/StuffView.xaml +++ b/View/StuffView.xaml @@ -58,14 +58,14 @@ - + - + @@ -94,7 +94,9 @@ VerticalAlignment="Top" Width="100" FontSize="18" BorderBrush="{x:Null}" Background="{x:Null}" Grid.Column="1"/> - + + @@ -123,7 +126,7 @@ - - @@ -60,7 +61,7 @@ namespace Audit.View /// private Product product = new Product();//最终存入sql的实体 private Product product_temp = new Product();//取出自sql的实体缓存 - public static Boolean Button_sql = false; + public static Boolean Button_sql = true; public static int Buttontype_sql = -1; @@ -69,27 +70,48 @@ namespace Audit.View Regex re_number = new Regex(@"^[0-9]+(.[0-9]{1,2})?$");//校验用正则表达式有1~2位小数的正实数 Regex re_char = new Regex(@"^[A-Za-z0-9\s@()()/+!!_-]+$");//校验用正则表达式由数字,26个英文字母,空白字符和@()()/+!!_-组成的字符串 int int_stuff_ProductType = 0; - if (this.stuff_ProductType.Text == "染料") int_stuff_ProductType = 0;//原料类型0。染料,1助剂,2粉体 - if (this.stuff_ProductType.Text == "助剂") int_stuff_ProductType = 1; - if (this.stuff_ProductType.Text == "粉体助剂") int_stuff_ProductType = 2; - if (re_char.IsMatch(this.stuff_ProductCode.Text) == false) System.Windows.MessageBox.Show("ERR.C0101:无效的原料信息", "错误");//检查原料代码 + if (this.stuff_ProductType.Text == "染料") //原料类型0。染料,1助剂,2粉体 + { + int_stuff_ProductType = 0; + this.stuff_Concentration.Text = "100"; + } + if (this.stuff_ProductType.Text == "助剂") + int_stuff_ProductType = 1; + if (this.stuff_ProductType.Text == "粉体助剂") + { + int_stuff_ProductType = 2; + this.stuff_Concentration.Text = "100"; + } + if (this.stuff_ProductType.Text == "液体染料") + int_stuff_ProductType = 3; + if (re_char.IsMatch(this.stuff_ProductCode.Text) == false) + System.Windows.MessageBox.Show("ERR.C0101:无效的原料信息", "错误");//检查原料代码 else - if (string.IsNullOrEmpty(this.stuff_ProductName.Text)) System.Windows.MessageBox.Show("ERR.C0101-2:无效的原料信息", "错误");//检查原料名称 + if (string.IsNullOrEmpty(this.stuff_ProductName.Text)) + System.Windows.MessageBox.Show("ERR.C0101-2:无效的原料信息", "错误");//检查原料名称 else - if (string.IsNullOrEmpty(this.stuff_ProductType.Text)) System.Windows.MessageBox.Show("ERR.C0101-3:无效的原料信息", "错误");//检查原料类型 + if (string.IsNullOrEmpty(this.stuff_ProductType.Text)) + System.Windows.MessageBox.Show("ERR.C0101-3:无效的原料信息", "错误");//检查原料类型 else - if (string.IsNullOrEmpty(this.stuff_GRAVITY.Text)) System.Windows.MessageBox.Show("ERR.C0101-1:无效的原料信息", "错误");//检查原料比重 + if (string.IsNullOrEmpty(this.stuff_GRAVITY.Text)) + System.Windows.MessageBox.Show("ERR.C0101-1:无效的原料信息", "错误");//检查原料比重 else - if (re_number.IsMatch(this.stuff_GRAVITY.Text) == false) System.Windows.MessageBox.Show("ERR.C0102-1:原料信息错误", "错误");//检查比重输入信息 + if (re_number.IsMatch(this.stuff_GRAVITY.Text) == false) + System.Windows.MessageBox.Show("ERR.C0102-1:原料信息错误", "错误");//检查比重输入信息 else - if (re_number.IsMatch(this.stuff_Concentration.Text) == false) System.Windows.MessageBox.Show("ERR.C0102-3:原料信息错误", "错误");//检查浓度输入信息 + if (re_number.IsMatch(this.stuff_Concentration.Text) == false) + System.Windows.MessageBox.Show("ERR.C0102-3:原料信息错误", "错误");//检查浓度输入信息 else - if (float.Parse(this.stuff_GRAVITY.Text) < 0 || float.Parse(this.stuff_GRAVITY.Text) > 5) System.Windows.MessageBox.Show("ERR.C0102-2:原料信息错误", "错误");//检查比重输入数值 + if (float.Parse(this.stuff_GRAVITY.Text) < 0 || float.Parse(this.stuff_GRAVITY.Text) > 5) + System.Windows.MessageBox.Show("ERR.C0102-2:原料信息错误", "错误");//检查比重输入数值 else - if(float.Parse(this.stuff_Concentration.Text) < 0 || float.Parse(this.stuff_Concentration.Text) > 100) System.Windows.MessageBox.Show("ERR.C0102-4:原料信息错误", "错误");//检查浓度输入数值 + if(float.Parse(this.stuff_Concentration.Text) < 0 || float.Parse(this.stuff_Concentration.Text) > 100) + System.Windows.MessageBox.Show("ERR.C0102-4:原料信息错误", "错误");//检查浓度输入数值 else { - if (int_stuff_ProductType == 0)//判断是否为染料,非染料写空 + product.ProductCode = this.stuff_ProductCode.Text;//写入原料代码 + product.ProductName = this.stuff_ProductName.Text;//写入原料名称 + if (int_stuff_ProductType == 0 || int_stuff_ProductType == 3)//判断是否为染料,非染料写空 { string colorValue = stuff_Color.Background.ToString();//获取色彩框背景色"#FFC1C2C3" string StuffColor_R = string.Format("{0:X2}", colorValue.Substring(3, 2));//获取红色参数C1 @@ -103,17 +125,34 @@ namespace Audit.View { product.Color = null;//色彩栏写空 } - if (string.IsNullOrEmpty(this.stuff_Price.Text) == false) product.Price = Double.Parse(this.stuff_Price.Text);//判断价格数据是否有效,有效写入 - if (string.IsNullOrEmpty(this.stuff_ProductUnit.Text) == false) product.ProductUnit = int.Parse(this.stuff_ProductUnit.Text);//判断供应商数据是否有效,有效写入 - product.ProductCode = this.stuff_ProductCode.Text;//写入原料代码 - product.ProductName = this.stuff_ProductName.Text;//写入原料名称 + if (string.IsNullOrEmpty(this.stuff_Price.Text) == false) + product.Price = Double.Parse(this.stuff_Price.Text);//判断价格数据是否有效,有效写入 + if (string.IsNullOrEmpty(this.stuff_SUPPLIER.Text) == false) + product.SUPPLIER = this.stuff_SUPPLIER.Text;//判断供应商数据是否有效,有效写 product.GRAVITY = Double.Parse(this.stuff_GRAVITY.Text);//写入原料比重 - product.Concentration = Double.Parse(this.stuff_Concentration.Text);//写入原料浓度 - product.ProductType = int_stuff_ProductType;//写入原料类型 - new ProductProvider().Delete(product_temp);//删除数据库原目标信息。 - var count = new ProductProvider().Insert(product);//添加数据库信息。 - if (count == 0) System.Windows.MessageBox.Show("ERR.C0110-1:添加失败", "错误");//判断执行是否成功 - else Button_sql = true; + if (this.stuff_ProductType.Text == "染料" || this.stuff_ProductType.Text == "粉体助剂") + product.Concentration = 0; + else + product.Concentration = Double.Parse(this.stuff_Concentration.Text);//写入原料浓度 + product.ProductType = int_stuff_ProductType;//写入原料类型 + product.ProductCode = this.stuff_ProductCode.Text;//写入原料代码 + if (new ProductProvider().Selectsql(product).Count == 0)//判断数据库设定目标信息是否存在。 + { + var count = new ProductProvider().Insert(product);//添加数据库信息。 + if (count == 0) + System.Windows.MessageBox.Show("ERR.C0110-1:添加失败", "错误");//判断执行是否成功 + else + Button_sql = true; + } + else + { + + var count = new ProductProvider().Update(product);//添加数据库信息。 + if (count == 0) + System.Windows.MessageBox.Show("ERR.C0102-5:更新失败", "错误");//执行是否成功 + else + Button_sql = true; + } } } @@ -124,7 +163,7 @@ namespace Audit.View MessageBoxResult showProductName = System.Windows.MessageBox.Show(ShowProductName, "提示", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.Yes);//弹窗提示是否删除目标原料 if (showProductName == MessageBoxResult.Yes)//判断是否删除原料 { - var count = new ProductProvider().Delete(product_temp);//删除数据库目标信息。 + var count = new ProductProvider().Delete(product);//删除数据库目标信息。 if (count == 0) System.Windows.MessageBox.Show("ERR.C0110-2:删除失败", "错误");//判断执行是否成功 else Button_sql = true; } @@ -139,18 +178,19 @@ namespace Audit.View string DataGridStuff_ProductCode = (DataGridStuff.Columns[1].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第0列,原料代码 string DataGridStuff_ProductName = (DataGridStuff.Columns[2].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第1列,原料名称 string DataGridStuff_Price = (DataGridStuff.Columns[3].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第2列,价格 - string DataGridStuff_ProductUnit = (DataGridStuff.Columns[4].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第3列,供应商 + string DataGridstuff_SUPPLIER = (DataGridStuff.Columns[4].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第3列,供应商 string DataGridStuff_ProductType = (DataGridStuff.Columns[5].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第4列,类型 //string DataGridStuff_Color = (DataGridStuff.Columns[6].GetCellContent(DataGridStuff.Items[rownum])as TextBlock).Text;//定位第5列,色彩 string DataGridStuff_Concentration = (DataGridStuff.Columns[7].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第6列选中行单元格文本信息并去除空白字符,浓度 string DataGridStuff_GRAVITY = (DataGridStuff.Columns[8].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第7列,比重 /*stuff_Color.Background = (DataGridStuff.Columns[6].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Background;//定位第5列,色彩,背景色传递至色彩框背景色*/ /*填写信息至指定文本框*/ + //product_temp.ProductCode = DataGridStuff_ProductCode;//写入sql实体缓存 stuff_ProductCode.Text = DataGridStuff_ProductCode.Trim();//原料代码,去除空白字符 stuff_ProductName.Text = DataGridStuff_ProductName.Trim();//原料名称,去除空白字符 stuff_Price.Text = DataGridStuff_Price;//价格 stuff_ProductType.Text = DataGridStuff_ProductType;//类型 - stuff_ProductUnit.Text = DataGridStuff_ProductUnit;//供应商 + stuff_SUPPLIER.Text = DataGridstuff_SUPPLIER;//供应商 /*stuff_Color.Text = DataGridStuff_Color;//色彩数据*/ stuff_Concentration.Text = DataGridStuff_Concentration;//浓度 stuff_GRAVITY.Text = DataGridStuff_GRAVITY;//比重 @@ -165,7 +205,6 @@ namespace Audit.View { stuff_Color.Background = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 255, 255, 255));//白色传递至色彩框背景色 } - product_temp.ProductCode = DataGridStuff_ProductCode;//写入sql实体缓存 } } diff --git a/ViewModel/MachinesViewModel.cs b/ViewModel/MachinesViewModel.cs new file mode 100644 index 0000000..55f97e7 --- /dev/null +++ b/ViewModel/MachinesViewModel.cs @@ -0,0 +1,52 @@ +using Audit.View; +using GalaSoft.MvvmLight; +using Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Threading; + +namespace Audit.ViewModel +{ + public class MachinesViewModel : ViewModelBase + { + private List machiness = new List(); + + public List Machines + { + get + { + return machiness; + } + set + { + machiness = value; + RaisePropertyChanged(); + } + } + + public MachinesViewModel() + { + //machiness = new MachinesProvider().Select();//显示机台 + + DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event + { + Interval = TimeSpan.FromSeconds(0.1) + }; + timer.Tick += Tick_Event; + timer.Start(); + } + + void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件 + { + if (MachinesView.Button_sql == true)//获取按钮状态 + { + Machines = new MachinesProvider().Select();//显示机台 + MachinesView.Button_sql = false; + } + + } + } +} diff --git a/ViewModel/MainViewModel.cs b/ViewModel/MainViewModel.cs index ff518b4..fbb7399 100644 --- a/ViewModel/MainViewModel.cs +++ b/ViewModel/MainViewModel.cs @@ -1,38 +1,30 @@ +using Audit.View; using GalaSoft.MvvmLight; -using System.ComponentModel; -using System.Web.UI.WebControls; - +using Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Threading; 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" - ////} + DispatcherTimer timer = new DispatcherTimer//ʼѭÿ1һTick_Event + { + Interval = TimeSpan.FromSeconds(1) + }; + timer.Tick += Tick_Event; + timer.Start(); } + + void Tick_Event(object sender, EventArgs e)//Tick_Eventִ¼ + { + } + } } \ No newline at end of file diff --git a/ViewModel/PipesViewModel.cs b/ViewModel/PipesViewModel.cs new file mode 100644 index 0000000..b8af671 --- /dev/null +++ b/ViewModel/PipesViewModel.cs @@ -0,0 +1,51 @@ +using Audit.View; +using GalaSoft.MvvmLight; +using Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Threading; + +namespace Audit.ViewModel +{ + public class PipesViewModel : ViewModelBase + { + private List pipes = new List(); + + + + public List Pipes + { + get + { + return pipes; + } + set + { + pipes = value; + RaisePropertyChanged(); + } + } + + public PipesViewModel() + { + DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event + { + Interval = TimeSpan.FromSeconds(0.1) + }; + timer.Tick += Tick_Event; + timer.Start(); + } + + void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件 + { + if (PipesView.Button_pipessql == true) + { + new PipesProvider().Select(); + PipesView.Button_pipessql = false; + } + } + } +} diff --git a/ViewModel/QueryViewModel.cs b/ViewModel/QueryViewModel.cs index 27dd636..6656948 100644 --- a/ViewModel/QueryViewModel.cs +++ b/ViewModel/QueryViewModel.cs @@ -53,7 +53,7 @@ namespace Audit.ViewModel /// public QueryViewModel() { - dyelots = new DyelotsProvider().Select();//显示单号 + // dyelots = new DyelotsProvider().Select();//显示单号 // dyelotsBulkedRecipe = new DyelotsBulkedRecipeProvider().Select();//显示明显 DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event { @@ -63,12 +63,12 @@ namespace Audit.ViewModel timer.Start(); } - int a = 0;//计数器用变量 void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件 { - if (QueryView.sqlButton_Click == 0) + if (QueryView.sqlButton_Click == 10) { - dyelots = new DyelotsProvider().Select();//显示单号 + Dyelots = new DyelotsProvider().Select();//显示单号 + QueryView.sqlButton_Click = 0; } if (QueryView.sqlButton_Click == 2) { @@ -91,12 +91,6 @@ namespace Audit.ViewModel Dyelots = new DyelotsProvider().SelectMachine(QueryView.Dyelots_Button);//根据单号查询头 QueryView.sqlButton_Click = 0; } - if (a == 20)// - { - - a = 0; - } - else a++; } } } diff --git a/ViewModel/StatisticsViewModel.cs b/ViewModel/StatisticsViewModel.cs index cc7313c..2dfd55f 100644 --- a/ViewModel/StatisticsViewModel.cs +++ b/ViewModel/StatisticsViewModel.cs @@ -1,15 +1,102 @@ -using System; +using Audit.View; +using GalaSoft.MvvmLight; +using Models; +using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Web.Services.Description; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Threading; namespace Audit.ViewModel { /// /// StatisticsViewModel /// - public class StatisticsViewModel + public class StatisticsViewModel : ViewModelBase { - } + private List products = new List(); + private List machiness = new List(); + private List dyelotss = new List(); + + public List Product + { + get + { + return products; + } + set + { + products = value; + RaisePropertyChanged(); + } + } + + public List Machines + { + get + { + return machiness; + } + set + { + machiness = value; + RaisePropertyChanged(); + } + } + + public List Dyelots + { + get + { + return dyelotss; + } + set + { + dyelotss = value; + RaisePropertyChanged(); + } + } + + public StatisticsViewModel() + { + // products = new ProductProvider().Select(); + // machiness = new MachinesProvider().Select(); + DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event + { + Interval = TimeSpan.FromSeconds(0.1) + }; + timer.Tick += Tick_Event; + timer.Start(); + } + + void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件 + { + + if (StatisticsView.Button_sql == true)//获取按钮状态 + { + if (StatisticsView.Buttontype_sql == -2) + { + Product = new ProductProvider().Select(); + StatisticsView.Button_machines_sql = true; + } + if (StatisticsView.Buttontype_sql == -1) Product = new ProductProvider().Select(); + if (StatisticsView.Buttontype_sql == 0) Product = new ProductProvider().Selects0(); + if (StatisticsView.Buttontype_sql == 1) Product = new ProductProvider().Selects1(); + if (StatisticsView.Buttontype_sql == 2) Product = new ProductProvider().Selects2(); + if (StatisticsView.Buttontype_sql == 3) Product = new ProductProvider().Selects3(); + StatisticsView.Button_sql = false;//清除按钮状态 + } + + if (StatisticsView.Button_machines_sql == true) + { + Machines = new MachinesProvider().Select(); + StatisticsView.Button_machines_sql = false; + } + } + } } diff --git a/ViewModel/StuffViewModel.cs b/ViewModel/StuffViewModel.cs index ca2386d..0456f1e 100644 --- a/ViewModel/StuffViewModel.cs +++ b/ViewModel/StuffViewModel.cs @@ -42,7 +42,7 @@ namespace Audit.ViewModel /// public StuffViewModel() { - products = new ProductProvider().Select(); + //products = new ProductProvider().Select(); DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event { Interval = TimeSpan.FromSeconds(0.1) @@ -59,6 +59,7 @@ namespace Audit.ViewModel if (StuffView.Buttontype_sql == 0) Product = new ProductProvider().Selects0(); if (StuffView.Buttontype_sql == 1) Product = new ProductProvider().Selects1(); if (StuffView.Buttontype_sql == 2) Product = new ProductProvider().Selects2(); + if (StuffView.Buttontype_sql == 3) Product = new ProductProvider().Selects3(); StuffView.Button_sql = false;//清除按钮状态 } } diff --git a/ViewModel/UserViewModel.cs b/ViewModel/UserViewModel.cs new file mode 100644 index 0000000..7c8a89f --- /dev/null +++ b/ViewModel/UserViewModel.cs @@ -0,0 +1,35 @@ +using Audit.View; +using GalaSoft.MvvmLight; +using Models; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.Services.Description; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Threading; + + +namespace Audit.ViewModel +{ + public class UserViewModel : ViewModelBase + { + public UserViewModel() + { + DispatcherTimer timer = new DispatcherTimer//初始化循环,每0.5秒调用一次Tick_Event + { + Interval = TimeSpan.FromSeconds(0.5) + }; + timer.Tick += Tick_Event; + timer.Start(); + } + + void Tick_Event(object sender, EventArgs e)//Tick_Event周期执行事件 + { + } + + } +} diff --git a/ViewModel/ViewModelLocator.cs b/ViewModel/ViewModelLocator.cs index 56dbe45..a712b78 100644 --- a/ViewModel/ViewModelLocator.cs +++ b/ViewModel/ViewModelLocator.cs @@ -48,6 +48,9 @@ namespace Audit.ViewModel SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); } /// @@ -61,6 +64,14 @@ namespace Audit.ViewModel } } + public UserViewModel User + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + /// /// LogViewModel /// @@ -104,6 +115,29 @@ namespace Audit.ViewModel return ServiceLocator.Current.GetInstance(); } } + + /// + /// + /// + public MachinesViewModel Machines + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + /// + /// + /// + public PipesViewModel Pipes + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + /// /// Cleanup /// diff --git a/Windows/user.xaml b/Windows/user.xaml new file mode 100644 index 0000000..b4c97d7 --- /dev/null +++ b/Windows/user.xaml @@ -0,0 +1,21 @@ + + + + + + + + +