diff --git a/AutoUpdate/AutoUpdate.csproj b/AutoUpdate/AutoUpdate.csproj new file mode 100644 index 0000000..400953e --- /dev/null +++ b/AutoUpdate/AutoUpdate.csproj @@ -0,0 +1,85 @@ + + + + + Debug + AnyCPU + {5751AEE3-83BD-4CBE-8E65-0727FEC0F6C4} + WinExe + Properties + AutoUpdate + AutoUpdate + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form + + + Update.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + Update.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff --git a/AutoUpdate/Program.cs b/AutoUpdate/Program.cs new file mode 100644 index 0000000..44faa5c --- /dev/null +++ b/AutoUpdate/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AutoUpdate +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main(string[] args) + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Update(args)); + } + } +} diff --git a/AutoUpdate/Properties/AssemblyInfo.cs b/AutoUpdate/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5e43ace --- /dev/null +++ b/AutoUpdate/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("AutoUpdate")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AutoUpdate")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("42e4a2d6-f059-403c-920f-8a6c73c89ec9")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/AutoUpdate/Properties/Resources.Designer.cs b/AutoUpdate/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1ca5964 --- /dev/null +++ b/AutoUpdate/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace AutoUpdate.Properties +{ + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的、缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AutoUpdate.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 为所有资源查找重写当前线程的 CurrentUICulture 属性, + /// 方法是使用此强类型资源类。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/AutoUpdate/Properties/Resources.resx b/AutoUpdate/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/AutoUpdate/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/AutoUpdate/Properties/Settings.Designer.cs b/AutoUpdate/Properties/Settings.Designer.cs new file mode 100644 index 0000000..f99ad29 --- /dev/null +++ b/AutoUpdate/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AutoUpdate.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/AutoUpdate/Properties/Settings.settings b/AutoUpdate/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/AutoUpdate/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/AutoUpdate/Update.Designer.cs b/AutoUpdate/Update.Designer.cs new file mode 100644 index 0000000..eca2b38 --- /dev/null +++ b/AutoUpdate/Update.Designer.cs @@ -0,0 +1,51 @@ +namespace AutoUpdate +{ + partial class Update + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // Update + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(580, 148); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "Update"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "自动更新"; + this.Load += new System.EventHandler(this.Update_Load); + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/AutoUpdate/Update.cs b/AutoUpdate/Update.cs new file mode 100644 index 0000000..d4f60b8 --- /dev/null +++ b/AutoUpdate/Update.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AutoUpdate +{ + public partial class Update : Form + { + string[] updateInfo; + public Update(string[] args) + { + InitializeComponent(); + updateInfo = args; + } + + private void Update_Load(object sender, EventArgs e) + { + if (updateInfo != null && updateInfo.Length > 0) + { + var parameters = updateInfo[0].Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); + var serverUrl = parameters[0]; + var files = parameters[1].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + foreach (var file in files) + { + var path = serverUrl + file; + var clientDownload = new WebClient(); + clientDownload.DownloadFileAsync(new Uri(path), file); + } + } + Process.Start(Path.Combine(Application.StartupPath, "ButcherManageClient.exe")); + Application.Exit(); + } + } +} diff --git a/AutoUpdate/Update.resx b/AutoUpdate/Update.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/AutoUpdate/Update.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/B3ButcherManageClient.sln b/B3ButcherManageClient.sln index 15ec306..d4ef8a1 100644 --- a/B3ButcherManageClient.sln +++ b/B3ButcherManageClient.sln @@ -19,6 +19,8 @@ Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup", "Setup\Setup.vdproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeighAndGrading", "WeighAndGrading\WeighAndGrading.csproj", "{BFC366E2-994C-433F-9EE2-5377DBA9D948}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoUpdate", "AutoUpdate\AutoUpdate.csproj", "{5751AEE3-83BD-4CBE-8E65-0727FEC0F6C4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +57,10 @@ Global {BFC366E2-994C-433F-9EE2-5377DBA9D948}.Debug|Any CPU.Build.0 = Debug|Any CPU {BFC366E2-994C-433F-9EE2-5377DBA9D948}.Release|Any CPU.ActiveCfg = Release|Any CPU {BFC366E2-994C-433F-9EE2-5377DBA9D948}.Release|Any CPU.Build.0 = Release|Any CPU + {5751AEE3-83BD-4CBE-8E65-0727FEC0F6C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5751AEE3-83BD-4CBE-8E65-0727FEC0F6C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5751AEE3-83BD-4CBE-8E65-0727FEC0F6C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5751AEE3-83BD-4CBE-8E65-0727FEC0F6C4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs index 13b32bf..d779a13 100644 --- a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs +++ b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs @@ -10,7 +10,7 @@ namespace BO.BO.Bill { public long ID { get; set; } - public long OrderDetail_ID { get; set; } + public long? OrderDetail_ID { get; set; } public int Index { get; set; } @@ -27,5 +27,7 @@ namespace BO.BO.Bill public decimal? Weight { get; set; } public DateTime Time { get; set; } + + public DateTime TempTime { get { return Time; } } } } diff --git a/BO/Utils/AfterLoginUtil.cs b/BO/Utils/AfterLoginUtil.cs index bc11500..b7283c7 100644 --- a/BO/Utils/AfterLoginUtil.cs +++ b/BO/Utils/AfterLoginUtil.cs @@ -19,14 +19,14 @@ namespace BO.Utils public static class AfterLoginUtil { //#if debug - static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), - new Tuple("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), - new Tuple("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"),new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading")}; + // static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), + //new Tuple("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), + // new Tuple("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"),new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading")}; //#endif //#if !debug - // static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"ButcherOrder"), - //new Tuple("过磅员",@"ButcherWeight"), - // new Tuple("验质员",@"QualityAndOrder"),new Tuple("定级员",@"WeighAndGrading")}; + static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"ButcherOrder"), + new Tuple("过磅员",@"ButcherWeight"), + new Tuple("验质员",@"QualityAndOrder"),new Tuple("定级员",@"WeighAndGrading")}; //#endif @@ -36,10 +36,10 @@ namespace BO.Utils if (first == null) throw new Exception("未注册的角色"); //#if debug - var filePath = string.Format("{0}.dll", first.Item2); + // var filePath = string.Format("{0}.dll", first.Item2); //#endif //#if !debug - // var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2)); + var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2)); //#endif if (!File.Exists(filePath)) throw new Exception("相关模块不存在"); diff --git a/BO/Utils/LoginRpcUtil.cs b/BO/Utils/LoginRpcUtil.cs index c50db0a..f6e902c 100644 --- a/BO/Utils/LoginRpcUtil.cs +++ b/BO/Utils/LoginRpcUtil.cs @@ -43,5 +43,11 @@ namespace BO.Utils userInfo.Role = obj.Get("Role"); } } + + public static string CheckVersion(string version) + { + const string method = "/MainSystem/B3ClientService/Rpcs/VersionRpc/CheckVersion"; + return RpcFacade.Call(method, version); + } } } diff --git a/BWP.WinFormControl/UDataGridView.cs b/BWP.WinFormControl/UDataGridView.cs index 1f38af6..c959006 100644 --- a/BWP.WinFormControl/UDataGridView.cs +++ b/BWP.WinFormControl/UDataGridView.cs @@ -36,7 +36,11 @@ namespace BWP.WinFormControl SelectionForeColor = System.Drawing.SystemColors.HighlightText, WrapMode = System.Windows.Forms.DataGridViewTriState.True, }; - this.RowsDefaultCellStyle = new DataGridViewCellStyle() { SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))) }; + this.RowsDefaultCellStyle = new DataGridViewCellStyle() + { + SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))), + Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))) + }; } } } \ No newline at end of file diff --git a/ButcherManageClient/Login.Designer.cs b/ButcherManageClient/Login.Designer.cs index 6c10504..74fc78a 100644 --- a/ButcherManageClient/Login.Designer.cs +++ b/ButcherManageClient/Login.Designer.cs @@ -129,6 +129,7 @@ this.Name = "Login"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "青花瓷屠宰称重客户端"; + this.Load += new System.EventHandler(this.Login_Load); this.ResumeLayout(false); this.PerformLayout(); diff --git a/ButcherManageClient/Login.cs b/ButcherManageClient/Login.cs index 242a73c..9ecfd12 100644 --- a/ButcherManageClient/Login.cs +++ b/ButcherManageClient/Login.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -97,5 +98,32 @@ namespace ButcherManageClient if (keyBoard.ShowDialog() == true) pwdTxt.Text = keyBoard.Result; } + + private void AutoUpdate() + { + if (!File.Exists("AutoUpdate.exe")) + return; + var version = string.Empty; + if (File.Exists("Version.txt")) + { + version = File.ReadAllText("Version.txt"); + } + IniteRpcFacade(); + var files = LoginRpcUtil.CheckVersion(version); + if (string.IsNullOrEmpty(files)) + return; + var serverUrl = ButcherAppContext.Context.UrlConfig.ServerUrl.Replace("Rest.aspx", ""); + + if (!serverUrl.EndsWith("/")) + serverUrl += "/"; + serverUrl += "ClientVersion/"; + System.Diagnostics.Process.Start(Path.Combine(Application.StartupPath, "AutoUpdate.exe"), serverUrl + "|" + files); + Application.Exit(); + } + + private void Login_Load(object sender, EventArgs e) + { + AutoUpdate(); + } } } diff --git a/ButcherOrder/ButcherOrderForm.Designer.cs b/ButcherOrder/ButcherOrderForm.Designer.cs index 54f0a9e..c05bd84 100644 --- a/ButcherOrder/ButcherOrderForm.Designer.cs +++ b/ButcherOrder/ButcherOrderForm.Designer.cs @@ -189,6 +189,7 @@ this.secondOrderGridView.Name = "secondOrderGridView"; this.secondOrderGridView.ReadOnly = true; this.secondOrderGridView.RowHeadersVisible = false; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.secondOrderGridView.RowsDefaultCellStyle = dataGridViewCellStyle3; this.secondOrderGridView.RowTemplate.Height = 40; diff --git a/ButcherOrder/ViewDetail.Designer.cs b/ButcherOrder/ViewDetail.Designer.cs index 230c112..8845d82 100644 --- a/ButcherOrder/ViewDetail.Designer.cs +++ b/ButcherOrder/ViewDetail.Designer.cs @@ -147,6 +147,7 @@ this.detailGridView1.Name = "detailGridView1"; this.detailGridView1.ReadOnly = true; this.detailGridView1.RowHeadersVisible = false; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.detailGridView1.RowsDefaultCellStyle = dataGridViewCellStyle6; this.detailGridView1.RowTemplate.Height = 40; diff --git a/ButcherWeight/RecordView.Designer.cs b/ButcherWeight/RecordView.Designer.cs index 24e2322..f428bb2 100644 --- a/ButcherWeight/RecordView.Designer.cs +++ b/ButcherWeight/RecordView.Designer.cs @@ -73,6 +73,7 @@ this.detailGridView.Name = "detailGridView"; this.detailGridView.ReadOnly = true; this.detailGridView.RowHeadersVisible = false; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.detailGridView.RowsDefaultCellStyle = dataGridViewCellStyle4; this.detailGridView.RowTemplate.Height = 40; diff --git a/ButcherWeight/WeightContext.cs b/ButcherWeight/WeightContext.cs index 9632092..a86a7dc 100644 --- a/ButcherWeight/WeightContext.cs +++ b/ButcherWeight/WeightContext.cs @@ -12,10 +12,10 @@ namespace ButcherWeight public static class WeightContext { //#if debug - private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\WeightSetting.xml"; + //private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\WeightSetting.xml"; //#endif //#if !debug - //private static string loginConfigPath = Application.StartupPath + "\\WeightSetting.xml"; + private static string loginConfigPath = Application.StartupPath + "\\WeightSetting.xml"; //#endif private static WeightSetting _config; public static WeightSetting Config diff --git a/ButcherWeight/WeightForm.Designer.cs b/ButcherWeight/WeightForm.Designer.cs index 9895a46..0101dc2 100644 --- a/ButcherWeight/WeightForm.Designer.cs +++ b/ButcherWeight/WeightForm.Designer.cs @@ -784,6 +784,7 @@ this.farmerGrid.MultiSelect = false; this.farmerGrid.Name = "farmerGrid"; this.farmerGrid.RowHeadersVisible = false; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.farmerGrid.RowsDefaultCellStyle = dataGridViewCellStyle4; this.farmerGrid.RowTemplate.Height = 23; @@ -844,6 +845,7 @@ this.weightGrid.MultiSelect = false; this.weightGrid.Name = "weightGrid"; this.weightGrid.RowHeadersVisible = false; + dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.weightGrid.RowsDefaultCellStyle = dataGridViewCellStyle10; this.weightGrid.RowTemplate.Height = 23; @@ -949,6 +951,7 @@ this.houseGird.MultiSelect = false; this.houseGird.Name = "houseGird"; this.houseGird.RowHeadersVisible = false; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.houseGird.RowsDefaultCellStyle = dataGridViewCellStyle13; this.houseGird.RowTemplate.Height = 23; @@ -1031,6 +1034,7 @@ this.abnormalGrid.MultiSelect = false; this.abnormalGrid.Name = "abnormalGrid"; this.abnormalGrid.RowHeadersVisible = false; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.abnormalGrid.RowsDefaultCellStyle = dataGridViewCellStyle16; this.abnormalGrid.RowTemplate.Height = 23; @@ -1125,6 +1129,7 @@ this.billGrid.Name = "billGrid"; this.billGrid.ReadOnly = true; this.billGrid.RowHeadersVisible = false; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.billGrid.RowsDefaultCellStyle = dataGridViewCellStyle20; this.billGrid.RowTemplate.Height = 23; diff --git a/QualityAndOrder/QualityOrderForm.Designer.cs b/QualityAndOrder/QualityOrderForm.Designer.cs index 3013ff6..47a4513 100644 --- a/QualityAndOrder/QualityOrderForm.Designer.cs +++ b/QualityAndOrder/QualityOrderForm.Designer.cs @@ -36,10 +36,11 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); this.uTabControl1 = new BWP.WinFormControl.UTabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this._1LastPageBtn = new System.Windows.Forms.Button(); @@ -98,17 +99,6 @@ this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.preOrderGrid = new BWP.WinFormControl.UDataGridView(); - this.P_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_Show = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_AlreadyNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_LastNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_WeighTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.P_OKBtn = new System.Windows.Forms.DataGridViewButtonColumn(); - this.P_Hidden = new System.Windows.Forms.DataGridViewButtonColumn(); this.orderGrid = new BWP.WinFormControl.UDataGridView(); this.O_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.O_IsHurryButcher = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -122,6 +112,17 @@ this.tab2SyncBtn = new System.Windows.Forms.Button(); this.tab2DateSelect = new BWP.WinFormControl.UDatePicker(); this.label4 = new System.Windows.Forms.Label(); + this.P_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_Show = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_AlreadyNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_LastNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_WeighTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P_OKBtn = new System.Windows.Forms.DataGridViewButtonColumn(); + this.P_Hidden = new System.Windows.Forms.DataGridViewButtonColumn(); this.uTabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.panel1.SuspendLayout(); @@ -293,6 +294,7 @@ this.sanctionGrid.Name = "sanctionGrid"; this.sanctionGrid.ReadOnly = true; this.sanctionGrid.RowHeadersVisible = false; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.sanctionGrid.RowsDefaultCellStyle = dataGridViewCellStyle3; this.sanctionGrid.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -528,6 +530,7 @@ this.weightBillGrid.Name = "weightBillGrid"; this.weightBillGrid.ReadOnly = true; this.weightBillGrid.RowHeadersVisible = false; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.weightBillGrid.RowsDefaultCellStyle = dataGridViewCellStyle6; this.weightBillGrid.RowTemplate.Height = 40; @@ -828,122 +831,32 @@ this.preOrderGrid.Name = "preOrderGrid"; this.preOrderGrid.ReadOnly = true; this.preOrderGrid.RowHeadersVisible = false; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.preOrderGrid.RowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.preOrderGrid.RowsDefaultCellStyle = dataGridViewCellStyle10; this.preOrderGrid.RowTemplate.Height = 40; this.preOrderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.preOrderGrid.Size = new System.Drawing.Size(769, 663); this.preOrderGrid.TabIndex = 38; this.preOrderGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.preOrderGrid_CellClick); // - // P_WeightBill_ID - // - this.P_WeightBill_ID.DataPropertyName = "WeightBill_ID"; - this.P_WeightBill_ID.HeaderText = "WeightBill_ID"; - this.P_WeightBill_ID.Name = "P_WeightBill_ID"; - this.P_WeightBill_ID.ReadOnly = true; - this.P_WeightBill_ID.Visible = false; - // - // P_Show - // - this.P_Show.DataPropertyName = "Show"; - this.P_Show.HeaderText = "Show"; - this.P_Show.Name = "P_Show"; - this.P_Show.ReadOnly = true; - this.P_Show.Visible = false; - // - // P_B3ID - // - this.P_B3ID.DataPropertyName = "B3ID"; - this.P_B3ID.HeaderText = "磅单号"; - this.P_B3ID.Name = "P_B3ID"; - this.P_B3ID.ReadOnly = true; - this.P_B3ID.Width = 80; - // - // P_Supplier_Name - // - this.P_Supplier_Name.DataPropertyName = "Supplier_Name"; - this.P_Supplier_Name.HeaderText = "供应商"; - this.P_Supplier_Name.Name = "P_Supplier_Name"; - this.P_Supplier_Name.ReadOnly = true; - this.P_Supplier_Name.Width = 80; - // - // P_HouseNames - // - this.P_HouseNames.DataPropertyName = "HouseNames"; - this.P_HouseNames.HeaderText = "圈舍"; - this.P_HouseNames.Name = "P_HouseNames"; - this.P_HouseNames.ReadOnly = true; - this.P_HouseNames.Width = 95; - // - // P_Number - // - this.P_Number.DataPropertyName = "Number"; - this.P_Number.HeaderText = "总头数"; - this.P_Number.Name = "P_Number"; - this.P_Number.ReadOnly = true; - this.P_Number.Width = 80; - // - // P_AlreadyNumber - // - this.P_AlreadyNumber.DataPropertyName = "AlreadyNumber"; - this.P_AlreadyNumber.HeaderText = "已排"; - this.P_AlreadyNumber.Name = "P_AlreadyNumber"; - this.P_AlreadyNumber.ReadOnly = true; - this.P_AlreadyNumber.Width = 65; - // - // P_LastNumber - // - this.P_LastNumber.DataPropertyName = "LastNumber"; - this.P_LastNumber.HeaderText = "剩余"; - this.P_LastNumber.Name = "P_LastNumber"; - this.P_LastNumber.ReadOnly = true; - this.P_LastNumber.Width = 65; - // - // P_WeighTime - // - this.P_WeighTime.DataPropertyName = "WeighTime"; - this.P_WeighTime.HeaderText = "过磅时间"; - this.P_WeighTime.Name = "P_WeighTime"; - this.P_WeighTime.ReadOnly = true; - this.P_WeighTime.Width = 105; - // - // P_OKBtn - // - this.P_OKBtn.HeaderText = "排宰"; - this.P_OKBtn.Name = "P_OKBtn"; - this.P_OKBtn.ReadOnly = true; - this.P_OKBtn.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.P_OKBtn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.P_OKBtn.Text = "排宰"; - this.P_OKBtn.UseColumnTextForButtonValue = true; - this.P_OKBtn.Width = 85; - // - // P_Hidden - // - this.P_Hidden.HeaderText = "隐藏"; - this.P_Hidden.Name = "P_Hidden"; - this.P_Hidden.ReadOnly = true; - this.P_Hidden.Text = "隐藏"; - this.P_Hidden.Width = 85; - // // orderGrid // this.orderGrid.AllowUserToAddRows = false; this.orderGrid.AllowUserToDeleteRows = false; this.orderGrid.AllowUserToResizeColumns = false; this.orderGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11; this.orderGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12; this.orderGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.orderGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.O_ID, @@ -960,8 +873,9 @@ this.orderGrid.Name = "orderGrid"; this.orderGrid.ReadOnly = true; this.orderGrid.RowHeadersVisible = false; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle13; this.orderGrid.RowTemplate.Height = 40; this.orderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.orderGrid.Size = new System.Drawing.Size(540, 371); @@ -1076,6 +990,100 @@ this.label4.TabIndex = 35; this.label4.Text = "日期:"; // + // P_WeightBill_ID + // + this.P_WeightBill_ID.DataPropertyName = "WeightBill_ID"; + this.P_WeightBill_ID.HeaderText = "WeightBill_ID"; + this.P_WeightBill_ID.Name = "P_WeightBill_ID"; + this.P_WeightBill_ID.ReadOnly = true; + this.P_WeightBill_ID.Visible = false; + // + // P_Show + // + this.P_Show.DataPropertyName = "Show"; + this.P_Show.HeaderText = "Show"; + this.P_Show.Name = "P_Show"; + this.P_Show.ReadOnly = true; + this.P_Show.Visible = false; + // + // P_B3ID + // + this.P_B3ID.DataPropertyName = "B3ID"; + this.P_B3ID.HeaderText = "磅单号"; + this.P_B3ID.Name = "P_B3ID"; + this.P_B3ID.ReadOnly = true; + this.P_B3ID.Width = 80; + // + // P_Supplier_Name + // + this.P_Supplier_Name.DataPropertyName = "Supplier_Name"; + this.P_Supplier_Name.HeaderText = "供应商"; + this.P_Supplier_Name.Name = "P_Supplier_Name"; + this.P_Supplier_Name.ReadOnly = true; + this.P_Supplier_Name.Width = 80; + // + // P_HouseNames + // + this.P_HouseNames.DataPropertyName = "HouseNames"; + this.P_HouseNames.HeaderText = "圈舍"; + this.P_HouseNames.Name = "P_HouseNames"; + this.P_HouseNames.ReadOnly = true; + this.P_HouseNames.Width = 95; + // + // P_Number + // + this.P_Number.DataPropertyName = "Number"; + this.P_Number.HeaderText = "总头数"; + this.P_Number.Name = "P_Number"; + this.P_Number.ReadOnly = true; + this.P_Number.Width = 80; + // + // P_AlreadyNumber + // + this.P_AlreadyNumber.DataPropertyName = "AlreadyNumber"; + this.P_AlreadyNumber.HeaderText = "已排"; + this.P_AlreadyNumber.Name = "P_AlreadyNumber"; + this.P_AlreadyNumber.ReadOnly = true; + this.P_AlreadyNumber.Width = 65; + // + // P_LastNumber + // + this.P_LastNumber.DataPropertyName = "LastNumber"; + this.P_LastNumber.HeaderText = "剩余"; + this.P_LastNumber.Name = "P_LastNumber"; + this.P_LastNumber.ReadOnly = true; + this.P_LastNumber.Width = 65; + // + // P_WeighTime + // + this.P_WeighTime.DataPropertyName = "WeighTime"; + dataGridViewCellStyle9.Format = "MM/dd HH:mm"; + dataGridViewCellStyle9.NullValue = null; + this.P_WeighTime.DefaultCellStyle = dataGridViewCellStyle9; + this.P_WeighTime.HeaderText = "过磅时间"; + this.P_WeighTime.Name = "P_WeighTime"; + this.P_WeighTime.ReadOnly = true; + this.P_WeighTime.Width = 105; + // + // P_OKBtn + // + this.P_OKBtn.HeaderText = "排宰"; + this.P_OKBtn.Name = "P_OKBtn"; + this.P_OKBtn.ReadOnly = true; + this.P_OKBtn.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.P_OKBtn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.P_OKBtn.Text = "排宰"; + this.P_OKBtn.UseColumnTextForButtonValue = true; + this.P_OKBtn.Width = 85; + // + // P_Hidden + // + this.P_Hidden.HeaderText = "隐藏"; + this.P_Hidden.Name = "P_Hidden"; + this.P_Hidden.ReadOnly = true; + this.P_Hidden.Text = "隐藏"; + this.P_Hidden.Width = 85; + // // QualityOrderForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1165,17 +1173,6 @@ private System.Windows.Forms.RadioButton showHidden; private System.Windows.Forms.RadioButton showAvailable; private System.Windows.Forms.RadioButton showAll; - private System.Windows.Forms.DataGridViewTextBoxColumn P_WeightBill_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn P_Show; - private System.Windows.Forms.DataGridViewTextBoxColumn P_B3ID; - private System.Windows.Forms.DataGridViewTextBoxColumn P_Supplier_Name; - private System.Windows.Forms.DataGridViewTextBoxColumn P_HouseNames; - private System.Windows.Forms.DataGridViewTextBoxColumn P_Number; - private System.Windows.Forms.DataGridViewTextBoxColumn P_AlreadyNumber; - private System.Windows.Forms.DataGridViewTextBoxColumn P_LastNumber; - private System.Windows.Forms.DataGridViewTextBoxColumn P_WeighTime; - private System.Windows.Forms.DataGridViewButtonColumn P_OKBtn; - private System.Windows.Forms.DataGridViewButtonColumn P_Hidden; private System.Windows.Forms.DataGridViewTextBoxColumn W_ID; private System.Windows.Forms.DataGridViewTextBoxColumn W_AlreadyHouse; private System.Windows.Forms.DataGridViewTextBoxColumn W_B3ID; @@ -1191,6 +1188,17 @@ private System.Windows.Forms.Button _2NextPageBtn; private System.Windows.Forms.Button _2PrePageBtn; private System.Windows.Forms.Button _2FirstPageBtn; + private System.Windows.Forms.DataGridViewTextBoxColumn P_WeightBill_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn P_Show; + private System.Windows.Forms.DataGridViewTextBoxColumn P_B3ID; + private System.Windows.Forms.DataGridViewTextBoxColumn P_Supplier_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn P_HouseNames; + private System.Windows.Forms.DataGridViewTextBoxColumn P_Number; + private System.Windows.Forms.DataGridViewTextBoxColumn P_AlreadyNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn P_LastNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn P_WeighTime; + private System.Windows.Forms.DataGridViewButtonColumn P_OKBtn; + private System.Windows.Forms.DataGridViewButtonColumn P_Hidden; diff --git a/QualityAndOrder/QualityOrderFormForTab2.cs b/QualityAndOrder/QualityOrderFormForTab2.cs index 6127795..ffdd43a 100644 --- a/QualityAndOrder/QualityOrderFormForTab2.cs +++ b/QualityAndOrder/QualityOrderFormForTab2.cs @@ -217,9 +217,9 @@ namespace QualityAndOrder if (entity.PlanNumber > backInfo.LastNumber) throw new Exception("排宰总头数多余过磅头数"); - var item = needOrderList.FirstOrDefault(x => x.WeightBill_ID == backInfo.WeightBill_ID); if (entity.PlanNumber == backInfo.LastNumber) return; + var item = needOrderList.FirstOrDefault(x => x.WeightBill_ID == backInfo.WeightBill_ID); if (item == null) { item = new NeedOrderEntity(); diff --git a/Setup/Release/Setup.msi b/Setup/Release/Setup.msi index 4fd565b..d063003 100644 Binary files a/Setup/Release/Setup.msi and b/Setup/Release/Setup.msi differ diff --git a/Setup/Setup.vdproj b/Setup/Setup.vdproj index cfe9ba0..a60be74 100644 --- a/Setup/Setup.vdproj +++ b/Setup/Setup.vdproj @@ -15,164 +15,182 @@ { "Entry" { - "MsmKey" = "8:_2028496CE76A4260A4BE696C231D92C4" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_018A13849624E4AE3CDC3A10B077719F" + "OwnerKey" = "8:_3889C054825438E9FCA8AD0745ADE017" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_256D496D5DAF74C74B6417F600F173BF" + "MsmKey" = "8:_018A13849624E4AE3CDC3A10B077719F" "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_5028DE72CC42424CB6B2165E77BED521" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_018A13849624E4AE3CDC3A10B077719F" + "OwnerKey" = "8:_330D031AE5F223BC187AA689BE72AD7E" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_561DA641348F488AB17CF44013258EBD" + "MsmKey" = "8:_2028496CE76A4260A4BE696C231D92C4" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_5DDE73D6E26642C99C1F3ED80EAAA5D0" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_2C2942BD572A3CAA8721DF87BDC15062" + "OwnerKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_2C2942BD572A3CAA8721DF87BDC15062" + "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_830258A5E5B0C75EB3217B2F333721DD" - "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" + "MsmKey" = "8:_2C2942BD572A3CAA8721DF87BDC15062" + "OwnerKey" = "8:_3889C054825438E9FCA8AD0745ADE017" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_830258A5E5B0C75EB3217B2F333721DD" - "OwnerKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF" + "MsmKey" = "8:_330D031AE5F223BC187AA689BE72AD7E" + "OwnerKey" = "8:_3889C054825438E9FCA8AD0745ADE017" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_830258A5E5B0C75EB3217B2F333721DD" - "OwnerKey" = "8:_5DDE73D6E26642C99C1F3ED80EAAA5D0" + "MsmKey" = "8:_330D031AE5F223BC187AA689BE72AD7E" + "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_830258A5E5B0C75EB3217B2F333721DD" - "OwnerKey" = "8:_561DA641348F488AB17CF44013258EBD" + "MsmKey" = "8:_3889C054825438E9FCA8AD0745ADE017" + "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_89319829C5BC8CDDFC1FB1D262E6991C" - "OwnerKey" = "8:_256D496D5DAF74C74B6417F600F173BF" + "MsmKey" = "8:_490CF6B031F04EA68BE52D3A7EB5FEF9" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_89319829C5BC8CDDFC1FB1D262E6991C" - "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" + "MsmKey" = "8:_5028DE72CC42424CB6B2165E77BED521" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_979CC2EB59B6C7E491AD72579499256C" - "OwnerKey" = "8:_D70677C1F9DC077D2965162D8840C815" + "MsmKey" = "8:_561DA641348F488AB17CF44013258EBD" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_979CC2EB59B6C7E491AD72579499256C" - "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" + "MsmKey" = "8:_5DDE73D6E26642C99C1F3ED80EAAA5D0" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_979CC2EB59B6C7E491AD72579499256C" - "OwnerKey" = "8:_256D496D5DAF74C74B6417F600F173BF" + "MsmKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_98A60679F483030FB04D2F427A69CA4A" - "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" + "MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" + "OwnerKey" = "8:_DCAD0C7A90D41BB9B51FADBF93A88815" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_98A60679F483030FB04D2F427A69CA4A" - "OwnerKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF" + "MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" + "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_98A60679F483030FB04D2F427A69CA4A" - "OwnerKey" = "8:_5DDE73D6E26642C99C1F3ED80EAAA5D0" + "MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" + "OwnerKey" = "8:_DF4A0026DD9EC3F18D5A76EF613913AA" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_98A60679F483030FB04D2F427A69CA4A" - "OwnerKey" = "8:_561DA641348F488AB17CF44013258EBD" + "MsmKey" = "8:_C4609315564A5A79DE9CC35B7F0552D9" + "OwnerKey" = "8:_3889C054825438E9FCA8AD0745ADE017" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_D70677C1F9DC077D2965162D8840C815" - "OwnerKey" = "8:_830258A5E5B0C75EB3217B2F333721DD" + "MsmKey" = "8:_C4609315564A5A79DE9CC35B7F0552D9" + "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_D70677C1F9DC077D2965162D8840C815" + "MsmKey" = "8:_DCAD0C7A90D41BB9B51FADBF93A88815" "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_D70677C1F9DC077D2965162D8840C815" - "OwnerKey" = "8:_98A60679F483030FB04D2F427A69CA4A" + "MsmKey" = "8:_DCAD0C7A90D41BB9B51FADBF93A88815" + "OwnerKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_DF7E0B7862E40C1FF8767A6E515DF857" - "OwnerKey" = "8:_256D496D5DAF74C74B6417F600F173BF" + "MsmKey" = "8:_DCAD0C7A90D41BB9B51FADBF93A88815" + "OwnerKey" = "8:_5DDE73D6E26642C99C1F3ED80EAAA5D0" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_DF7E0B7862E40C1FF8767A6E515DF857" - "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" + "MsmKey" = "8:_DCAD0C7A90D41BB9B51FADBF93A88815" + "OwnerKey" = "8:_561DA641348F488AB17CF44013258EBD" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_F84D369AFA59BAC8CB50CE356C763AA0" - "OwnerKey" = "8:_256D496D5DAF74C74B6417F600F173BF" + "MsmKey" = "8:_DCAD0C7A90D41BB9B51FADBF93A88815" + "OwnerKey" = "8:_2028496CE76A4260A4BE696C231D92C4" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_F84D369AFA59BAC8CB50CE356C763AA0" + "MsmKey" = "8:_DF4A0026DD9EC3F18D5A76EF613913AA" "OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_F84D369AFA59BAC8CB50CE356C763AA0" - "OwnerKey" = "8:_89319829C5BC8CDDFC1FB1D262E6991C" + "MsmKey" = "8:_DF4A0026DD9EC3F18D5A76EF613913AA" + "OwnerKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_DF4A0026DD9EC3F18D5A76EF613913AA" + "OwnerKey" = "8:_5DDE73D6E26642C99C1F3ED80EAAA5D0" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_DF4A0026DD9EC3F18D5A76EF613913AA" + "OwnerKey" = "8:_561DA641348F488AB17CF44013258EBD" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_DF4A0026DD9EC3F18D5A76EF613913AA" + "OwnerKey" = "8:_2028496CE76A4260A4BE696C231D92C4" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -184,7 +202,7 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_2028496CE76A4260A4BE696C231D92C4" + "OwnerKey" = "8:_490CF6B031F04EA68BE52D3A7EB5FEF9" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -208,49 +226,55 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_256D496D5DAF74C74B6417F600F173BF" + "OwnerKey" = "8:_2028496CE76A4260A4BE696C231D92C4" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_89319829C5BC8CDDFC1FB1D262E6991C" + "OwnerKey" = "8:_3889C054825438E9FCA8AD0745ADE017" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_F84D369AFA59BAC8CB50CE356C763AA0" + "OwnerKey" = "8:_330D031AE5F223BC187AA689BE72AD7E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_DF7E0B7862E40C1FF8767A6E515DF857" + "OwnerKey" = "8:_018A13849624E4AE3CDC3A10B077719F" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_98A60679F483030FB04D2F427A69CA4A" + "OwnerKey" = "8:_C4609315564A5A79DE9CC35B7F0552D9" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_830258A5E5B0C75EB3217B2F333721DD" + "OwnerKey" = "8:_DF4A0026DD9EC3F18D5A76EF613913AA" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_D70677C1F9DC077D2965162D8840C815" + "OwnerKey" = "8:_DCAD0C7A90D41BB9B51FADBF93A88815" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_979CC2EB59B6C7E491AD72579499256C" + "OwnerKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_2C2942BD572A3CAA8721DF87BDC15062" "MsmSig" = "8:_UNDEFINED" } } @@ -348,6 +372,37 @@ } "File" { + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_018A13849624E4AE3CDC3A10B077719F" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:MongoDB.Bson, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_018A13849624E4AE3CDC3A10B077719F" + { + "Name" = "8:MongoDB.Bson.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:MongoDB.Bson.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_2028496CE76A4260A4BE696C231D92C4" { "AssemblyRegister" = "3:1" @@ -379,20 +434,20 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_256D496D5DAF74C74B6417F600F173BF" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_2C2942BD572A3CAA8721DF87BDC15062" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Forks.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" "ScatterAssemblies" { - "_256D496D5DAF74C74B6417F600F173BF" + "_2C2942BD572A3CAA8721DF87BDC15062" { - "Name" = "8:Forks.EnterpriseServices.dll" + "Name" = "8:Forks.Json.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:Forks.EnterpriseServices.dll" + "SourcePath" = "8:Forks.Json.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -410,20 +465,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_561DA641348F488AB17CF44013258EBD" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_330D031AE5F223BC187AA689BE72AD7E" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ButcherOrder, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:MongoDB.Driver, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL" "ScatterAssemblies" { - "_561DA641348F488AB17CF44013258EBD" + "_330D031AE5F223BC187AA689BE72AD7E" { - "Name" = "8:ButcherOrder.dll" + "Name" = "8:MongoDB.Driver.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:..\\ButcherOrder\\bin\\Release\\ButcherOrder.dll" + "SourcePath" = "8:MongoDB.Driver.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -438,23 +493,23 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" + "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5DDE73D6E26642C99C1F3ED80EAAA5D0" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_3889C054825438E9FCA8AD0745ADE017" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:QualityAndOrder, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" "ScatterAssemblies" { - "_5DDE73D6E26642C99C1F3ED80EAAA5D0" + "_3889C054825438E9FCA8AD0745ADE017" { - "Name" = "8:QualityAndOrder.dll" + "Name" = "8:Forks.EnterpriseServices.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:..\\QualityAndOrder\\bin\\Release\\QualityAndOrder.dll" + "SourcePath" = "8:Forks.EnterpriseServices.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -469,23 +524,23 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" + "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_72C299799A4A4FCE805FFC4FC20FAFEF" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_490CF6B031F04EA68BE52D3A7EB5FEF9" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ButcherWeight, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:AutoUpdate, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { - "_72C299799A4A4FCE805FFC4FC20FAFEF" + "_490CF6B031F04EA68BE52D3A7EB5FEF9" { - "Name" = "8:ButcherWeight.dll" + "Name" = "8:AutoUpdate.exe" "Attributes" = "3:512" } } - "SourcePath" = "8:..\\ButcherWeight\\bin\\Release\\ButcherWeight.dll" + "SourcePath" = "8:..\\AutoUpdate\\bin\\Release\\AutoUpdate.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -503,20 +558,20 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_830258A5E5B0C75EB3217B2F333721DD" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_561DA641348F488AB17CF44013258EBD" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:BO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:ButcherOrder, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { - "_830258A5E5B0C75EB3217B2F333721DD" + "_561DA641348F488AB17CF44013258EBD" { - "Name" = "8:BO.dll" + "Name" = "8:ButcherOrder.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:BO.dll" + "SourcePath" = "8:..\\ButcherOrder\\bin\\Release\\ButcherOrder.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -531,23 +586,23 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_89319829C5BC8CDDFC1FB1D262E6991C" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5DDE73D6E26642C99C1F3ED80EAAA5D0" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:MongoDB.Driver, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:QualityAndOrder, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { - "_89319829C5BC8CDDFC1FB1D262E6991C" + "_5DDE73D6E26642C99C1F3ED80EAAA5D0" { - "Name" = "8:MongoDB.Driver.dll" + "Name" = "8:QualityAndOrder.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:MongoDB.Driver.dll" + "SourcePath" = "8:..\\QualityAndOrder\\bin\\Release\\QualityAndOrder.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -562,23 +617,23 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_979CC2EB59B6C7E491AD72579499256C" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_72C299799A4A4FCE805FFC4FC20FAFEF" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Forks.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:ButcherWeight, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { - "_979CC2EB59B6C7E491AD72579499256C" + "_72C299799A4A4FCE805FFC4FC20FAFEF" { - "Name" = "8:Forks.Json.dll" + "Name" = "8:ButcherWeight.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:Forks.Json.dll" + "SourcePath" = "8:..\\ButcherWeight\\bin\\Release\\ButcherWeight.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -593,23 +648,23 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_98A60679F483030FB04D2F427A69CA4A" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B110F71EA45DE28B9A91C6C8EC87BC44" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:BWP.WinFormControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" "ScatterAssemblies" { - "_98A60679F483030FB04D2F427A69CA4A" + "_B110F71EA45DE28B9A91C6C8EC87BC44" { - "Name" = "8:BWP.WinFormControl.dll" + "Name" = "8:Forks.JsonRpc.Client.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:BWP.WinFormControl.dll" + "SourcePath" = "8:Forks.JsonRpc.Client.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -627,20 +682,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D70677C1F9DC077D2965162D8840C815" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C4609315564A5A79DE9CC35B7F0552D9" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" "ScatterAssemblies" { - "_D70677C1F9DC077D2965162D8840C815" + "_C4609315564A5A79DE9CC35B7F0552D9" { - "Name" = "8:Forks.JsonRpc.Client.dll" + "Name" = "8:Forks.Utils.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:Forks.JsonRpc.Client.dll" + "SourcePath" = "8:Forks.Utils.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -658,20 +713,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_DF7E0B7862E40C1FF8767A6E515DF857" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_DCAD0C7A90D41BB9B51FADBF93A88815" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:BO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { - "_DF7E0B7862E40C1FF8767A6E515DF857" + "_DCAD0C7A90D41BB9B51FADBF93A88815" { - "Name" = "8:Forks.Utils.dll" + "Name" = "8:BO.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:Forks.Utils.dll" + "SourcePath" = "8:BO.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" @@ -689,20 +744,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F84D369AFA59BAC8CB50CE356C763AA0" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_DF4A0026DD9EC3F18D5A76EF613913AA" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:MongoDB.Bson, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:BWP.WinFormControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" "ScatterAssemblies" { - "_F84D369AFA59BAC8CB50CE356C763AA0" + "_DF4A0026DD9EC3F18D5A76EF613913AA" { - "Name" = "8:MongoDB.Bson.dll" + "Name" = "8:BWP.WinFormControl.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:MongoDB.Bson.dll" + "SourcePath" = "8:BWP.WinFormControl.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5" diff --git a/WeighAndGrading/BodyDiscontSetting.Designer.cs b/WeighAndGrading/BodyDiscontSetting.Designer.cs index 8b7993e..db017d5 100644 --- a/WeighAndGrading/BodyDiscontSetting.Designer.cs +++ b/WeighAndGrading/BodyDiscontSetting.Designer.cs @@ -68,6 +68,7 @@ this.uDataGridView1.Name = "uDataGridView1"; this.uDataGridView1.ReadOnly = true; this.uDataGridView1.RowHeadersVisible = false; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4; this.uDataGridView1.RowTemplate.Height = 40; diff --git a/WeighAndGrading/GradeContext.cs b/WeighAndGrading/GradeContext.cs index 7f183ff..7a76839 100644 --- a/WeighAndGrading/GradeContext.cs +++ b/WeighAndGrading/GradeContext.cs @@ -12,10 +12,10 @@ namespace WeighAndGrading public static class GradeContext { //#if debug - private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\GradeConfig.xml"; + //private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\GradeConfig.xml"; //#endif //#if !debug - //private static string loginConfigPath = Application.StartupPath + "\\GradeConfig.xml"; + private static string loginConfigPath = Application.StartupPath + "\\GradeConfig.xml"; //#endif private static GradeConfig _config; public static GradeConfig Config diff --git a/WeighAndGrading/GradeFrom.Designer.cs b/WeighAndGrading/GradeFrom.Designer.cs index 4173721..59c6857 100644 --- a/WeighAndGrading/GradeFrom.Designer.cs +++ b/WeighAndGrading/GradeFrom.Designer.cs @@ -30,11 +30,12 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.label1 = new System.Windows.Forms.Label(); this.syncBtn = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); @@ -49,13 +50,6 @@ this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label12 = new System.Windows.Forms.Label(); this.historyGrid = new BWP.WinFormControl.UDataGridView(); - this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.enableWeight = new System.Windows.Forms.CheckBox(); this.isPrintCheckBox = new System.Windows.Forms.CheckBox(); this.printBtn = new System.Windows.Forms.Button(); @@ -79,6 +73,13 @@ this.cancelBtn = new System.Windows.Forms.Button(); this.discontBtn = new System.Windows.Forms.Button(); this.discontPanel = new System.Windows.Forms.FlowLayoutPanel(); + this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); @@ -246,71 +247,15 @@ this.historyGrid.Name = "historyGrid"; this.historyGrid.ReadOnly = true; this.historyGrid.RowHeadersVisible = false; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle5; this.historyGrid.RowTemplate.Height = 40; this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.historyGrid.Size = new System.Drawing.Size(409, 597); this.historyGrid.TabIndex = 0; this.historyGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.historyGrid_CellClick); // - // H_ID - // - this.H_ID.DataPropertyName = "ID"; - this.H_ID.HeaderText = "ID"; - this.H_ID.Name = "H_ID"; - this.H_ID.ReadOnly = true; - this.H_ID.Visible = false; - // - // H_Livestock_ID - // - this.H_Livestock_ID.HeaderText = "Livestock_ID"; - this.H_Livestock_ID.Name = "H_Livestock_ID"; - this.H_Livestock_ID.ReadOnly = true; - this.H_Livestock_ID.Visible = false; - // - // H_Index - // - this.H_Index.DataPropertyName = "Index"; - this.H_Index.HeaderText = "序号"; - this.H_Index.Name = "H_Index"; - this.H_Index.ReadOnly = true; - this.H_Index.Width = 65; - // - // H_Technics - // - this.H_Technics.DataPropertyName = "Technics_Name"; - this.H_Technics.HeaderText = "工艺"; - this.H_Technics.Name = "H_Technics"; - this.H_Technics.ReadOnly = true; - this.H_Technics.Width = 65; - // - // H_Livestock_Name - // - this.H_Livestock_Name.DataPropertyName = "Livestock_Name"; - this.H_Livestock_Name.HeaderText = "级别"; - this.H_Livestock_Name.Name = "H_Livestock_Name"; - this.H_Livestock_Name.ReadOnly = true; - this.H_Livestock_Name.Width = 90; - // - // H_Weight - // - this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3; - this.H_Weight.HeaderText = "重量"; - this.H_Weight.Name = "H_Weight"; - this.H_Weight.ReadOnly = true; - this.H_Weight.Width = 70; - // - // H_Time - // - this.H_Time.DataPropertyName = "Time"; - this.H_Time.HeaderText = "时间"; - this.H_Time.Name = "H_Time"; - this.H_Time.ReadOnly = true; - this.H_Time.Width = 110; - // // enableWeight // this.enableWeight.AutoCheck = false; @@ -383,17 +328,17 @@ this.dataGridView.AllowUserToDeleteRows = false; this.dataGridView.AllowUserToResizeColumns = false; this.dataGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; this.dataGridView.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.D_OrderDetail_ID, @@ -409,8 +354,9 @@ this.dataGridView.Name = "dataGridView"; this.dataGridView.ReadOnly = true; this.dataGridView.RowHeadersVisible = false; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle8; this.dataGridView.RowTemplate.Height = 40; this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridView.Size = new System.Drawing.Size(469, 517); @@ -567,6 +513,66 @@ this.discontPanel.Size = new System.Drawing.Size(71, 656); this.discontPanel.TabIndex = 33; // + // H_ID + // + this.H_ID.DataPropertyName = "ID"; + this.H_ID.HeaderText = "ID"; + this.H_ID.Name = "H_ID"; + this.H_ID.ReadOnly = true; + this.H_ID.Visible = false; + // + // H_Livestock_ID + // + this.H_Livestock_ID.HeaderText = "Livestock_ID"; + this.H_Livestock_ID.Name = "H_Livestock_ID"; + this.H_Livestock_ID.ReadOnly = true; + this.H_Livestock_ID.Visible = false; + // + // H_Index + // + this.H_Index.DataPropertyName = "Index"; + this.H_Index.HeaderText = "序号"; + this.H_Index.Name = "H_Index"; + this.H_Index.ReadOnly = true; + this.H_Index.Width = 65; + // + // H_Technics + // + this.H_Technics.DataPropertyName = "Technics_Name"; + this.H_Technics.HeaderText = "工艺"; + this.H_Technics.Name = "H_Technics"; + this.H_Technics.ReadOnly = true; + this.H_Technics.Width = 65; + // + // H_Livestock_Name + // + this.H_Livestock_Name.DataPropertyName = "Livestock_Name"; + this.H_Livestock_Name.HeaderText = "级别"; + this.H_Livestock_Name.Name = "H_Livestock_Name"; + this.H_Livestock_Name.ReadOnly = true; + this.H_Livestock_Name.Width = 90; + // + // H_Weight + // + this.H_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle3.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3; + this.H_Weight.HeaderText = "重量"; + this.H_Weight.Name = "H_Weight"; + this.H_Weight.ReadOnly = true; + this.H_Weight.Width = 70; + // + // H_Time + // + this.H_Time.DataPropertyName = "Time"; + dataGridViewCellStyle4.Format = "MM/dd HH:mm"; + dataGridViewCellStyle4.NullValue = null; + this.H_Time.DefaultCellStyle = dataGridViewCellStyle4; + this.H_Time.HeaderText = "时间"; + this.H_Time.Name = "H_Time"; + this.H_Time.ReadOnly = true; + this.H_Time.Width = 110; + // // GradeFrom // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -643,13 +649,6 @@ private System.Windows.Forms.Label stateLabel; private System.Windows.Forms.Panel modifyPanel; private System.Windows.Forms.Button cancelBtn; - private System.Windows.Forms.DataGridViewTextBoxColumn H_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Index; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; - private System.Windows.Forms.DataGridViewTextBoxColumn H_Time; private System.Windows.Forms.DataGridViewTextBoxColumn D_OrderDetail_ID; private System.Windows.Forms.DataGridViewTextBoxColumn D_Technics; private System.Windows.Forms.DataGridViewTextBoxColumn D_Finish; @@ -660,5 +659,12 @@ private System.Windows.Forms.DataGridViewButtonColumn D_FinishBtn; private System.Windows.Forms.Button discontBtn; private System.Windows.Forms.FlowLayoutPanel discontPanel; + private System.Windows.Forms.DataGridViewTextBoxColumn H_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Index; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; + private System.Windows.Forms.DataGridViewTextBoxColumn H_Time; } } \ No newline at end of file diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index 8f17274..47c451d 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -114,7 +114,18 @@ namespace WeighAndGrading tangRow = FindRowSetSelected(tangEntity); maoRow = FindRowSetSelected(maoEntity); dataGridView.Refresh(); - details = GradeAndWeightRpc.GetDetails(date, 14); + details = GradeAndWeightRpc.GetDetails(date, 50); + var stack = new Stack(); + foreach (var item in details) + { + if (item.Livestock_ID == 0 || item.Weight == null) + stack.Push(item); + else + break; + } + while (stack.Count > 0) + tempList.Enqueue(stack.Pop()); + BindDetailGrid(); if (details.Any()) maxIndex = details.First().Index; @@ -343,14 +354,13 @@ namespace WeighAndGrading { var currentRow = livestock.Item3 == 0 ? tangEntity : maoEntity; var tech = livestock.Item3 == 0 ? "烫褪" : "毛剥"; - if (currentRow == null) - throw new Exception(string.Format("请先选择 {0} 的数据", tech)); GradeAndWeight_Detail first; if (tempList.TryPeek(out first) && first.Livestock_ID == 0) { tempList.TryDequeue(out first); - first.OrderDetail_ID = currentRow.OrderDetail_ID; + if (currentRow != null) + first.OrderDetail_ID = currentRow.OrderDetail_ID; first.Date = butcherTimeInput.Date.Value; first.Livestock_ID = livestock.Item1; first.Livestock_Name = livestock.Item2; @@ -364,7 +374,8 @@ namespace WeighAndGrading maxIndex++; var entity = new GradeAndWeight_Detail(); entity.Index = maxIndex; - entity.OrderDetail_ID = currentRow.OrderDetail_ID; + if (currentRow != null) + entity.OrderDetail_ID = currentRow.OrderDetail_ID; entity.Date = butcherTimeInput.Date.Value; entity.Livestock_ID = livestock.Item1; entity.Livestock_Name = livestock.Item2; @@ -372,17 +383,25 @@ namespace WeighAndGrading entity.Technics_Name = tech; entity.Time = DateTime.Now; entity.Date = butcherTimeInput.Date.Value; - if (details.Count == 14) - details.RemoveAt(13); + if (details.Count == 50) + details.RemoveAt(49); details.Insert(0, entity); GradeAndWeightRpc.UpdateOrInsertDetail(entity, true); tempList.Enqueue(entity); BindDetailGrid(); } - currentRow.Already = currentRow.Already + 1; - orderLabel.Text = currentRow.Order.ToString(); - alreadyLabel.Text = currentRow.Already.ToString(); - dataGridView.Refresh(); + if (currentRow != null) + { + currentRow.Already = currentRow.Already + 1; + orderLabel.Text = currentRow.Order.ToString(); + alreadyLabel.Text = currentRow.Already.ToString(); + dataGridView.Refresh(); + } + else + { + orderLabel.Text = string.Empty; + alreadyLabel.Text = string.Empty; + } } } @@ -407,8 +426,8 @@ namespace WeighAndGrading entity.Weight = (entity.Weight ?? 0) + weight; entity.Time = DateTime.Now; entity.Date = butcherTimeInput.Date.Value; - if (details.Count == 14) - details.RemoveAt(13); + if (details.Count == 50) + details.RemoveAt(49); details.Insert(0, entity); GradeAndWeightRpc.UpdateOrInsertDetail(entity); tempList.Enqueue(entity); @@ -475,13 +494,15 @@ namespace WeighAndGrading BindDataGrid(); if (entity.Technics == 0) { - FindRowSetSelected(maoEntity); + maoRow = FindRowSetSelected(maoEntity); tangEntity = null; + tangRow = null; } else { - FindRowSetSelected(tangEntity); + tangRow = FindRowSetSelected(tangEntity); maoEntity = null; + maoRow = null; } dataGridView.Refresh(); }