diff --git a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs index 37e0300..3a37285 100644 --- a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs +++ b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs @@ -53,5 +53,8 @@ namespace BO.BO.Bill /// 是否删除的 /// public bool IsDeleted { get; set; } + + //掉猪 + public bool IsDrop { get; set; } } } diff --git a/BO/Utils/AfterLoginUtil.cs b/BO/Utils/AfterLoginUtil.cs index 71fb283..1b8f829 100644 --- a/BO/Utils/AfterLoginUtil.cs +++ b/BO/Utils/AfterLoginUtil.cs @@ -19,25 +19,20 @@ namespace BO.Utils public static class AfterLoginUtil { -// static List> roleToAssemblies = new List>() -// { -// new Tuple("排宰员",@"C:\B3\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), -// new Tuple("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), -// new Tuple("验质员",@"C:\B3\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), -// new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), -// new Tuple("窒晕员",@"C:\B3\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), -//// new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight") -// }; + 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"),new Tuple("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"),new Tuple("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder")}; - static List> roleToAssemblies = new List>() - { - new Tuple("排宰员",@"\ButcherOrder"), - new Tuple("过磅员",@"ButcherWeight"), - new Tuple("验质员",@"QualityAndOrder"), - new Tuple("定级员",@"WeighAndGrading"), - new Tuple("窒晕员",@"OrderConfirm"), -// new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight") - }; + // static List> roleToAssemblies = new List>() + // { + // new Tuple("排宰员",@"\ButcherOrder"), + // new Tuple("过磅员",@"ButcherWeight"), + // new Tuple("验质员",@"QualityAndOrder"), + // new Tuple("定级员",@"WeighAndGrading"), + // new Tuple("窒晕员",@"OrderConfirm"), + // new Tuple("掉猪处理员",@"DropPigReOrder"), + //// new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight") + // }; @@ -47,11 +42,11 @@ 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)); -//#endif + // var filePath = Path.Combine(Application.StartupPath, string.Format("{0}.dll", first.Item2)); + //#endif if (!File.Exists(filePath)) throw new Exception("相关模块不存在"); var formType = typeof(IAfterLogin); diff --git a/ButcherManageClient/Program.cs b/ButcherManageClient/Program.cs index 1386230..7d11129 100644 --- a/ButcherManageClient/Program.cs +++ b/ButcherManageClient/Program.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; -using AutoMapper; namespace ButcherManageClient { diff --git a/DropPigReOrder/DropPigReOrder.csproj b/DropPigReOrder/DropPigReOrder.csproj new file mode 100644 index 0000000..fd4d075 --- /dev/null +++ b/DropPigReOrder/DropPigReOrder.csproj @@ -0,0 +1,80 @@ + + + + + Debug + AnyCPU + {031BDA81-6DCE-41CD-B8FB-D5334A4940B0} + Library + Properties + DropPigReOrder + DropPigReOrder + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + Form + + + ReOrderForm.cs + + + + + ReOrderForm.cs + + + + + {8968f14a-c7c7-4751-96ce-b114fbfd65ef} + BO + + + {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC} + BWP.WinFormControl + + + + + \ No newline at end of file diff --git a/DropPigReOrder/Properties/AssemblyInfo.cs b/DropPigReOrder/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cbd4a83 --- /dev/null +++ b/DropPigReOrder/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("DropPigReOrder")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DropPigReOrder")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("8b85a747-bdda-4918-993f-fd9d3deaaf8f")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DropPigReOrder/ReOrderForm.Designer.cs b/DropPigReOrder/ReOrderForm.Designer.cs new file mode 100644 index 0000000..82565ab --- /dev/null +++ b/DropPigReOrder/ReOrderForm.Designer.cs @@ -0,0 +1,280 @@ +namespace DropPigReOrder +{ + partial class ReOrderForm + { + /// + /// 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() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + this.syncBtn = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.uDatePicker1 = new BWP.WinFormControl.UDatePicker(); + this.orderGridView = new BWP.WinFormControl.UDataGridView(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.uTextBoxWithPad1 = new BWP.WinFormControl.UTextBoxWithPad(); + this.uTextBoxWithPad2 = new BWP.WinFormControl.UTextBoxWithPad(); + this.OkBtn = new System.Windows.Forms.Button(); + this.updateBtn = new System.Windows.Forms.Button(); + this.vScrollBar1 = new System.Windows.Forms.VScrollBar(); + this.D_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_Order = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_B3WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_TangNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_MaoNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.D_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.orderGridView)).BeginInit(); + this.SuspendLayout(); + // + // syncBtn + // + this.syncBtn.Font = new System.Drawing.Font("宋体", 15F); + this.syncBtn.Location = new System.Drawing.Point(328, 19); + this.syncBtn.Name = "syncBtn"; + this.syncBtn.Size = new System.Drawing.Size(108, 41); + this.syncBtn.TabIndex = 11; + this.syncBtn.Text = "同步数据"; + this.syncBtn.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 15F); + this.label1.Location = new System.Drawing.Point(12, 29); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(109, 20); + this.label1.TabIndex = 10; + this.label1.Text = "宰杀日期:"; + // + // uDatePicker1 + // + this.uDatePicker1.BackColor = System.Drawing.Color.White; + this.uDatePicker1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.uDatePicker1.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0); + this.uDatePicker1.Font = new System.Drawing.Font("宋体", 15F); + this.uDatePicker1.Location = new System.Drawing.Point(117, 24); + this.uDatePicker1.Name = "uDatePicker1"; + this.uDatePicker1.Size = new System.Drawing.Size(175, 30); + this.uDatePicker1.TabIndex = 12; + this.uDatePicker1.Text = "2017/09/05"; + this.uDatePicker1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.uDatePicker1.Type = BWP.WinFormControl.DateTimeType.Date; + // + // orderGridView + // + this.orderGridView.AllowUserToAddRows = false; + this.orderGridView.AllowUserToDeleteRows = false; + this.orderGridView.AllowUserToResizeColumns = false; + this.orderGridView.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.orderGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.orderGridView.BackgroundColor = System.Drawing.Color.White; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.orderGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.orderGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.orderGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.D_ID, + this.D_Order, + this.D_B3WeightBill_ID, + this.D_TangNumber, + this.D_MaoNumber, + this.D_PlanNumber}); + this.orderGridView.Location = new System.Drawing.Point(16, 78); + this.orderGridView.MultiSelect = false; + this.orderGridView.Name = "orderGridView"; + this.orderGridView.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.orderGridView.RowsDefaultCellStyle = dataGridViewCellStyle3; + this.orderGridView.RowTemplate.Height = 23; + this.orderGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.orderGridView.Size = new System.Drawing.Size(547, 521); + this.orderGridView.TabIndex = 13; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(662, 103); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(149, 20); + this.label2.TabIndex = 14; + this.label2.Text = "掉猪烫褪头数:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(662, 193); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(149, 20); + this.label3.TabIndex = 14; + this.label3.Text = "掉猪毛剥头数:"; + // + // uTextBoxWithPad1 + // + this.uTextBoxWithPad1.Font = new System.Drawing.Font("宋体", 20F); + this.uTextBoxWithPad1.Location = new System.Drawing.Point(817, 184); + this.uTextBoxWithPad1.Name = "uTextBoxWithPad1"; + this.uTextBoxWithPad1.Size = new System.Drawing.Size(129, 38); + this.uTextBoxWithPad1.TabIndex = 15; + this.uTextBoxWithPad1.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; + // + // uTextBoxWithPad2 + // + this.uTextBoxWithPad2.Font = new System.Drawing.Font("宋体", 20F); + this.uTextBoxWithPad2.Location = new System.Drawing.Point(817, 94); + this.uTextBoxWithPad2.Name = "uTextBoxWithPad2"; + this.uTextBoxWithPad2.Size = new System.Drawing.Size(129, 38); + this.uTextBoxWithPad2.TabIndex = 15; + this.uTextBoxWithPad2.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Number; + // + // OkBtn + // + this.OkBtn.Font = new System.Drawing.Font("宋体", 15F); + this.OkBtn.Location = new System.Drawing.Point(666, 328); + this.OkBtn.Name = "OkBtn"; + this.OkBtn.Size = new System.Drawing.Size(108, 41); + this.OkBtn.TabIndex = 16; + this.OkBtn.Text = "确认"; + this.OkBtn.UseVisualStyleBackColor = true; + this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click); + // + // updateBtn + // + this.updateBtn.Font = new System.Drawing.Font("宋体", 15F); + this.updateBtn.Location = new System.Drawing.Point(838, 328); + this.updateBtn.Name = "updateBtn"; + this.updateBtn.Size = new System.Drawing.Size(108, 41); + this.updateBtn.TabIndex = 17; + this.updateBtn.Text = "更新"; + this.updateBtn.UseVisualStyleBackColor = true; + this.updateBtn.Click += new System.EventHandler(this.updateBtn_Click); + // + // vScrollBar1 + // + this.vScrollBar1.Location = new System.Drawing.Point(563, 78); + this.vScrollBar1.Name = "vScrollBar1"; + this.vScrollBar1.Size = new System.Drawing.Size(40, 521); + this.vScrollBar1.TabIndex = 53; + // + // D_ID + // + this.D_ID.DataPropertyName = "ID"; + this.D_ID.HeaderText = "ID"; + this.D_ID.Name = "D_ID"; + this.D_ID.Visible = false; + // + // D_Order + // + this.D_Order.DataPropertyName = "Order"; + this.D_Order.HeaderText = "序号"; + this.D_Order.Name = "D_Order"; + // + // D_B3WeightBill_ID + // + this.D_B3WeightBill_ID.DataPropertyName = "B3WeightBill_ID"; + this.D_B3WeightBill_ID.HeaderText = "磅单号"; + this.D_B3WeightBill_ID.Name = "D_B3WeightBill_ID"; + this.D_B3WeightBill_ID.Width = 110; + // + // D_TangNumber + // + this.D_TangNumber.DataPropertyName = "TangNumber"; + this.D_TangNumber.HeaderText = "烫褪头数"; + this.D_TangNumber.Name = "D_TangNumber"; + this.D_TangNumber.Width = 110; + // + // D_MaoNumber + // + this.D_MaoNumber.DataPropertyName = "MaoNumber"; + this.D_MaoNumber.HeaderText = "毛剥头数"; + this.D_MaoNumber.Name = "D_MaoNumber"; + this.D_MaoNumber.Width = 110; + // + // D_PlanNumber + // + this.D_PlanNumber.DataPropertyName = "PlanNumber"; + this.D_PlanNumber.HeaderText = "头数"; + this.D_PlanNumber.Name = "D_PlanNumber"; + this.D_PlanNumber.Width = 110; + // + // ReOrderForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1020, 617); + this.Controls.Add(this.vScrollBar1); + this.Controls.Add(this.updateBtn); + this.Controls.Add(this.OkBtn); + this.Controls.Add(this.uTextBoxWithPad2); + this.Controls.Add(this.uTextBoxWithPad1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.orderGridView); + this.Controls.Add(this.uDatePicker1); + this.Controls.Add(this.syncBtn); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.Name = "ReOrderForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "掉猪处理"; + ((System.ComponentModel.ISupportInitialize)(this.orderGridView)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button syncBtn; + private System.Windows.Forms.Label label1; + private BWP.WinFormControl.UDatePicker uDatePicker1; + private BWP.WinFormControl.UDataGridView orderGridView; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private BWP.WinFormControl.UTextBoxWithPad uTextBoxWithPad1; + private BWP.WinFormControl.UTextBoxWithPad uTextBoxWithPad2; + private System.Windows.Forms.Button OkBtn; + private System.Windows.Forms.Button updateBtn; + private System.Windows.Forms.VScrollBar vScrollBar1; + private System.Windows.Forms.DataGridViewTextBoxColumn D_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn D_Order; + private System.Windows.Forms.DataGridViewTextBoxColumn D_B3WeightBill_ID; + private System.Windows.Forms.DataGridViewTextBoxColumn D_TangNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn D_MaoNumber; + private System.Windows.Forms.DataGridViewTextBoxColumn D_PlanNumber; + } +} \ No newline at end of file diff --git a/DropPigReOrder/ReOrderForm.cs b/DropPigReOrder/ReOrderForm.cs new file mode 100644 index 0000000..534cd34 --- /dev/null +++ b/DropPigReOrder/ReOrderForm.cs @@ -0,0 +1,52 @@ +using BO.Utils; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace DropPigReOrder +{ + public partial class ReOrderForm : Form, IAfterLogin + { + public string RoleName + { + get { return "掉猪处理员"; } + } + + public Form Generate() + { + return this; + } + + private delegate void InvokeHandler(); + Thread syncWork; + public ReOrderForm() + { + InitializeComponent(); + this.uDatePicker1.Date = DateTime.Today; + orderGridView.AutoGenerateColumns = false; + orderGridView.DataSource = null; + this.FormClosing += delegate + { + if (syncWork != null && syncWork.IsAlive) + syncWork.Abort(); + }; + } + + private void OkBtn_Click(object sender, EventArgs e) + { + + } + + private void updateBtn_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/DropPigReOrder/ReOrderForm.resx b/DropPigReOrder/ReOrderForm.resx new file mode 100644 index 0000000..62a9c60 --- /dev/null +++ b/DropPigReOrder/ReOrderForm.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/WeighAndGrading/GradeFrom.Designer.cs b/WeighAndGrading/GradeFrom.Designer.cs index 9b3275d..0207720 100644 --- a/WeighAndGrading/GradeFrom.Designer.cs +++ b/WeighAndGrading/GradeFrom.Designer.cs @@ -28,19 +28,19 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); + 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 dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = 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 dataGridViewCellStyle13 = 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(); this.label1 = new System.Windows.Forms.Label(); this.syncBtn = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); @@ -74,15 +74,6 @@ this.vScrollBar2 = new System.Windows.Forms.VScrollBar(); this.label12 = new System.Windows.Forms.Label(); this.historyGrid = new BWP.WinFormControl.UDataGridView(); - this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.IsLostWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - 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(); @@ -102,6 +93,17 @@ this.btnAbnormalModify = new System.Windows.Forms.Button(); this.lblSucessed = new System.Windows.Forms.Label(); this.btnClearWeight = new System.Windows.Forms.Button(); + this.dropPigBtn = new System.Windows.Forms.Button(); + this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.IsLostWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + 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(); ((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit(); this.groupBox2.SuspendLayout(); @@ -217,17 +219,17 @@ this.tangGridView.AllowUserToDeleteRows = false; this.tangGridView.AllowUserToResizeColumns = false; this.tangGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.tangGridView.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle28.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle28.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle28.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle28.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle28.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.tangGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.tangGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.T_OrderDetail_ID, @@ -241,11 +243,11 @@ this.tangGridView.Name = "tangGridView"; this.tangGridView.ReadOnly = true; this.tangGridView.RowHeadersVisible = false; - dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle30.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle30.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - dataGridViewCellStyle30.SelectionForeColor = System.Drawing.Color.Black; - this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle30; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Black; + this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle4; this.tangGridView.RowTemplate.Height = 50; this.tangGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; this.tangGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -295,9 +297,9 @@ // // T_FinishBtn // - dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle29.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); - this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle29; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); + this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle3; this.T_FinishBtn.HeaderText = "完毕"; this.T_FinishBtn.Name = "T_FinishBtn"; this.T_FinishBtn.ReadOnly = true; @@ -329,17 +331,17 @@ this.maoGridView.AllowUserToDeleteRows = false; this.maoGridView.AllowUserToResizeColumns = false; this.maoGridView.AllowUserToResizeRows = false; - dataGridViewCellStyle31.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle31; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; this.maoGridView.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle32.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle32.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle32.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle32.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle32.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle32; + 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.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6; this.maoGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.maoGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.M_OrderDetail_ID, @@ -353,11 +355,11 @@ this.maoGridView.Name = "maoGridView"; this.maoGridView.ReadOnly = true; this.maoGridView.RowHeadersVisible = false; - dataGridViewCellStyle34.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle34.ForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - dataGridViewCellStyle34.SelectionForeColor = System.Drawing.Color.Black; - this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle34; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.Black; + this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle8; this.maoGridView.RowTemplate.Height = 50; this.maoGridView.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; this.maoGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -407,9 +409,9 @@ // // M_FinishBtn // - dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle33.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); - this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle33; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle7.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10); + this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle7; this.M_FinishBtn.HeaderText = "完毕"; this.M_FinishBtn.Name = "M_FinishBtn"; this.M_FinishBtn.ReadOnly = true; @@ -480,22 +482,23 @@ this.historyGrid.AllowUserToDeleteRows = false; this.historyGrid.AllowUserToResizeColumns = false; this.historyGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle35.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle35; + dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; this.historyGrid.BackgroundColor = System.Drawing.Color.White; - dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle36.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle36.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle36.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle36.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle36.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle36.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle36; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.H_SID, this.H_Livestock_ID, this.IsLostWeight, + this.H_IsDrop, this.H_ReadWeight, this.H_Index, this.H_Technics, @@ -507,9 +510,9 @@ this.historyGrid.Name = "historyGrid"; this.historyGrid.ReadOnly = true; this.historyGrid.RowHeadersVisible = false; - dataGridViewCellStyle39.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle39; + 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.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle13; this.historyGrid.RowTemplate.Height = 40; this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None; this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -517,81 +520,6 @@ this.historyGrid.TabIndex = 0; this.historyGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.historyGrid_CellClick); // - // H_SID - // - this.H_SID.DataPropertyName = "SID"; - this.H_SID.HeaderText = "SID"; - this.H_SID.Name = "H_SID"; - this.H_SID.ReadOnly = true; - this.H_SID.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; - // - // IsLostWeight - // - this.IsLostWeight.DataPropertyName = "IsLostWeight"; - this.IsLostWeight.HeaderText = "IsLostWeight"; - this.IsLostWeight.Name = "IsLostWeight"; - this.IsLostWeight.ReadOnly = true; - this.IsLostWeight.Visible = false; - // - // H_ReadWeight - // - this.H_ReadWeight.DataPropertyName = "ReadWeight"; - this.H_ReadWeight.HeaderText = ""; - this.H_ReadWeight.Name = "H_ReadWeight"; - this.H_ReadWeight.ReadOnly = true; - this.H_ReadWeight.Width = 30; - // - // 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"; - dataGridViewCellStyle37.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle37; - 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"; - dataGridViewCellStyle38.Format = "HH:mm:ss"; - dataGridViewCellStyle38.NullValue = null; - this.H_Time.DefaultCellStyle = dataGridViewCellStyle38; - this.H_Time.HeaderText = "时间"; - this.H_Time.Name = "H_Time"; - this.H_Time.ReadOnly = true; - // // enableWeight // this.enableWeight.AutoCheck = false; @@ -750,7 +678,7 @@ this.btnLockItem.Font = new System.Drawing.Font("宋体", 15F); this.btnLockItem.Location = new System.Drawing.Point(606, 1); this.btnLockItem.Name = "btnLockItem"; - this.btnLockItem.Size = new System.Drawing.Size(102, 25); + this.btnLockItem.Size = new System.Drawing.Size(102, 31); this.btnLockItem.TabIndex = 34; this.btnLockItem.Text = "锁定"; this.btnLockItem.UseVisualStyleBackColor = true; @@ -803,11 +731,106 @@ this.btnClearWeight.UseVisualStyleBackColor = true; this.btnClearWeight.Click += new System.EventHandler(this.btnClearLastWeight_Click); // + // dropPigBtn + // + this.dropPigBtn.Font = new System.Drawing.Font("宋体", 15F); + this.dropPigBtn.Location = new System.Drawing.Point(754, 6); + this.dropPigBtn.Name = "dropPigBtn"; + this.dropPigBtn.Size = new System.Drawing.Size(102, 54); + this.dropPigBtn.TabIndex = 40; + this.dropPigBtn.Text = "掉猪"; + this.dropPigBtn.UseVisualStyleBackColor = true; + this.dropPigBtn.Click += new System.EventHandler(this.dropPigBtn_Click); + // + // H_SID + // + this.H_SID.DataPropertyName = "SID"; + this.H_SID.HeaderText = "SID"; + this.H_SID.Name = "H_SID"; + this.H_SID.ReadOnly = true; + this.H_SID.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; + // + // IsLostWeight + // + this.IsLostWeight.DataPropertyName = "IsLostWeight"; + this.IsLostWeight.HeaderText = "IsLostWeight"; + this.IsLostWeight.Name = "IsLostWeight"; + this.IsLostWeight.ReadOnly = true; + this.IsLostWeight.Visible = false; + // + // H_IsDrop + // + this.H_IsDrop.DataPropertyName = "IsDrop"; + this.H_IsDrop.HeaderText = "IsDrop"; + this.H_IsDrop.Name = "H_IsDrop"; + this.H_IsDrop.ReadOnly = true; + this.H_IsDrop.Visible = false; + // + // H_ReadWeight + // + this.H_ReadWeight.DataPropertyName = "ReadWeight"; + this.H_ReadWeight.HeaderText = ""; + this.H_ReadWeight.Name = "H_ReadWeight"; + this.H_ReadWeight.ReadOnly = true; + this.H_ReadWeight.Width = 30; + // + // 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"; + dataGridViewCellStyle11.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle11; + 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"; + dataGridViewCellStyle12.Format = "HH:mm:ss"; + dataGridViewCellStyle12.NullValue = null; + this.H_Time.DefaultCellStyle = dataGridViewCellStyle12; + this.H_Time.HeaderText = "时间"; + this.H_Time.Name = "H_Time"; + this.H_Time.ReadOnly = true; + // // GradeFrom // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1382, 840); + this.Controls.Add(this.dropPigBtn); this.Controls.Add(this.lblSucessed); this.Controls.Add(this.statePic); this.Controls.Add(this.discontPanel); @@ -909,17 +932,19 @@ private System.Windows.Forms.DataGridViewTextBoxColumn M_Number; private System.Windows.Forms.DataGridViewTextBoxColumn M_Already; private System.Windows.Forms.DataGridViewButtonColumn M_FinishBtn; + private System.Windows.Forms.Label lblHeJi; + private System.Windows.Forms.Label lblSucessed; + private System.Windows.Forms.Button btnClearWeight; + private System.Windows.Forms.Button dropPigBtn; private System.Windows.Forms.DataGridViewTextBoxColumn H_SID; private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID; private System.Windows.Forms.DataGridViewTextBoxColumn IsLostWeight; + private System.Windows.Forms.DataGridViewTextBoxColumn H_IsDrop; private System.Windows.Forms.DataGridViewCheckBoxColumn H_ReadWeight; 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.Label lblHeJi; - private System.Windows.Forms.Label lblSucessed; - private System.Windows.Forms.Button btnClearWeight; } } \ No newline at end of file diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index cba7fef..2c39612 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -507,6 +507,11 @@ namespace WeighAndGrading historyGrid.DataSource = null; if (details.Any()) historyGrid.DataSource = details; + foreach (DataGridViewRow row in historyGrid.Rows) + { + if ((bool)row.Cells["H_IsDrop"].Value) + row.DefaultCellStyle.BackColor = Color.Red; + } InitScrollBar2(); if (lastSelectID.HasValue) { @@ -1729,5 +1734,22 @@ namespace WeighAndGrading File.Delete(changeFlagPath); } } + + private void dropPigBtn_Click(object sender, EventArgs e) + { + if (modifyDetail == null) + { + UMessageBox.Show("请先选择要设置为掉猪的行", "错误"); + return; + } + else + { + modifyDetail.IsDrop = !modifyDetail.IsDrop; + LocalGradeAndWeightBL.Update(modifyDetail, "IsDrop"); + BindDetailGrid(); + modifyDetail = null; + modifyPanel.Hide(); + } + } } } diff --git a/WeighAndGrading/GradeFrom.resx b/WeighAndGrading/GradeFrom.resx index 6241c61..1734193 100644 --- a/WeighAndGrading/GradeFrom.resx +++ b/WeighAndGrading/GradeFrom.resx @@ -162,6 +162,9 @@ True + + True + True